#include <vgui_mfc_view.h>
Inheritance diagram for vgui_mfc_view:

Definition at line 14 of file vgui_mfc_view.h.
Public Types | |
| typedef vgui_adaptor_mixin | mixin |
Public Member Functions | |
| CDocument * | GetDocument () |
| virtual void | OnDraw (CDC *pDC) |
| Called by MFC when a draw event is required - overridden to draw this view. | |
| virtual BOOL | PreCreateWindow (CREATESTRUCT &cs) |
| Called by MFC before the creation of the window attached to this object. | |
| virtual | ~vgui_mfc_view () |
| unsigned int | get_width () const |
| MFC implementation from vgui_adaptor - returns width of rendering area. | |
| unsigned int | get_height () const |
| MFC implementation from vgui_adaptor - returns height of rendering area. | |
| void | post_redraw () |
| MFC implementation from vgui_adaptor - redraws rendering area. | |
| void | post_overlay_redraw () |
| MFC implementation from vgui_adaptor - redraws overlay buffer. | |
| void | swap_buffers () |
| MFC impl. from vgui_adaptor - swap buffers if using double buffering. | |
| void | make_current () |
| MFC impl. from vgui_adaptor - make this the current GL rendering context. | |
| void | draw () |
| MFC implementation from vgui_adaptor - redraw everything now. | |
| bool | do_idle () |
| void | service_redraws () |
| Redraws the OpenGL area. | |
| void | set_default_popup (vgui_menu) |
| Change the default popup menu to the given one (not yet implemented). | |
| void | post_timer (float, int) |
| Sets timer to dispatch WM_TIMER event to a mainframe every time milliseconds. | |
| int | post_timer (float) |
| void | kill_timer (int id) |
| Stop timer. | |
| void | post_idle_request () |
| Flags than a child requests idle processing. | |
| vgui_menu | get_popup () |
| Return the default popup menu (not yet implemented). | |
| void | bind_popups (vgui_modifier m, vgui_button b) |
| MFC impl. from vgui_adaptor - set button & modifier to display popup. | |
| void | get_popup_bindings (vgui_modifier &m, vgui_button &b) const |
| MFC impl. from vgui_adaptor - get button & modifier which display popup. | |
| virtual vgui_window * | get_window () const |
| void | set_window (vgui_window *win) |
| void | setup_adaptor (CWnd *this_cwnd, HDC OldDC, HGLRC oldContext) |
| If your adaptor is not in the main window of the application call this function. | |
| 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. | |
| 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. | |
| virtual void | post_message (char const *, void const *) |
| virtual void | post_destroy () |
Public Attributes | |
| CDC * | m_pDC |
| Device context for this adaptor. | |
| HBITMAP | m_pDC_default_bitmap |
| 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_mfc_view () | |
| virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo) |
| virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo) |
| virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo) |
| afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct) |
| vgui_mfc_view message handlers. | |
| void | domouse (vgui_event_type e, UINT nFlags, CPoint point, vgui_button b) |
| Handles mouse press/release events. | |
| afx_msg void | OnDestroy () |
| Called by MFC when the main window has been destroyed. | |
| afx_msg void | OnPaint () |
| Called by MFC when the application requests part of the window is redrawn. | |
| afx_msg BOOL | OnEraseBkgnd (CDC *pDC) |
| Called by MFC when the background needs erasing. | |
| afx_msg void | OnSize (UINT nType, int cx, int cy) |
| Called by MFC when the application is resized. | |
| vgui_event | generate_vgui_event (UINT nChar, UINT nRepCnt, UINT nFlags, vgui_event_type evttype) |
| Create the corresponding vgui_event from an MFC event. | |
| afx_msg void | OnKeyDown (UINT nChar, UINT nRepCnt, UINT nFlags) |
| Called by MFC when a key is pressed inside the application. | |
| afx_msg void | OnKeyUp (UINT nChar, UINT nRepCnt, UINT nFlags) |
| Called by MFC when a key is released inside the application. | |
| afx_msg void | OnLButtonDown (UINT nFlags, CPoint point) |
| Called by MFC when the left mouse button is pressed inside the application. | |
| afx_msg void | OnLButtonUp (UINT nFlags, CPoint point) |
| Called by MFC when left mouse button is released inside the application. | |
| afx_msg void | OnMouseMove (UINT nFlags, CPoint point) |
| Called by MFC when the mouse is moved inside the application. | |
| afx_msg void | OnRButtonDown (UINT nFlags, CPoint point) |
| Called by MFC when right mouse button is pressed inside the application. | |
| afx_msg void | OnRButtonUp (UINT nFlags, CPoint point) |
| Called by MFC when right mouse button is released inside the application. | |
| afx_msg BOOL | OnMouseWheel (UINT nFlags, short zDelta, CPoint pt) |
| Called by MFC when a user rotates a mouse wheel. | |
| afx_msg void | OnMButtonDown (UINT nFlags, CPoint point) |
| Called by MFC when middle mouse button is pressed inside the application. | |
| afx_msg void | OnMButtonUp (UINT nFlags, CPoint point) |
| Called by MFC when middle mouse button is released inside the application. | |
Protected Attributes | |
| CWnd * | m_pCWnd |
| The window associated with this adaptor if it is not the main window. | |
| HDC | hOldDC |
| The previous device context to this one. | |
| HGLRC | hOldRC |
| The previous rendering context to this one. | |
| HGLRC | m_hRC |
| The Win-OpenGL resource context. | |
| int | m_width |
| Width of rendering area. | |
| int | m_height |
| Height of rendering area. | |
| vgui_window * | win_ |
| 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 |
|
|
Definition at line 66 of file vgui_mfc_adaptor.h. |
|
|
Definition at line 26 of file vgui_mfc_view.cxx. |
|
|
Definition at line 31 of file vgui_mfc_view.cxx. |
|
||||||||||||
|
MFC impl. from vgui_adaptor - set button & modifier to display popup.
Reimplemented from vgui_adaptor. Definition at line 116 of file vgui_mfc_adaptor.h. |
|
|
Pop up a dialog for changing the popup modifier and button bindings.
Definition at line 102 of file vgui_adaptor.cxx. |
|
|
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. Reimplemented in vgui_qt_adaptor, and vgui_qt_adaptor. Definition at line 182 of file vgui_adaptor.cxx. |
|
|
Definition at line 478 of file vgui_mfc_adaptor.cxx. |
|
||||||||||||||||||||
|
Handles mouse press/release events. Deals with right popup menu. 'point' is window coordinates whereas TrackPopup menu requires screen coordinates. So translate them into screen coordinates Definition at line 631 of file vgui_mfc_adaptor.cxx. |
|
|
MFC implementation from vgui_adaptor - redraw everything now.
Definition at line 472 of file vgui_mfc_adaptor.cxx. |
|
||||||||||||||||||||
|
Create the corresponding vgui_event from an MFC event.
Definition at line 589 of file vgui_mfc_adaptor.cxx. |
|
|
MFC implementation from vgui_adaptor - returns height of rendering area.
Implements vgui_adaptor. Definition at line 74 of file vgui_mfc_adaptor.h. |
|
|
Return the default popup menu (not yet implemented).
Reimplemented from vgui_adaptor. Definition at line 178 of file vgui_mfc_adaptor.cxx. |
|
||||||||||||
|
MFC impl. from vgui_adaptor - get button & modifier which display popup.
Reimplemented from vgui_adaptor. Definition at line 122 of file vgui_mfc_adaptor.h. |
|
|
Get the vgui_tableau associated with this vgui_adaptor.
Definition at line 64 of file vgui_adaptor.cxx. |
|
|
Return the concatenation of the adaptor's menu with the tableau's menu.
Definition at line 78 of file vgui_adaptor.cxx. |
|
|
MFC implementation from vgui_adaptor - returns width of rendering area.
Implements vgui_adaptor. Definition at line 71 of file vgui_mfc_adaptor.h. |
|
|
Reimplemented from vgui_adaptor. Definition at line 127 of file vgui_mfc_adaptor.h. |
|
|
Definition at line 56 of file vgui_mfc_view.h. |
|
|
Add the given menu to the popup menu for this adaptor.
Definition at line 80 of file vgui_adaptor.h. |
|
|
Stop timer.
Reimplemented from vgui_adaptor. Definition at line 450 of file vgui_mfc_adaptor.cxx. |
|
|
MFC impl. from vgui_adaptor - make this the current GL rendering context.
Reimplemented from vgui_adaptor. Definition at line 159 of file vgui_mfc_adaptor.cxx. |
|
||||||||||||
|
Definition at line 63 of file vgui_mfc_view.cxx. |
|
|
vgui_mfc_view message handlers.
Reimplemented from vgui_mfc_adaptor. Definition at line 96 of file vgui_mfc_view.cxx. |
|
|
Called by MFC when the main window has been destroyed. Note, this function is not called when your adaptor is destroyed inside a non-main window (eg. a dialog box). Definition at line 358 of file vgui_mfc_adaptor.cxx. |
|
|
Called by MFC when a draw event is required - overridden to draw this view.
Reimplemented from vgui_mfc_adaptor. Definition at line 46 of file vgui_mfc_view.cxx. |
|
||||||||||||
|
Definition at line 68 of file vgui_mfc_view.cxx. |
|
|
Called by MFC when the background needs erasing. For example this would be called if the window was resized. Definition at line 366 of file vgui_mfc_adaptor.cxx. |
|
||||||||||||||||
|
Called by MFC when a key is pressed inside the application.
Definition at line 609 of file vgui_mfc_adaptor.cxx. |
|
||||||||||||||||
|
Called by MFC when a key is released inside the application.
Definition at line 620 of file vgui_mfc_adaptor.cxx. |
|
||||||||||||
|
Called by MFC when the left mouse button is pressed inside the application.
Definition at line 686 of file vgui_mfc_adaptor.cxx. |
|
||||||||||||
|
Called by MFC when left mouse button is released inside the application.
Definition at line 692 of file vgui_mfc_adaptor.cxx. |
|
||||||||||||
|
Called by MFC when middle mouse button is pressed inside the application.
Definition at line 698 of file vgui_mfc_adaptor.cxx. |
|
||||||||||||
|
Called by MFC when middle mouse button is released inside the application.
Definition at line 704 of file vgui_mfc_adaptor.cxx. |
|
||||||||||||
|
Called by MFC when the mouse is moved inside the application.
Definition at line 722 of file vgui_mfc_adaptor.cxx. |
|
||||||||||||||||
|
Called by MFC when a user rotates a mouse wheel.
Definition at line 728 of file vgui_mfc_adaptor.cxx. |
|
|
Called by MFC when the application requests part of the window is redrawn.
Definition at line 487 of file vgui_mfc_adaptor.cxx. |
|
|
Definition at line 57 of file vgui_mfc_view.cxx. |
|
||||||||||||
|
Called by MFC when right mouse button is pressed inside the application.
Definition at line 710 of file vgui_mfc_adaptor.cxx. |
|
||||||||||||
|
Called by MFC when right mouse button is released inside the application.
Definition at line 716 of file vgui_mfc_adaptor.cxx. |
|
||||||||||||||||
|
Called by MFC when the application is resized.
Definition at line 493 of file vgui_mfc_adaptor.cxx. |
|
|
Reimplemented in vgui_glut_adaptor, vgui_gtk_adaptor, vgui_gtk2_adaptor, and vgui_wx_adaptor. Definition at line 274 of file vgui_adaptor.cxx. |
|
|
Flags than a child requests idle processing.
Reimplemented from vgui_adaptor. Definition at line 110 of file vgui_mfc_adaptor.h. |
|
||||||||||||
|
Reimplemented in vgui_wx_adaptor. Definition at line 242 of file vgui_adaptor.cxx. |
|
|
MFC implementation from vgui_adaptor - redraws overlay buffer.
Implements vgui_adaptor. Definition at line 126 of file vgui_mfc_adaptor.cxx. |
|
|
MFC implementation from vgui_adaptor - redraws rendering area.
Implements vgui_adaptor. Definition at line 142 of file vgui_mfc_adaptor.cxx. |
|
|
Definition at line 266 of file vgui_adaptor.cxx. |
|
||||||||||||
|
Sets timer to dispatch WM_TIMER event to a mainframe every time milliseconds.
Reimplemented from vgui_adaptor. Definition at line 439 of file vgui_mfc_adaptor.cxx. |
|
|
Called by MFC before the creation of the window attached to this object.
Reimplemented from vgui_mfc_adaptor. Definition at line 35 of file vgui_mfc_view.cxx. |
|
|
Redraws the OpenGL area.
Definition at line 373 of file vgui_mfc_adaptor.cxx. |
|
|
Change the default popup menu to the given one (not yet implemented).
Definition at line 172 of file vgui_mfc_adaptor.cxx. |
|
|
True to use double buffering, false to not use it.
Definition at line 65 of file vgui_adaptor.h. |
|
|
Set the popup menu for this adaptor.
Definition at line 77 of file vgui_adaptor.h. |
|
|
Set the vgui_tableau associated with this vgui_adaptor.
Definition at line 71 of file vgui_adaptor.cxx. |
|
|
Definition at line 128 of file vgui_mfc_adaptor.h. |
|
||||||||||||||||
|
If your adaptor is not in the main window of the application call this function. The first parameter tells it which window this adaptor is associated with, the other parameters are so we can go back to our old rendering context when this adaptor is deleted. Definition at line 187 of file vgui_mfc_adaptor.cxx. |
|
|
MFC impl. from vgui_adaptor - swap buffers if using double buffering.
Reimplemented from vgui_adaptor. Definition at line 165 of file vgui_mfc_adaptor.cxx. |
|
|
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 92 of file vgui_adaptor.h. |
|
|
Definition at line 142 of file vgui_adaptor.h. |
|
|
Cached height of adaptor render area.
Definition at line 29 of file vgui_adaptor_mixin.h. |
|
|
The previous device context to this one.
Definition at line 168 of file vgui_mfc_adaptor.h. |
|
|
The previous rendering context to this one.
Definition at line 171 of file vgui_mfc_adaptor.h. |
|
|
Definition at line 207 of file vgui_mfc_adaptor.h. |
|
|
Height of rendering area.
Definition at line 203 of file vgui_mfc_adaptor.h. |
|
|
The Win-OpenGL resource context.
Definition at line 197 of file vgui_mfc_adaptor.h. |
|
|
The window associated with this adaptor if it is not the main window.
Definition at line 165 of file vgui_mfc_adaptor.h. |
|
|
Device context for this adaptor.
Definition at line 62 of file vgui_mfc_adaptor.h. |
|
|
Definition at line 64 of file vgui_mfc_adaptor.h. |
|
|
Width of rendering area.
Definition at line 200 of file vgui_mfc_adaptor.h. |
|
|
Parameters controlling the popup menu style. These are put onto a popup_params object and passed to tableau::get_popup() Definition at line 141 of file vgui_adaptor.h. |
|
|
Mouse button (used with popup_modifier) which causes the popup menu to appear.
Definition at line 34 of file vgui_adaptor_mixin.h. |
|
|
Modifier (used with popup_button) which causes the popup menu to appear.
Definition at line 36 of file vgui_adaptor_mixin.h. |
|
|
Whether or not to use double buffering.
Definition at line 145 of file vgui_adaptor.h. |
|
|
Cached width of adaptor render area.
Definition at line 27 of file vgui_adaptor_mixin.h. |
|
|
Definition at line 205 of file vgui_mfc_adaptor.h. |
1.4.4