FS2_Open
Open source remastering of the Freespace 2 engine
UI_GADGET Class Reference

#include <ui.h>

Inheritance diagram for UI_GADGET:
UI_BUTTON UI_CHECKBOX UI_DOT_SLIDER UI_DOT_SLIDER_NEW UI_ICON UI_INPUTBOX UI_KEYTRAP UI_LISTBOX UI_RADIO UI_SCROLLBAR UI_SLIDER2

Public Member Functions

 UI_GADGET ()
 
virtual ~UI_GADGET ()
 
void base_create (UI_WINDOW *wnd, int _kind, int _x, int _y, int _w, int _h)
 
virtual void draw ()
 
void set_focus ()
 
void clear_focus ()
 
int has_focus ()
 
void set_hotkey (int keycode)
 
void set_callback (void(*_user_function)(void))
 
void disable ()
 
void enable (int n=1)
 
void capture_mouse ()
 
int mouse_captured (UI_GADGET *gadget=NULL)
 
int disabled ()
 
int enabled ()
 
virtual void hide (int n)
 
virtual void hide ()
 
virtual void unhide ()
 
void update_dimensions (int _x, int _y, int _w, int _h)
 
void get_dimensions (int *_x, int *_y, int *_w, int *_h)
 
int is_mouse_on ()
 
void get_mouse_pos (int *xx, int *yy)
 
void link_hotspot (int num)
 
int get_hotspot ()
 
int bmaps_used ()
 
int set_bmaps (char *ani_filename, int nframes=3, int start_frame=1)
 
void reset ()
 
virtual int is_hidden ()
 

Public Attributes

int bmap_ids [MAX_BMAPS_PER_GADGET]
 

Protected Member Functions

void drag_with_children (int dx, int dy)
 
void start_drag_with_children ()
 
void stop_drag_with_children ()
 
int is_mouse_on_children ()
 
void remove_from_family ()
 
void set_parent (UI_GADGET *_parent)
 
UI_GADGETget_next ()
 
UI_GADGETget_prev ()
 
virtual void process (int focus=0)
 
virtual void destroy ()
 
int check_move ()
 

Protected Attributes

char * bm_filename
 
int kind
 
int hotkey
 
int x
 
int y
 
int w
 
int h
 
int m_flags
 
void(* user_function )(void)
 
int disabled_flag
 
int base_dragging
 
int base_drag_x
 
int base_drag_y
 
int base_start_x
 
int base_start_y
 
int hidden
 
int linked_to_hotspot
 
int hotspot_num
 
int uses_bmaps
 
int m_num_frames
 
UI_GADGETparent
 
UI_GADGETchildren
 
UI_GADGETprev
 
UI_GADGETnext
 
UI_WINDOWmy_wnd
 

Friends

class UI_WINDOW
 
class UI_BUTTON
 
class UI_KEYTRAP
 
class UI_CHECKBOX
 
class UI_RADIO
 
class UI_SCROLLBAR
 
class UI_LISTBOX
 
class UI_INPUTBOX
 
class UI_SLIDER2
 
class UI_DOT_SLIDER
 
class UI_DOT_SLIDER_NEW
 

Detailed Description

Definition at line 61 of file ui.h.

Constructor & Destructor Documentation

UI_GADGET::UI_GADGET ( )

Definition at line 19 of file gadget.cpp.

UI_GADGET::~UI_GADGET ( )
virtual

Definition at line 25 of file gadget.cpp.

Member Function Documentation

void UI_GADGET::base_create ( UI_WINDOW wnd,
int  _kind,
int  _x,
int  _y,
int  _w,
int  _h 
)

Definition at line 244 of file gadget.cpp.

int UI_GADGET::bmaps_used ( )
inline

Definition at line 146 of file ui.h.

void UI_GADGET::capture_mouse ( )

Definition at line 225 of file gadget.cpp.

int UI_GADGET::check_move ( )
protected

Definition at line 510 of file gadget.cpp.

void UI_GADGET::clear_focus ( )

Definition at line 328 of file gadget.cpp.

void UI_GADGET::destroy ( )
protectedvirtual

Reimplemented in UI_DOT_SLIDER.

Definition at line 160 of file gadget.cpp.

void UI_GADGET::disable ( )

Definition at line 432 of file gadget.cpp.

int UI_GADGET::disabled ( )

Definition at line 447 of file gadget.cpp.

void UI_GADGET::drag_with_children ( int  dx,
int  dy 
)
protected

Definition at line 459 of file gadget.cpp.

void UI_GADGET::draw ( )
virtual

Reimplemented in UI_DOT_SLIDER_NEW, UI_DOT_SLIDER, and UI_BUTTON.

Definition at line 139 of file gadget.cpp.

void UI_GADGET::enable ( int  n = 1)

Definition at line 440 of file gadget.cpp.

int UI_GADGET::enabled ( )

Definition at line 454 of file gadget.cpp.

void UI_GADGET::get_dimensions ( int _x,
int _y,
int _w,
int _h 
)

Definition at line 195 of file gadget.cpp.

int UI_GADGET::get_hotspot ( )

Definition at line 29 of file gadget.cpp.

void UI_GADGET::get_mouse_pos ( int xx,
int yy 
)

Definition at line 341 of file gadget.cpp.

UI_GADGET * UI_GADGET::get_next ( )
protected

Definition at line 295 of file gadget.cpp.

UI_GADGET * UI_GADGET::get_prev ( )
protected

Definition at line 308 of file gadget.cpp.

int UI_GADGET::has_focus ( )

Definition at line 334 of file gadget.cpp.

