#include <glui.h>
Inherits GLUI_Node.
Inherited by GLUI_Button, GLUI_Checkbox, GLUI_Column, GLUI_EditText, GLUI_List, GLUI_Listbox, GLUI_Mouse_Interaction, GLUI_Panel, GLUI_RadioButton, GLUI_RadioGroup, GLUI_Scrollbar, GLUI_Separator, GLUI_Spinner, GLUI_StaticText, and GLUI_TextBox.
Public Member Functions | |
virtual void | set_name (const char *string) |
virtual void | set_int_val (int new_int) |
virtual void | set_float_val (float new_float) |
virtual void | set_ptr_val (void *new_ptr) |
virtual void | set_float_array_val (float *array_ptr) |
virtual float | get_float_val (void) |
virtual int | get_int_val (void) |
virtual void | get_float_array_val (float *array_ptr) |
virtual int | get_id (void) const |
virtual void | set_id (int id) |
virtual int | mouse_down_handler (int local_x, int local_y) |
virtual int | mouse_up_handler (int local_x, int local_y, bool inside) |
virtual int | mouse_held_down_handler (int local_x, int local_y, bool inside) |
virtual int | key_handler (unsigned char key, int modifiers) |
virtual int | special_handler (int key, int modifiers) |
virtual void | update_size (void) |
virtual void | idle (void) |
virtual int | mouse_over (int state, int x, int y) |
virtual void | enable (void) |
virtual void | disable (void) |
virtual void | activate (int how) |
virtual void | deactivate (void) |
void | hide_internal (int recurse) |
void | unhide_internal (int recurse) |
int | can_draw (void) |
void | redraw (void) |
void | redraw_window (void) |
virtual void | align (void) |
void | pack (int x, int y) |
void | pack_old (int x, int y) |
void | draw_recursive (int x, int y) |
int | set_to_glut_window (void) |
void | restore_window (int orig) |
void | translate_and_draw_front (void) |
void | translate_to_origin (void) |
virtual void | draw (int x, int y)=0 |
void | set_font (void *new_font) |
void * | get_font (void) |
int | string_width (const char *text) |
int | string_width (const GLUI_String &str) |
int | char_width (char c) |
void | draw_name (int x, int y) |
void | draw_box_inwards_outline (int x_min, int x_max, int y_min, int y_max) |
void | draw_box (int x_min, int x_max, int y_min, int y_max, float r, float g, float b) |
void | draw_bkgd_box (int x_min, int x_max, int y_min, int y_max) |
void | draw_emboss_box (int x_min, int x_max, int y_min, int y_max) |
void | draw_string (const char *text) |
void | draw_string (const GLUI_String &s) |
void | draw_char (char c) |
void | draw_active_box (int x_min, int x_max, int y_min, int y_max) |
void | set_to_bkgd_color (void) |
void | set_w (int new_w) |
void | set_h (int new_w) |
void | set_alignment (int new_align) |
void | sync_live (int recurse, int draw) |
void | init_live (void) |
void | output_live (int update_main_gfx) |
virtual void | set_text (const char *t) |
void | execute_callback (void) |
void | get_this_column_dims (int *col_x, int *col_y, int *col_w, int *col_h, int *col_x_off, int *col_y_off) |
virtual bool | needs_idle (void) const |
virtual bool | wants_tabs () const |
GLUI_Control (void) | |
virtual | ~GLUI_Control () |
Public Attributes | |
int | w |
int | h |
int | x_abs |
int | y_abs |
int | x_off |
int | y_off_top |
int | y_off_bot |
int | contain_x |
int | contain_y |
int | contain_w |
int | contain_h |
int | active_type |
"GLUI_CONTROL_ACTIVE_..." | |
bool | active |
If true, we've got the focus. | |
bool | can_activate |
If false, remove from tab order. | |
bool | spacebar_mouse_click |
Spacebar simulates click. | |
long | user_id |
Integer to pass to callback function. | |
GLUI_CB | callback |
User callback function, or NULL. | |
float | float_val |
int | int_val |
float | float_array_val [GLUI_DEF_MAX_ARRAY] |
int | float_array_size |
GLUI_String | text |
void * | ptr_val |
int | live_type |
bool | live_inited |
int | last_live_int |
float | last_live_float |
GLUI_String | last_live_text |
float | last_live_float_array [GLUI_DEF_MAX_ARRAY] |
GLUI * | glui |
bool | is_container |
int | alignment |
bool | enabled |
GLUI_String | name |
void * | font |
bool | collapsible |
bool | is_open |
GLUI_Node | collapsed_node |
bool | hidden |
int | char_widths [CHAR_WIDTH_HASH_SIZE][2] |
Yes, this is a huge and hideous class. It needs to be split up into simpler subobjects. None of the data members should be directly accessed by users (they should be protected, not public); only subclasses.
GLUI_Control::GLUI_Control | ( | void | ) | [inline] |
virtual GLUI_Control::~GLUI_Control | ( | ) | [virtual] |
virtual void GLUI_Control::activate | ( | int | how | ) | [inline, virtual] |
Reimplemented in GLUI_EditText, GLUI_TextBox, and GLUI_List.
virtual void GLUI_Control::align | ( | void | ) | [virtual] |
int GLUI_Control::can_draw | ( | void | ) | [inline] |
Return true if it currently makes sense to draw this class.
int GLUI_Control::char_width | ( | char | c | ) |
virtual void GLUI_Control::deactivate | ( | void | ) | [inline, virtual] |
Reimplemented in GLUI_EditText, GLUI_CommandLine, GLUI_TextBox, and GLUI_List.
virtual void GLUI_Control::disable | ( | void | ) | [virtual] |
Reimplemented in GLUI_TextBox.
virtual void GLUI_Control::draw | ( | int | x, | |
int | y | |||
) | [pure virtual] |
void GLUI_Control::draw_active_box | ( | int | x_min, | |
int | x_max, | |||
int | y_min, | |||
int | y_max | |||
) |
void GLUI_Control::draw_bkgd_box | ( | int | x_min, | |
int | x_max, | |||
int | y_min, | |||
int | y_max | |||
) |
void GLUI_Control::draw_box | ( | int | x_min, | |
int | x_max, | |||
int | y_min, | |||
int | y_max, | |||
float | r, | |||
float | g, | |||
float | b | |||
) |
void GLUI_Control::draw_box_inwards_outline | ( | int | x_min, | |
int | x_max, | |||
int | y_min, | |||
int | y_max | |||
) |
void GLUI_Control::draw_char | ( | char | c | ) |
void GLUI_Control::draw_emboss_box | ( | int | x_min, | |
int | x_max, | |||
int | y_min, | |||
int | y_max | |||
) |
void GLUI_Control::draw_name | ( | int | x, | |
int | y | |||
) |
void GLUI_Control::draw_recursive | ( | int | x, | |
int | y | |||
) |
void GLUI_Control::draw_string | ( | const GLUI_String & | s | ) | [inline] |
void GLUI_Control::draw_string | ( | const char * | text | ) |
virtual void GLUI_Control::enable | ( | void | ) | [virtual] |
Reimplemented in GLUI_TextBox.
void GLUI_Control::execute_callback | ( | void | ) |
virtual void GLUI_Control::get_float_array_val | ( | float * | array_ptr | ) | [virtual] |
virtual float GLUI_Control::get_float_val | ( | void | ) | [inline, virtual] |
Reimplemented in GLUI_Spinner.
void* GLUI_Control::get_font | ( | void | ) |
virtual int GLUI_Control::get_id | ( | void | ) | const [inline, virtual] |
Reimplemented in GLUI_Tree.
virtual int GLUI_Control::get_int_val | ( | void | ) | [inline, virtual] |
Reimplemented in GLUI_Spinner.
void GLUI_Control::get_this_column_dims | ( | int * | col_x, | |
int * | col_y, | |||
int * | col_w, | |||
int * | col_h, | |||
int * | col_x_off, | |||
int * | col_y_off | |||
) |
void GLUI_Control::hide_internal | ( | int | recurse | ) |
Hide (shrink into a rollout) and unhide (expose from a rollout)
virtual void GLUI_Control::idle | ( | void | ) | [inline, virtual] |
Reimplemented in GLUI_Spinner, GLUI_Scrollbar, and GLUI_Rotation.
void GLUI_Control::init_live | ( | void | ) |
virtual int GLUI_Control::key_handler | ( | unsigned char | key, | |
int | modifiers | |||
) | [inline, virtual] |
Reimplemented in GLUI_Button, GLUI_Checkbox, GLUI_EditText, GLUI_CommandLine, GLUI_Spinner, GLUI_TextBox, GLUI_List, GLUI_Scrollbar, and GLUI_Listbox.
virtual int GLUI_Control::mouse_down_handler | ( | int | local_x, | |
int | local_y | |||
) | [inline, virtual] |
Reimplemented in GLUI_Button, GLUI_Checkbox, GLUI_Rollout, GLUI_Tree, GLUI_EditText, GLUI_RadioButton, GLUI_Spinner, GLUI_TextBox, GLUI_List, GLUI_Scrollbar, GLUI_Listbox, and GLUI_Mouse_Interaction.
virtual int GLUI_Control::mouse_held_down_handler | ( | int | local_x, | |
int | local_y, | |||
bool | inside | |||
) | [inline, virtual] |
Reimplemented in GLUI_Button, GLUI_Checkbox, GLUI_Rollout, GLUI_Tree, GLUI_EditText, GLUI_RadioButton, GLUI_Spinner, GLUI_TextBox, GLUI_List, GLUI_Scrollbar, GLUI_Listbox, and GLUI_Mouse_Interaction.
virtual int GLUI_Control::mouse_over | ( | int | state, | |
int | x, | |||
int | y | |||
) | [inline, virtual] |
Reimplemented in GLUI_EditText, GLUI_TextBox, GLUI_List, and GLUI_Listbox.
virtual int GLUI_Control::mouse_up_handler | ( | int | local_x, | |
int | local_y, | |||
bool | inside | |||
) | [inline, virtual] |
Reimplemented in GLUI_Button, GLUI_Checkbox, GLUI_Rollout, GLUI_Tree, GLUI_EditText, GLUI_RadioButton, GLUI_Spinner, GLUI_TextBox, GLUI_List, GLUI_Scrollbar, GLUI_Listbox, and GLUI_Mouse_Interaction.
virtual bool GLUI_Control::needs_idle | ( | void | ) | const [virtual] |
Reimplemented in GLUI_Spinner, GLUI_Scrollbar, and GLUI_Rotation.
void GLUI_Control::output_live | ( | int | update_main_gfx | ) |
void GLUI_Control::pack | ( | int | x, | |
int | y | |||
) |
void GLUI_Control::pack_old | ( | int | x, | |
int | y | |||
) |
void GLUI_Control::redraw | ( | void | ) |
Redraw this control. In single-buffering mode (drawing to GL_FRONT), this is just a call to translate_and_draw_front (after a can_draw() check). In double-buffering mode (drawing to GL_BACK), this queues up a redraw and returns false, since you shouldn't draw yet.
void GLUI_Control::redraw_window | ( | void | ) |
Redraw everybody in our window.
void GLUI_Control::restore_window | ( | int | orig | ) |
void GLUI_Control::set_alignment | ( | int | new_align | ) |
virtual void GLUI_Control::set_float_array_val | ( | float * | array_ptr | ) | [virtual] |
virtual void GLUI_Control::set_float_val | ( | float | new_float | ) | [inline, virtual] |
Reimplemented in GLUI_EditText, GLUI_Spinner, and GLUI_Scrollbar.
void GLUI_Control::set_font | ( | void * | new_font | ) |
void GLUI_Control::set_h | ( | int | new_w | ) |
Reimplemented in GLUI_FileBrowser.
virtual void GLUI_Control::set_id | ( | int | id | ) | [inline, virtual] |
Reimplemented in GLUI_Tree.
virtual void GLUI_Control::set_int_val | ( | int | new_int | ) | [inline, virtual] |
Reimplemented in GLUI_Checkbox, GLUI_EditText, GLUI_RadioGroup, GLUI_Spinner, GLUI_Scrollbar, and GLUI_Listbox.
virtual void GLUI_Control::set_name | ( | const char * | string | ) | [virtual] |
Reimplemented in GLUI_Panel, and GLUI_RadioGroup.
virtual void GLUI_Control::set_ptr_val | ( | void * | new_ptr | ) | [inline, virtual] |
virtual void GLUI_Control::set_text | ( | const char * | t | ) | [inline, virtual] |
Writes live variable
Reimplemented in GLUI_EditText, GLUI_StaticText, and GLUI_TextBox.
void GLUI_Control::set_to_bkgd_color | ( | void | ) |
int GLUI_Control::set_to_glut_window | ( | void | ) |
void GLUI_Control::set_w | ( | int | new_w | ) |
Reimplemented in GLUI_FileBrowser.
virtual int GLUI_Control::special_handler | ( | int | key, | |
int | modifiers | |||
) | [inline, virtual] |
Reimplemented in GLUI_EditText, GLUI_CommandLine, GLUI_Spinner, GLUI_TextBox, GLUI_List, GLUI_Scrollbar, GLUI_Listbox, and GLUI_Mouse_Interaction.
int GLUI_Control::string_width | ( | const GLUI_String & | str | ) | [inline] |
int GLUI_Control::string_width | ( | const char * | text | ) |
void GLUI_Control::sync_live | ( | int | recurse, | |
int | draw | |||
) |
void GLUI_Control::translate_and_draw_front | ( | void | ) |
void GLUI_Control::translate_to_origin | ( | void | ) | [inline] |
void GLUI_Control::unhide_internal | ( | int | recurse | ) |
virtual void GLUI_Control::update_size | ( | void | ) | [inline, virtual] |
Reimplemented in GLUI_Button, GLUI_Checkbox, GLUI_Panel, GLUI_Rollout, GLUI_Tree, GLUI_EditText, GLUI_RadioButton, GLUI_Spinner, GLUI_StaticText, GLUI_TextBox, GLUI_List, GLUI_Scrollbar, GLUI_Listbox, and GLUI_Mouse_Interaction.
virtual bool GLUI_Control::wants_tabs | ( | void | ) | const [inline, virtual] |
Reimplemented in GLUI_TextBox.
bool GLUI_Control::active |
If true, we've got the focus.
"GLUI_CONTROL_ACTIVE_..."
"activation" for tabbing between controls.
User callback function, or NULL.
If false, remove from tab order.
int GLUI_Control::char_widths[CHAR_WIDTH_HASH_SIZE][2] |
Is this control grayed out?
float GLUI_Control::float_array_val[GLUI_DEF_MAX_ARRAY] |
float GLUI_Control::float_val |
Variable value storage Our float value
void* GLUI_Control::font |
Our glutbitmap font
Properties of our control Our containing event handler (NEVER NULL during event processing!)
int GLUI_Control::h |
bool GLUI_Control::hidden |
Our integer value
Is this a container class (e.g., panel)
float GLUI_Control::last_live_float_array[GLUI_DEF_MAX_ARRAY] |
The name of this control
void* GLUI_Control::ptr_val |
"Live variable" updating A pointer to the user's live variable value
Spacebar simulates click.
The text inside this control
Integer to pass to callback function.
Callbacks
int GLUI_Control::w |
Onscreen coordinates