GLUI_Main Class Reference

#include <glui.h>

Inheritance diagram for GLUI_Main:

Inheritance graph
[legend]
Collaboration diagram for GLUI_Main:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void adjust_glut_xy (int &x, int &y)
void activate_control (GLUI_Control *control, int how)
void align_controls (GLUI_Control *control)
void deactivate_current_control (void)
void draw_raised_box (int x, int y, int w, int h)
void draw_lowered_box (int x, int y, int w, int h)
bool should_redraw_now (GLUI_Control *ctl)
int set_current_draw_buffer ()
void restore_draw_buffer (int buffer_state)
void refresh ()
void post_update_main_gfx ()
void pack_controls ()
void close_internal ()
void check_subwindow_position ()
void set_ortho_projection ()
void set_viewport ()
int get_glut_window_id (void)

Public Attributes

GLUI_StdBitmaps std_bitmaps
GLUI_String window_name
RGBc bkgd_color
float bkgd_color_f [3]
void * font
int curr_modifiers

Protected Types

enum  buffer_mode_t { buffer_front = 1, buffer_back = 2 }

Protected Member Functions

GLUI_Controlfind_control (int x, int y)
GLUI_Controlfind_next_control (GLUI_Control *control)
GLUI_Controlfind_next_control_rec (GLUI_Control *control)
GLUI_Controlfind_next_control_ (GLUI_Control *control)
GLUI_Controlfind_prev_control (GLUI_Control *control)
void create_standalone_window (const char *name, int x=-1, int y=-1)
void create_subwindow (int parent, int window_alignment)
void setup_default_glut_callbacks (void)
void mouse (int button, int state, int x, int y)
void keyboard (unsigned char key, int x, int y)
void special (int key, int x, int y)
void passive_motion (int x, int y)
void reshape (int w, int h)
void visibility (int state)
void motion (int x, int y)
void entry (int state)
void display (void)
void idle (void)
int needs_idle (void)
virtual int add_control (GLUI_Node *parent, GLUI_Control *control)
 GLUI_Main (void)

Protected Attributes

int main_gfx_window_id
int mouse_button_down
int glut_window_id
int top_level_glut_window_id
GLUI_Controlactive_control
GLUI_Controlmouse_over_control
GLUI_Panelmain_panel
buffer_mode_t buffer_mode
 Current drawing mode.
int curr_cursor
int w
int h
long flags
bool closing
int parent_window
int glui_id
void(* glut_mouse_CB )(int, int, int, int)
void(* glut_keyboard_CB )(unsigned char, int, int)
void(* glut_special_CB )(int, int, int)
void(* glut_reshape_CB )(int, int)

Friends

class GLUI_Control
class GLUI_Rotation
class GLUI_Translation
class GLUI
class GLUI_Master_Object
void glui_mouse_func (int button, int state, int x, int y)
void glui_keyboard_func (unsigned char key, int x, int y)
void glui_special_func (int key, int x, int y)
void glui_passive_motion_func (int x, int y)
void glui_reshape_func (int w, int h)
void glui_visibility_func (int state)
void glui_motion_func (int x, int y)
void glui_entry_func (int state)
void glui_display_func (void)
void glui_idle_func (void)
void glui_parent_window_reshape_func (int w, int h)
void glui_parent_window_keyboard_func (unsigned char, int, int)
void glui_parent_window_special_func (int, int, int)
void glui_parent_window_mouse_func (int, int, int, int)


Detailed Description

A GLUI_Main handles GLUT events for one window, routing them to the appropriate controls. The central user-visible "GLUI" class inherits from this class; users should not allocate GLUT_Main objects.

There's a separate GLUI_Main object for:

All the GLUI_Main objects are listed in GLUI_Master.gluis. A better name for this class might be "GLUI_Environment"; this class provides the window-level context for every control.

Definition at line 607 of file glui.h.


Member Enumeration Documentation

enum GLUI_Main::buffer_mode_t [protected]