void UI_GADGET::hide ( int  n)
virtual

Definition at line 207 of file gadget.cpp.

void UI_GADGET::hide ( )
virtual

Reimplemented in UI_SCROLLBAR.

Definition at line 212 of file gadget.cpp.

int UI_GADGET::is_hidden ( )
virtual

Definition at line 42 of file gadget.cpp.

int UI_GADGET::is_mouse_on ( )

Definition at line 371 of file gadget.cpp.

int UI_GADGET::is_mouse_on_children ( )
protected

Definition at line 412 of file gadget.cpp.

void UI_GADGET::link_hotspot ( int  num)

Definition at line 50 of file gadget.cpp.

int UI_GADGET::mouse_captured ( UI_GADGET gadget = NULL)

Definition at line 234 of file gadget.cpp.

void UI_GADGET::process ( int  focus = 0)
protectedvirtual

Reimplemented in UI_DOT_SLIDER_NEW, and UI_DOT_SLIDER.

Definition at line 352 of file gadget.cpp.

void UI_GADGET::remove_from_family ( )
protected

Definition at line 549 of file gadget.cpp.

void UI_GADGET::reset ( )

Definition at line 37 of file gadget.cpp.

int UI_GADGET::set_bmaps ( char *  ani_filename,
int  nframes = 3,
int  start_frame = 1 
)

Definition at line 71 of file gadget.cpp.

void UI_GADGET::set_callback ( void(*)(void _user_function)

Definition at line 288 of file gadget.cpp.

void UI_GADGET::set_focus ( )

Definition at line 321 of file gadget.cpp.

void UI_GADGET::set_hotkey ( int  keycode)

Definition at line 280 of file gadget.cpp.

void UI_GADGET::set_parent ( UI_GADGET _parent)
protected

Definition at line 580 of file gadget.cpp.

void UI_GADGET::start_drag_with_children ( )
protected

Definition at line 476 of file gadget.cpp.

void UI_GADGET::stop_drag_with_children ( )
protected

Definition at line 494 of file gadget.cpp.

void UI_GADGET::unhide ( )
virtual

Reimplemented in UI_SCROLLBAR.

Definition at line 217 of file gadget.cpp.

void UI_GADGET::update_dimensions ( int  _x,
int  _y,
int  _w,
int  _h 
)

Definition at line 187 of file gadget.cpp.

Friends And Related Function Documentation

friend class UI_BUTTON
friend

Definition at line 64 of file ui.h.

friend class UI_CHECKBOX
friend

Definition at line 66 of file ui.h.

friend class UI_DOT_SLIDER
friend

Definition at line 72 of file ui.h.

friend class UI_DOT_SLIDER_NEW
friend

Definition at line 73 of file ui.h.

friend class UI_INPUTBOX
friend

Definition at line 70 of file ui.h.

friend class UI_KEYTRAP
friend

Definition at line 65 of file ui.h.

friend class UI_LISTBOX
friend

Definition at line 69 of file ui.h.

friend class UI_RADIO
friend

Definition at line 67 of file ui.h.

friend class UI_SCROLLBAR
friend

Definition at line 68 of file ui.h.

friend class UI_SLIDER2
friend

Definition at line 71 of file ui.h.

friend class UI_WINDOW
friend

Definition at line 63 of file ui.h.

Member Data Documentation

int UI_GADGET::base_drag_x
protected

Definition at line 84 of file ui.h.

int UI_GADGET::base_drag_y
protected

Definition at line 84 of file ui.h.

int UI_GADGET::base_dragging
protected

Definition at line 83 of file ui.h.

int UI_GADGET::base_start_x
protected

Definition at line 85 of file ui.h.

int UI_GADGET::base_start_y
protected

Definition at line 85 of file ui.h.

char* UI_GADGET::bm_filename
protected

Definition at line 76 of file ui.h.

int UI_GADGET::bmap_ids[MAX_BMAPS_PER_GADGET]

Definition at line 118 of file ui.h.

UI_GADGET* UI_GADGET::children
protected

Definition at line 101 of file ui.h.

int UI_GADGET::disabled_flag
protected

Definition at line 82 of file ui.h.

int UI_GADGET::h
protected

Definition at line 79 of file ui.h.

int UI_GADGET::hidden
protected

Definition at line 86 of file ui.h.

int UI_GADGET::hotkey
protected

Definition at line 78 of file ui.h.

int UI_GADGET::hotspot_num
protected

Definition at line 90 of file ui.h.

int UI_GADGET::kind
protected

Definition at line 77 of file ui.h.

int UI_GADGET::linked_to_hotspot
protected

Definition at line 89 of file ui.h.

int UI_GADGET::m_flags
protected

Definition at line 80 of file ui.h.

int UI_GADGET::m_num_frames
protected

Definition at line 94 of file ui.h.

UI_WINDOW* UI_GADGET::my_wnd
protected

Definition at line 111 of file ui.h.

UI_GADGET* UI_GADGET::next
protected

Definition at line 103 of file ui.h.

UI_GADGET* UI_GADGET::parent
protected

Definition at line 100 of file ui.h.

UI_GADGET* UI_GADGET::prev
protected

Definition at line 102 of file ui.h.

void(* UI_GADGET::user_function) (void)
protected

Definition at line 81 of file ui.h.

int UI_GADGET::uses_bmaps
protected

Definition at line 93 of file ui.h.

int UI_GADGET::w
protected

Definition at line 79 of file ui.h.

int UI_GADGET::x
protected

Definition at line 79 of file ui.h.

int UI_GADGET::y
protected

Definition at line 79 of file ui.h.


The documentation for this class was generated from the following files: