#include <vgui_win32_window.h>
Public Member Functions | |
vgui_win32_window (HINSTANCE hInst, const char *appname, int width, int height, vgui_menu const &menubar, char const *title) | |
vgui_win32_window (HINSTANCE hInst, const char *appname, int width, int height, char const *title) | |
~vgui_win32_window () | |
HWND | getWindowHandle () |
HACCEL | getAccelHandle () |
virtual void | set_menubar (vgui_menu const &) |
Put the given menu in the menubar (if it exists). | |
virtual void | set_statusbar (bool) |
If true, activate the statusbar (if it exists). | |
virtual void | set_adaptor (vgui_adaptor *adaptor) |
Set the default adaptor (if it exists) to the given vgui_adaptor. | |
virtual vgui_adaptor * | get_adaptor () |
Get the default adaptor (if it exists). | |
virtual vgui_statusbar * | get_statusbar () |
Get the status bar (if it exists). | |
virtual void | show () |
Display the window. | |
virtual void | hide () |
Hide the window from view. | |
virtual void | iconify () |
Turn the window into an icon. | |
virtual void | enable_hscrollbar (bool) |
If true, activate horizontal scrollbar (if it exists). | |
virtual void | enable_vscrollbar (bool) |
If true, activate vertical scrollbar (if it exists). | |
virtual void | reshape (unsigned, unsigned) |
Change window shape to new given width and height. | |
virtual void | reposition (int, int) |
Move the window to the new given x,y position. | |
virtual void | set_title (vcl_string const &t) |
Use the given text as the window title (if the window has a title). | |
virtual int | set_hscrollbar (int pos) |
Set the position of the horizontal scrollbar, returns old position. | |
virtual int | set_vscrollbar (int pos) |
Set the position of the vertical scrollbar, returns old position. | |
virtual LRESULT | WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) |
virtual LRESULT | DefWndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) |
virtual BOOL | OnCmdMsg (UINT message, WPARAM wParam, LPARAM lParam) |
void | menu_dispatcher (int menuId) |
Protected Attributes | |
HWND | hwnd_ |
application window handle | |
HMENU | hMenu_ |
application menu handle | |
HACCEL | hAccel_ |
vcl_vector< vgui_command_sptr > | callbacks |
commands called by menu items | |
Private Member Functions | |
void | initWindow (HINSTANCE hInst, const char *appname, int width, int height, char const *title) |
Private Attributes | |
vgui_win32_adaptor * | adaptor_ |
vgui_win32_statusbar * | statusbar_ |
int | wx_ |
int | wy_ |
window position (wx, wy) | |
unsigned | cx_ |
unsigned | cy_ |
and client area size (cx, cy). | |
bool | first_show |
indicate if the member function show() is called for the first time |
Definition at line 21 of file vgui_win32_window.h.
vgui_win32_window::vgui_win32_window | ( | HINSTANCE | hInst, |
const char * | appname, | ||
int | width, | ||
int | height, | ||
vgui_menu const & | menubar, | ||
char const * | title | ||
) |
Definition at line 25 of file vgui_win32_window.cxx.
vgui_win32_window::vgui_win32_window | ( | HINSTANCE | hInst, |
const char * | appname, | ||
int | width, | ||
int | height, | ||
char const * | title | ||
) |
Definition at line 36 of file vgui_win32_window.cxx.
vgui_win32_window::~vgui_win32_window | ( | ) |
Definition at line 102 of file vgui_win32_window.cxx.
LRESULT vgui_win32_window::DefWndProc | ( | HWND | hwnd, |
UINT | message, | ||
WPARAM | wParam, | ||
LPARAM | lParam | ||
) | [virtual] |
Definition at line 19 of file vgui_win32_window.cxx.
void vgui_win32_window::enable_hscrollbar | ( | bool | b | ) | [virtual] |
If true, activate horizontal scrollbar (if it exists).
Reimplemented from vgui_window.
Definition at line 177 of file vgui_win32_window.cxx.
void vgui_win32_window::enable_vscrollbar | ( | bool | b | ) | [virtual] |
If true, activate vertical scrollbar (if it exists).
Reimplemented from vgui_window.
Definition at line 185 of file vgui_win32_window.cxx.
virtual vgui_adaptor* vgui_win32_window::get_adaptor | ( | void | ) | [inline, virtual] |
Get the default adaptor (if it exists).
Reimplemented from vgui_window.
Definition at line 49 of file vgui_win32_window.h.
virtual vgui_statusbar* vgui_win32_window::get_statusbar | ( | void | ) | [inline, virtual] |
Get the status bar (if it exists).
Reimplemented from vgui_window.
Definition at line 53 of file vgui_win32_window.h.
HACCEL vgui_win32_window::getAccelHandle | ( | ) | [inline] |
Definition at line 34 of file vgui_win32_window.h.
HWND vgui_win32_window::getWindowHandle | ( | ) | [inline] |
Definition at line 33 of file vgui_win32_window.h.
virtual void vgui_win32_window::hide | ( | ) | [inline, virtual] |
Hide the window from view.
Reimplemented from vgui_window.
Definition at line 61 of file vgui_win32_window.h.
virtual void vgui_win32_window::iconify | ( | ) | [inline, virtual] |
Turn the window into an icon.
Reimplemented from vgui_window.
Definition at line 65 of file vgui_win32_window.h.
void vgui_win32_window::initWindow | ( | HINSTANCE | hInst, |
const char * | appname, | ||
int | width, | ||
int | height, | ||
char const * | title | ||
) | [private] |
Definition at line 43 of file vgui_win32_window.cxx.
void vgui_win32_window::menu_dispatcher | ( | int | menuId | ) |
Definition at line 227 of file vgui_win32_window.cxx.
BOOL vgui_win32_window::OnCmdMsg | ( | UINT | message, |
WPARAM | wParam, | ||
LPARAM | lParam | ||
) | [virtual] |
Reimplemented from vgui_win32_cmdtarget.
Definition at line 238 of file vgui_win32_window.cxx.
void vgui_win32_window::reposition | ( | int | x, |
int | y | ||
) | [virtual] |
Move the window to the new given x,y position.
Reimplemented from vgui_window.
Definition at line 143 of file vgui_win32_window.cxx.
void vgui_win32_window::reshape | ( | unsigned | w, |
unsigned | h | ||
) | [virtual] |
Change window shape to new given width and height.
Reimplemented from vgui_window.
Definition at line 135 of file vgui_win32_window.cxx.
virtual void vgui_win32_window::set_adaptor | ( | vgui_adaptor * | adaptor | ) | [inline, virtual] |
Set the default adaptor (if it exists) to the given vgui_adaptor.
These refer to the default/current adaptor, if that makes sense. It is not a requirement that it should make sense.
Reimplemented from vgui_window.
Definition at line 45 of file vgui_win32_window.h.
int vgui_win32_window::set_hscrollbar | ( | int | pos | ) | [virtual] |
Set the position of the horizontal scrollbar, returns old position.
Reimplemented from vgui_window.
Definition at line 192 of file vgui_win32_window.cxx.
void vgui_win32_window::set_menubar | ( | vgui_menu const & | menu | ) | [virtual] |
Put the given menu in the menubar (if it exists).
Reimplemented from vgui_window.
Definition at line 151 of file vgui_win32_window.cxx.
void vgui_win32_window::set_statusbar | ( | bool | on | ) | [virtual] |
If true, activate the statusbar (if it exists).
Reimplemented from vgui_window.
Definition at line 169 of file vgui_win32_window.cxx.
virtual void vgui_win32_window::set_title | ( | vcl_string const & | t | ) | [inline, virtual] |
Use the given text as the window title (if the window has a title).
Reimplemented from vgui_window.
Definition at line 81 of file vgui_win32_window.h.
int vgui_win32_window::set_vscrollbar | ( | int | pos | ) | [virtual] |
Set the position of the vertical scrollbar, returns old position.
Reimplemented from vgui_window.
Definition at line 210 of file vgui_win32_window.cxx.
void vgui_win32_window::show | ( | ) | [virtual] |
Display the window.
Reimplemented from vgui_window.
Definition at line 115 of file vgui_win32_window.cxx.
LRESULT vgui_win32_window::WndProc | ( | HWND | hwnd, |
UINT | message, | ||
WPARAM | wParam, | ||
LPARAM | lParam | ||
) | [virtual] |
Definition at line 11 of file vgui_win32_window.cxx.
vgui_win32_adaptor* vgui_win32_window::adaptor_ [private] |
Definition at line 113 of file vgui_win32_window.h.
vcl_vector<vgui_command_sptr> vgui_win32_window::callbacks [protected] |
commands called by menu items
Definition at line 106 of file vgui_win32_window.h.
unsigned vgui_win32_window::cx_ [private] |
Definition at line 117 of file vgui_win32_window.h.
unsigned vgui_win32_window::cy_ [private] |
and client area size (cx, cy).
Definition at line 117 of file vgui_win32_window.h.
bool vgui_win32_window::first_show [private] |
indicate if the member function show() is called for the first time
Definition at line 118 of file vgui_win32_window.h.
HACCEL vgui_win32_window::hAccel_ [protected] |
Definition at line 105 of file vgui_win32_window.h.
HMENU vgui_win32_window::hMenu_ [protected] |
application menu handle
Definition at line 104 of file vgui_win32_window.h.
HWND vgui_win32_window::hwnd_ [protected] |
application window handle
Definition at line 103 of file vgui_win32_window.h.
Definition at line 114 of file vgui_win32_window.h.
int vgui_win32_window::wx_ [private] |
Definition at line 116 of file vgui_win32_window.h.
int vgui_win32_window::wy_ [private] |
window position (wx, wy)
Definition at line 116 of file vgui_win32_window.h.