Enumerator:
buffer_front  Draw updated controls directly to screen.
buffer_back  Double buffering: postpone updates until next redraw.

Definition at line 644 of file glui.h.


Constructor & Destructor Documentation

GLUI_Main::GLUI_Main ( void   )  [protected]


Member Function Documentation

GLUI_Control* GLUI_Main::find_control ( int  x,
int  y 
) [protected]

GLUI_Control* GLUI_Main::find_next_control ( GLUI_Control control  )  [protected]

GLUI_Control* GLUI_Main::find_next_control_rec ( GLUI_Control control  )  [protected]

GLUI_Control* GLUI_Main::find_next_control_ ( GLUI_Control control  )  [protected]

GLUI_Control* GLUI_Main::find_prev_control ( GLUI_Control control  )  [protected]

void GLUI_Main::create_standalone_window ( const char *  name,
int  x = -1,
int  y = -1 
) [protected]

void GLUI_Main::create_subwindow ( int  parent,
int  window_alignment 
) [protected]

void GLUI_Main::setup_default_glut_callbacks ( void   )  [protected]

void GLUI_Main::mouse ( int  button,
int  state,
int  x,
int  y 
) [protected]

void GLUI_Main::keyboard ( unsigned char  key,
int  x,
int  y 
) [protected]

void GLUI_Main::special ( int  key,
int  x,
int  y 
) [protected]

void GLUI_Main::passive_motion ( int  x,
int  y 
) [protected]

void GLUI_Main::reshape ( int  w,
int  h 
) [protected]

void GLUI_Main::visibility ( int  state  )  [protected]

void GLUI_Main::motion ( int  x,
int  y 
) [protected]

void GLUI_Main::entry ( int  state  )  [protected]

void GLUI_Main::display ( void   )  [protected]

void GLUI_Main::idle ( void   )  [protected]

int GLUI_Main::needs_idle ( void   )  [protected]

virtual int GLUI_Main::add_control ( GLUI_Node parent,
GLUI_Control control 
) [protected, virtual]

Reimplemented in GLUI.

void GLUI_Main::adjust_glut_xy ( int &  x,
int &  y 
) [inline]

Definition at line 703 of file glui.h.

void GLUI_Main::activate_control ( GLUI_Control control,
int  how 
)

void GLUI_Main::align_controls ( GLUI_Control control  ) 

void GLUI_Main::deactivate_current_control ( void   ) 

void GLUI_Main::draw_raised_box ( int  x,
int  y,
int  w,
int  h 
)

Draw a 3D-look pushed-out box around this rectangle

void GLUI_Main::draw_lowered_box ( int  x,
int  y,
int  w,
int  h 
)

Draw a 3D-look pushed-in box around this rectangle

bool GLUI_Main::should_redraw_now ( GLUI_Control ctl  ) 

Return true if this control should redraw itself immediately (front buffer); Or queue up a redraw and return false if it shouldn't (back buffer).

int GLUI_Main::set_current_draw_buffer (  ) 

Switch to the appropriate draw buffer now. Returns the old draw buffer. This routine should probably only be called from inside the GLUI_DrawingSentinal, in glui_internal_control.h

void GLUI_Main::restore_draw_buffer ( int  buffer_state  ) 

Go back to using this draw buffer. Undoes set_current_draw_buffer.

void GLUI_Main::refresh (  ) 

Pack, resize the window, and redraw all the controls.

void GLUI_Main::post_update_main_gfx (  ) 

Redraw the main graphics window

void GLUI_Main::pack_controls (  ) 

Recompute the sizes and positions of all controls

void GLUI_Main::close_internal (  ) 

void GLUI_Main::check_subwindow_position (  ) 

void GLUI_Main::set_ortho_projection (  ) 

void GLUI_Main::set_viewport (  ) 

int GLUI_Main::get_glut_window_id ( void   )  [inline]

Reimplemented in GLUI.

Definition at line 739 of file glui.h.


