#include <wg_view.h>
Inheritance diagram for wGui::CView:
A CView creates itself as a root window (it has no parent) and responds to APP_PAINT messages with itself or 0 as the destination, and will redraw all of it's children as well as itself Because of a limitation in SDL, there can be only one View
Definition at line 42 of file wg_view.h.
wGui::CView::CView | ( | const CRect & | Rect, | |
std::wstring | sTitle, | |||
bool | bResizable = true , |
|||
bool | bFullScreen = false | |||
) |
Rect | A CRect that defines the outer limits of the control | |
sTitle | The window title, which will appear in the title bar of the view | |
bResizable | If true, the window will be resizable (defaults to true) | |
bFullScreen | If true, the window will be created full-screen, and the bResizable parameter will be ignored (defaults to false) |
Definition at line 42 of file wg_view.cpp.
References wUtil::CLog::AddLogEntry(), wGui::CMessage::APP_DESTROY_FRAME, wGui::APP_LOG_INFO, wGui::CMessage::APP_PAINT, wGui::CMessage::CTRL_RESIZE, wGui::CWindow::Draw(), wGui::CApplication::GetApplicationLog(), wGui::CApplication::Instance(), wGui::CMessageServer::Instance(), wGui::CMessage::MOUSE_BUTTONDOWN, wGui::CMessage::MOUSE_BUTTONUP, wGui::CMessageServer::PRIORITY_FIRST, wGui::CMessageServer::RegisterMessageClient(), SetWindowRect(), and SetWindowText().
bool wGui::CView::IsResizable | ( | void | ) | const [inline] |
Indicates if the view is resizable (set in the constructor)
Definition at line 56 of file wg_view.h.
References m_bResizable.
bool wGui::CView::IsFullScreen | ( | void | ) | const [inline] |
Indicates id the view is fullscreen (set in the constructor)
Definition at line 60 of file wg_view.h.
References m_bFullScreen.
void wGui::CView::AttachMenu | ( | CMenu * | pMenu | ) |
Attaches a standard menu to the view, if the view already has a menu, the old menu will be deleted
pMenu | A pointer to the menu, the CView is then responsible for cleaning it up, passing in 0 will delete the current menu |
Definition at line 79 of file wg_view.cpp.
References wGui::CRect::ClipTo(), wGui::CWindow::GetWindowRect(), wGui::CRect::Height(), wGui::CWindow::m_ClientRect, m_pMenu, wGui::CWindow::m_WindowRect, wGui::CWindow::SetNewParent(), wGui::CRect::SetTop(), wGui::CWindow::SetWindowRect(), wGui::CRect::SizeRect(), and wGui::CRect::Width().
CMenu* wGui::CView::GetMenu | ( | void | ) | const [inline] |
void wGui::CView::SwitchMode | ( | const CRect & | WindowRect, | |
bool | bResizable, | |||
bool | bFullScreen | |||
) | [virtual] |
Switch from current mode to other mode ( resizable / fullscreen )
WindowRect | The rectangle that specifies the size of the view | |
bResizable | If true, the window will be resizable (defaults to true) | |
bFullScreen | If true, the window will be created full-screen, and the bResizable parameter will be ignored (defaults to false) |
Definition at line 127 of file wg_view.cpp.
References m_bFullScreen, m_bResizable, and SetWindowRect().
void wGui::CView::SetFloatingWindow | ( | CWindow * | pWindow | ) | [inline] |
Sets the current floating window, which will be drawn on top of all other controls
pWindow | A pointer to the window to set as the floating window |
Definition at line 78 of file wg_view.h.
References m_pFloatingWindow.
Referenced by wGui::CPopupMenu::Hide(), wGui::CDropDown::HideListBox(), wGui::CPopupMenu::Show(), and wGui::CDropDown::ShowListBox().
CWindow* wGui::CView::GetFloatingWindow | ( | void | ) | const [inline] |
Gets teh current floating window
Definition at line 82 of file wg_view.h.
References m_pFloatingWindow.
Referenced by wGui::CToolTip::HandleMessage(), wGui::CTextBox::HandleMessage(), wGui::CEditBox::HandleMessage(), wGui::CPopupMenu::Hide(), and wGui::CDropDown::HideListBox().
void wGui::CView::SetWindowText | ( | const std::wstring & | sText | ) | [virtual] |
Set the WindowText of the view, which is used as the window caption
sText | The text to assign to the view |
Reimplemented from wGui::CWindow.
Definition at line 98 of file wg_view.cpp.
References wGui::CWindow::m_sWindowText, wGui::CWindow::SetWindowText(), and stdex::ToMbString().
Referenced by CView().
void wGui::CView::SetWindowRect | ( | const CRect & | WindowRect | ) | [virtual] |
Set the WindowRect of the view, which is the size of the view ( it recreates the SDL_surface )
WindowRect | The rectangle that specifies the size of the view |
Reimplemented from wGui::CWindow.
Definition at line 105 of file wg_view.cpp.
References wGui::CApplication::GetBitsPerPixel(), wGui::CRect::Height(), wGui::CApplication::Instance(), m_bFullScreen, m_bResizable, wGui::CWindow::m_ClientRect, m_pScreenSurface, wGui::CWindow::m_WindowRect, wGui::CWindow::SetWindowRect(), stdex::ToWString(), and wGui::CRect::Width().
Referenced by CView(), and SwitchMode().