Main Page Namespace List Class Hierarchy Compound List File List Namespace Members Compound Members Related Pages
sjgui::CWndCtrlBase Class ReferenceBase class for build in controls.
More...
#include <wndctrl.h>
Inheritance diagram for sjgui::CWndCtrlBase:
List of all members.
Detailed Description
Base class for build in controls.
Adds color information: background color, background color when selected, and color of the shadow for the control. It is a base class for widgets of gui, most of them do require this information. - Author:
- Alexander Shyrokov
- Version:
- Revision
- 1.1.1.1
Member Function Documentation
virtual void sjgui::CWndCtrlBase::OnUpdatePos |
( |
|
) |
[inline, protected, virtual] |
|
|
Updates position of the window.
Is called from UpdatePos() function. If you draw something on the screen and do not want to recalculate absolute position of the drawn primitives you can precalculate them using this function. Window is defined by position of the upper-left corner and widht with height. Position is relative to the parent window position, so to draw anything on the screen you would need to reset viewport or add parent positon to the current position, I decided to store absolute postion of the window also, so during the drawing I have exact values, but this means that if parent changes its position child windows should update their absolute positions too. That is why this function is implemented. Note that changing size should will require call of Reshape() to take an effect.
If you want original behavior of the base class to be preserved you should call it directly. For example if you derive your class directly from CWnd then you should put the following line at the top of your function: return CWnd::OnUpdatePos();
This function is called when you change position or size of the window. - See also:
- UpdatePos
Reimplemented from sjgui::CWnd. |
The documentation for this class was generated from the following file:
|
|