Friends And Related Function Documentation

friend class GLUI_Control [friend]

Definition at line 611 of file glui.h.

friend class GLUI_Rotation [friend]

Definition at line 612 of file glui.h.

friend class GLUI_Translation [friend]

Definition at line 613 of file glui.h.

friend class GLUI [friend]

Definition at line 614 of file glui.h.

friend class GLUI_Master_Object [friend]

Definition at line 615 of file glui.h.

void glui_mouse_func ( int  button,
int  state,
int  x,
int  y 
) [friend]

void glui_keyboard_func ( unsigned char  key,
int  x,
int  y 
) [friend]

void glui_special_func ( int  key,
int  x,
int  y 
) [friend]

void glui_passive_motion_func ( int  x,
int  y 
) [friend]

void glui_reshape_func ( int  w,
int  h 
) [friend]

void glui_visibility_func ( int  state  )  [friend]

void glui_motion_func ( int  x,
int  y 
) [friend]

void glui_entry_func ( int  state  )  [friend]

void glui_display_func ( void   )  [friend]

void glui_idle_func ( void   )  [friend]

void glui_parent_window_reshape_func ( int  w,
int  h 
) [friend]

void glui_parent_window_keyboard_func ( unsigned  char,
int  ,
int   
) [friend]

void glui_parent_window_special_func ( int  ,
int  ,
int   
) [friend]

void glui_parent_window_mouse_func ( int  ,
int  ,
int  ,
int   
) [friend]


Member Data Documentation

int GLUI_Main::main_gfx_window_id [protected]

Definition at line 637 of file glui.h.

int GLUI_Main::mouse_button_down [protected]

Definition at line 638 of file glui.h.

int GLUI_Main::glut_window_id [protected]

Definition at line 639 of file glui.h.

int GLUI_Main::top_level_glut_window_id [protected]

Definition at line 640 of file glui.h.

GLUI_Control* GLUI_Main::active_control [protected]

Definition at line 641 of file glui.h.

GLUI_Control* GLUI_Main::mouse_over_control [protected]

Definition at line 642 of file glui.h.

GLUI_Panel* GLUI_Main::main_panel [protected]

Definition at line 643 of file glui.h.

buffer_mode_t GLUI_Main::buffer_mode [protected]

Current drawing mode.

Definition at line 648 of file glui.h.

int GLUI_Main::curr_cursor [protected]

Definition at line 649 of file glui.h.

int GLUI_Main::w [protected]

Definition at line 650 of file glui.h.

int GLUI_Main::h [protected]

Definition at line 650 of file glui.h.

long GLUI_Main::flags [protected]

Definition at line 651 of file glui.h.

bool GLUI_Main::closing [protected]

Definition at line 652 of file glui.h.

int GLUI_Main::parent_window [protected]

Definition at line 653 of file glui.h.

int GLUI_Main::glui_id [protected]

Definition at line 654 of file glui.h.

void(* GLUI_Main::glut_mouse_CB)(int, int, int, int) [protected]

void(* GLUI_Main::glut_keyboard_CB)(unsigned char, int, int) [protected]

void(* GLUI_Main::glut_special_CB)(int, int, int) [protected]

void(* GLUI_Main::glut_reshape_CB)(int, int) [protected]

GLUI_StdBitmaps GLUI_Main::std_bitmaps

Definition at line 695 of file glui.h.

GLUI_String GLUI_Main::window_name

Definition at line 696 of file glui.h.

RGBc GLUI_Main::bkgd_color

Definition at line 697 of file glui.h.

float GLUI_Main::bkgd_color_f[3]

Definition at line 698 of file glui.h.

void* GLUI_Main::font

Definition at line 700 of file glui.h.

int GLUI_Main::curr_modifiers

Definition at line 701 of file glui.h.


The documentation for this class was generated from the following file:
Generated on Thu Aug 30 11:04:43 2007 for SPRING Mac by  doxygen 1.5.3