#include <vgui_win32_adaptor.h>
Public Types | |
typedef vgui_adaptor_mixin | mixin |
Public Member Functions | |
vgui_win32_adaptor (HWND hwnd, vgui_window *win=0) | |
~vgui_win32_adaptor () | |
void | set_width (unsigned w) |
void | set_height (unsigned h) |
virtual unsigned | get_width () const |
Return width of rendering area. | |
virtual unsigned | get_height () const |
Return height of rendering area. | |
virtual void | post_timer (float tm, int id) |
virtual void | post_redraw () |
Redraw the rendering area. | |
virtual void | post_overlay_redraw () |
virtual void | post_idle_request () |
virtual void | post_destroy () |
virtual void | kill_timer (int timer) |
kill an existing timer. | |
virtual void | bind_popups (vgui_modifier m, vgui_button b) |
Bind the given modifier/button combination to the popup menu. | |
virtual void | get_popup_bindings (vgui_modifier &m, vgui_button &b) const |
Return the modifier/button which pops up the popup menu. | |
virtual vgui_window * | get_window () const |
virtual void | swap_buffers () |
virtual void | make_current () |
virtual BOOL | OnCmdMsg (UINT message, WPARAM wParam, LPARAM lParam) |
void | menu_dispatcher (int menuId) |
void | OnCreate () |
void | OnSize (WPARAM wParam, LPARAM lParam) |
void | OnPaint () |
void | OnTimer (WPARAM wParam, LPARAM lParam) |
void | OnHScroll (UINT message, WPARAM wParam, LPARAM lParam) |
void | OnVScroll (UINT message, WPARAM wParam, LPARAM lParam) |
void | OnKeyDown (WPARAM wParam, LPARAM lParam) |
void | OnKeyUp (WPARAM wParam, LPARAM lParam) |
void | OnLButtonDown (WPARAM wParam, LPARAM lParam) |
void | OnLButtonUp (WPARAM wParam, LPARAM lParam) |
void | OnMButtonDown (WPARAM wParam, LPARAM lParam) |
void | OnMButtonUp (WPARAM wParam, LPARAM lParam) |
void | OnRButtonDown (WPARAM wParam, LPARAM lParam) |
void | OnRButtonUp (WPARAM wParam, LPARAM lParam) |
void | OnMouseMove (WPARAM wParam, LPARAM lParam) |
void | OnMouseWheel (WPARAM wParam, LPARAM lParam) |
vgui_tableau_sptr | get_tableau () const |
Get the vgui_tableau associated with this vgui_adaptor. | |
void | set_tableau (vgui_tableau_sptr const &t) |
Set the vgui_tableau associated with this vgui_adaptor. | |
void | set_double_buffering (bool b) |
True to use double buffering, false to not use it. | |
vgui_menu | get_total_popup (vgui_popup_params &) const |
Return the concatenation of the adaptor's menu with the tableau's menu. | |
void | config_dialog () |
Pop up a dialog for changing the popup modifier and button bindings. | |
vgui_menu & | get_popup () |
Return the popup menu for this adaptor. | |
void | set_popup (vgui_menu const &m) |
Set the popup menu for this adaptor. | |
void | include_in_popup (vgui_menu const &m) |
Add the given menu to the popup menu for this adaptor. | |
bool | dispatch_to_tableau (vgui_event const &) |
Dispatches the given event to the tableau. | |
int | post_timer (float) |
virtual void | post_message (char const *, void const *) |
Public Attributes | |
unsigned | width |
Cached width of adaptor render area. | |
unsigned | height |
Cached height of adaptor render area. | |
vgui_button | popup_button |
Mouse button (used with popup_modifier) which causes the popup menu to appear. | |
vgui_modifier | popup_modifier |
Modifier (used with popup_button) which causes the popup menu to appear. | |
Static Public Attributes | |
static vgui_DLLDATA vgui_adaptor * | current = 0 |
This static datum points to the adaptor that last received a mouse event. | |
Protected Member Functions | |
vgui_event | translate_message (WPARAM wParam, LPARAM lParam, vgui_event_type evtype=vgui_EVENT_NULL) |
void | translate_key (UINT nChar, UINT nFlags, int *key, int *ascii_char) |
void | domouse (vgui_event_type t, vgui_button b, UINT nFlags, int x, int y) |
Protected Attributes | |
HWND | hwnd_ |
HGLRC | hglrc_ |
HDC | hdc_ |
int | tid_ |
vgui_window * | win_ |
vcl_map< unsigned int, vgui_win32_internal_timer > | timers_ |
vcl_vector< vgui_command_sptr > | popup_callbacks |
bool | nested_popups |
Parameters controlling the popup menu style. | |
bool | default_items |
bool | use_double_buffering |
Whether or not to use double buffering. | |
Static Protected Attributes | |
static vgui_menu | last_popup |
Private Member Functions | |
HGLRC | setup_for_gl (HDC) |
Private Attributes | |
bool | redraw_posted_ |
bool | overlay_redraw_posted_ |
bool | idle_request_posted_ |
Definition at line 26 of file vgui_win32_adaptor.h.
Definition at line 30 of file vgui_win32_adaptor.h.
vgui_win32_adaptor::vgui_win32_adaptor | ( | HWND | hwnd, |
vgui_window * | win = 0 |
||
) |
Definition at line 22 of file vgui_win32_adaptor.cxx.
vgui_win32_adaptor::~vgui_win32_adaptor | ( | ) |
Definition at line 35 of file vgui_win32_adaptor.cxx.
virtual void vgui_win32_adaptor::bind_popups | ( | vgui_modifier | , |
vgui_button | |||
) | [inline, virtual] |
Bind the given modifier/button combination to the popup menu.
Reimplemented from vgui_adaptor.
Definition at line 63 of file vgui_win32_adaptor.h.
void vgui_adaptor::config_dialog | ( | ) | [inherited] |
Pop up a dialog for changing the popup modifier and button bindings.
Pops up a dialog for changing the popup modifier and button bindings.
Definition at line 102 of file vgui_adaptor.cxx.
bool vgui_adaptor::dispatch_to_tableau | ( | vgui_event const & | e | ) | [inherited] |
Dispatches the given event to the tableau.
This method performs various checks which can be performed generically for all tableaux. It is not the responsibility of this method to take care of overlay handling - the derived class must sort that out.
This method performs various checks which can be performed generically for all tableaux. It is not the responsibility of this method to take care of overlay handling - the derived class must sort that out. The derived class must also ensure that the correct draw buffer is set.
Reimplemented in vgui_qt_adaptor, and vgui_qt_adaptor.
Definition at line 182 of file vgui_adaptor.cxx.
void vgui_win32_adaptor::domouse | ( | vgui_event_type | t, |
vgui_button | b, | ||
UINT | nFlags, | ||
int | x, | ||
int | y | ||
) | [protected] |
Definition at line 629 of file vgui_win32_adaptor.cxx.
virtual unsigned vgui_win32_adaptor::get_height | ( | ) | const [inline, virtual] |
Return height of rendering area.
*Not* the height of the viewport. There seems to be no OpenGL mechanism for doing this.
Implements vgui_adaptor.
Definition at line 44 of file vgui_win32_adaptor.h.
vgui_menu& vgui_adaptor::get_popup | ( | ) | [inline, inherited] |
Return the popup menu for this adaptor.
Reimplemented in vgui_mfc_adaptor, vgui_qt_adaptor, vgui_qt_adaptor, vgui_gtk2_adaptor, and vgui_gtk_adaptor.
Definition at line 75 of file vgui_adaptor.h.
virtual void vgui_win32_adaptor::get_popup_bindings | ( | vgui_modifier & | , |
vgui_button & | |||
) | const [inline, virtual] |
Return the modifier/button which pops up the popup menu.
Reimplemented from vgui_adaptor.
Definition at line 67 of file vgui_win32_adaptor.h.
vgui_tableau_sptr vgui_adaptor::get_tableau | ( | ) | const [inherited] |
Get the vgui_tableau associated with this vgui_adaptor.
Get the vgui_tableau associated with this adaptor.
Definition at line 64 of file vgui_adaptor.cxx.
vgui_menu vgui_adaptor::get_total_popup | ( | vgui_popup_params & | params | ) | const [inherited] |
Return the concatenation of the adaptor's menu with the tableau's menu.
Returns concatenation of the adaptor's menu with the tableau's menu.
Definition at line 78 of file vgui_adaptor.cxx.
virtual unsigned vgui_win32_adaptor::get_width | ( | ) | const [inline, virtual] |
Return width of rendering area.
*Not* the width of the viewport. There seems to be no OpenGL mechanism for doing this.
Implements vgui_adaptor.
Definition at line 41 of file vgui_win32_adaptor.h.
virtual vgui_window* vgui_win32_adaptor::get_window | ( | ) | const [inline, virtual] |
Reimplemented from vgui_adaptor.
Definition at line 72 of file vgui_win32_adaptor.h.
void vgui_adaptor::include_in_popup | ( | vgui_menu const & | m | ) | [inline, inherited] |
Add the given menu to the popup menu for this adaptor.
Definition at line 81 of file vgui_adaptor.h.
void vgui_win32_adaptor::kill_timer | ( | int | ) | [virtual] |
kill an existing timer.
Reimplemented from vgui_adaptor.
Definition at line 121 of file vgui_win32_adaptor.cxx.
virtual void vgui_win32_adaptor::make_current | ( | ) | [inline, virtual] |
Reimplemented from vgui_adaptor.
Definition at line 76 of file vgui_win32_adaptor.h.
void vgui_win32_adaptor::menu_dispatcher | ( | int | menuId | ) |
Definition at line 263 of file vgui_win32_adaptor.cxx.
BOOL vgui_win32_adaptor::OnCmdMsg | ( | UINT | message, |
WPARAM | wParam, | ||
LPARAM | lParam | ||
) | [virtual] |
Reimplemented from vgui_win32_cmdtarget.
Definition at line 199 of file vgui_win32_adaptor.cxx.
void vgui_win32_adaptor::OnCreate | ( | ) |
void vgui_win32_adaptor::OnHScroll | ( | UINT | message, |
WPARAM | wParam, | ||
LPARAM | lParam | ||
) |
Definition at line 346 of file vgui_win32_adaptor.cxx.
void vgui_win32_adaptor::OnKeyDown | ( | WPARAM | wParam, |
LPARAM | lParam | ||
) |
Definition at line 452 of file vgui_win32_adaptor.cxx.
void vgui_win32_adaptor::OnKeyUp | ( | WPARAM | wParam, |
LPARAM | lParam | ||
) |
Definition at line 462 of file vgui_win32_adaptor.cxx.
void vgui_win32_adaptor::OnLButtonDown | ( | WPARAM | wParam, |
LPARAM | lParam | ||
) |
Definition at line 472 of file vgui_win32_adaptor.cxx.
void vgui_win32_adaptor::OnLButtonUp | ( | WPARAM | wParam, |
LPARAM | lParam | ||
) |
Definition at line 477 of file vgui_win32_adaptor.cxx.
void vgui_win32_adaptor::OnMButtonDown | ( | WPARAM | wParam, |
LPARAM | lParam | ||
) |
Definition at line 482 of file vgui_win32_adaptor.cxx.
void vgui_win32_adaptor::OnMButtonUp | ( | WPARAM | wParam, |
LPARAM | lParam | ||
) |
Definition at line 487 of file vgui_win32_adaptor.cxx.
void vgui_win32_adaptor::OnMouseMove | ( | WPARAM | wParam, |
LPARAM | lParam | ||
) |
Definition at line 503 of file vgui_win32_adaptor.cxx.
void vgui_win32_adaptor::OnMouseWheel | ( | WPARAM | wParam, |
LPARAM | lParam | ||
) |
Definition at line 508 of file vgui_win32_adaptor.cxx.
void vgui_win32_adaptor::OnPaint | ( | ) |
Definition at line 316 of file vgui_win32_adaptor.cxx.
void vgui_win32_adaptor::OnRButtonDown | ( | WPARAM | wParam, |
LPARAM | lParam | ||
) |
Definition at line 492 of file vgui_win32_adaptor.cxx.
void vgui_win32_adaptor::OnRButtonUp | ( | WPARAM | wParam, |
LPARAM | lParam | ||
) |
Definition at line 497 of file vgui_win32_adaptor.cxx.
void vgui_win32_adaptor::OnSize | ( | WPARAM | wParam, |
LPARAM | lParam | ||
) |
Definition at line 273 of file vgui_win32_adaptor.cxx.
void vgui_win32_adaptor::OnTimer | ( | WPARAM | wParam, |
LPARAM | lParam | ||
) |
Definition at line 339 of file vgui_win32_adaptor.cxx.
void vgui_win32_adaptor::OnVScroll | ( | UINT | message, |
WPARAM | wParam, | ||
LPARAM | lParam | ||
) |
Definition at line 396 of file vgui_win32_adaptor.cxx.
void vgui_win32_adaptor::post_destroy | ( | void | ) | [virtual] |
Reimplemented from vgui_adaptor.
Definition at line 112 of file vgui_win32_adaptor.cxx.
void vgui_win32_adaptor::post_idle_request | ( | void | ) | [virtual] |
Reimplemented from vgui_adaptor.
Definition at line 104 of file vgui_win32_adaptor.cxx.
void vgui_adaptor::post_message | ( | char const * | , |
void const * | |||
) | [virtual, inherited] |
Reimplemented in vgui_wx_adaptor.
Definition at line 242 of file vgui_adaptor.cxx.
void vgui_win32_adaptor::post_overlay_redraw | ( | void | ) | [virtual] |
Implements vgui_adaptor.
Definition at line 91 of file vgui_win32_adaptor.cxx.
void vgui_win32_adaptor::post_redraw | ( | ) | [virtual] |
Redraw the rendering area.
Implements vgui_adaptor.
Definition at line 75 of file vgui_win32_adaptor.cxx.
void vgui_win32_adaptor::post_timer | ( | float | tm, |
int | id | ||
) | [virtual] |
Reimplemented from vgui_adaptor.
Definition at line 61 of file vgui_win32_adaptor.cxx.
int vgui_adaptor::post_timer | ( | float | t | ) | [inherited] |
Definition at line 266 of file vgui_adaptor.cxx.
void vgui_adaptor::set_double_buffering | ( | bool | b | ) | [inline, inherited] |
True to use double buffering, false to not use it.
Definition at line 66 of file vgui_adaptor.h.
void vgui_win32_adaptor::set_height | ( | unsigned | h | ) | [inline] |
Definition at line 38 of file vgui_win32_adaptor.h.
void vgui_adaptor::set_popup | ( | vgui_menu const & | m | ) | [inline, inherited] |
Set the popup menu for this adaptor.
Definition at line 78 of file vgui_adaptor.h.
void vgui_adaptor::set_tableau | ( | vgui_tableau_sptr const & | t | ) | [inherited] |
Set the vgui_tableau associated with this vgui_adaptor.
Set the vgui_tableau associated with this adaptor.
Definition at line 71 of file vgui_adaptor.cxx.
void vgui_win32_adaptor::set_width | ( | unsigned | w | ) | [inline] |
Definition at line 37 of file vgui_win32_adaptor.h.
HGLRC vgui_win32_adaptor::setup_for_gl | ( | HDC | hdc | ) | [private] |
Definition at line 132 of file vgui_win32_adaptor.cxx.
virtual void vgui_win32_adaptor::swap_buffers | ( | ) | [inline, virtual] |
Reimplemented from vgui_adaptor.
Definition at line 75 of file vgui_win32_adaptor.h.
void vgui_win32_adaptor::translate_key | ( | UINT | nChar, |
UINT | nFlags, | ||
int * | key, | ||
int * | ascii_char | ||
) | [protected] |
Definition at line 516 of file vgui_win32_adaptor.cxx.
vgui_event vgui_win32_adaptor::translate_message | ( | WPARAM | wParam, |
LPARAM | lParam, | ||
vgui_event_type | evtype = vgui_EVENT_NULL |
||
) | [protected] |
Definition at line 605 of file vgui_win32_adaptor.cxx.
vgui_adaptor * vgui_adaptor::current = 0 [static, inherited] |
This static datum points to the adaptor that last received a mouse event.
It is set to zero if its pointer receives a LEAVE event. It will often point to the adaptor which was current when a popup menu was triggered, which is often what one wants it for.
Definition at line 93 of file vgui_adaptor.h.
bool vgui_adaptor::default_items [protected, inherited] |
Definition at line 143 of file vgui_adaptor.h.
HDC vgui_win32_adaptor::hdc_ [protected] |
Definition at line 114 of file vgui_win32_adaptor.h.
unsigned vgui_adaptor_mixin::height [inherited] |
Cached height of adaptor render area.
Definition at line 29 of file vgui_adaptor_mixin.h.
HGLRC vgui_win32_adaptor::hglrc_ [protected] |
Definition at line 113 of file vgui_win32_adaptor.h.
HWND vgui_win32_adaptor::hwnd_ [protected] |
Definition at line 112 of file vgui_win32_adaptor.h.
bool vgui_win32_adaptor::idle_request_posted_ [private] |
Definition at line 135 of file vgui_win32_adaptor.h.
vgui_menu vgui_win32_adaptor::last_popup [static, protected] |
Definition at line 122 of file vgui_win32_adaptor.h.
bool vgui_adaptor::nested_popups [protected, inherited] |
Parameters controlling the popup menu style.
These are put onto a popup_params object and passed to tableau::get_popup()
Definition at line 142 of file vgui_adaptor.h.
bool vgui_win32_adaptor::overlay_redraw_posted_ [private] |
Definition at line 132 of file vgui_win32_adaptor.h.
vgui_button vgui_adaptor_mixin::popup_button [inherited] |
Mouse button (used with popup_modifier) which causes the popup menu to appear.
Definition at line 34 of file vgui_adaptor_mixin.h.
vcl_vector<vgui_command_sptr> vgui_win32_adaptor::popup_callbacks [protected] |
Definition at line 123 of file vgui_win32_adaptor.h.
vgui_modifier vgui_adaptor_mixin::popup_modifier [inherited] |
Modifier (used with popup_button) which causes the popup menu to appear.
Definition at line 36 of file vgui_adaptor_mixin.h.
bool vgui_win32_adaptor::redraw_posted_ [private] |
Definition at line 129 of file vgui_win32_adaptor.h.
int vgui_win32_adaptor::tid_ [protected] |
Definition at line 115 of file vgui_win32_adaptor.h.
vcl_map<unsigned int, vgui_win32_internal_timer> vgui_win32_adaptor::timers_ [protected] |
Definition at line 120 of file vgui_win32_adaptor.h.
bool vgui_adaptor::use_double_buffering [protected, inherited] |
Whether or not to use double buffering.
Definition at line 146 of file vgui_adaptor.h.
unsigned vgui_adaptor_mixin::width [inherited] |
Cached width of adaptor render area.
Definition at line 27 of file vgui_adaptor_mixin.h.
vgui_window* vgui_win32_adaptor::win_ [protected] |
Definition at line 117 of file vgui_win32_adaptor.h.