#include <PropPageFrame.h>
Inheritance diagram for TreePropSheet::CPropPageFrame:
Public Member Functions | |
CPropPageFrame () | |
virtual | ~CPropPageFrame () |
virtual BOOL | Create (DWORD dwWindowStyle, const RECT &rect, CWnd *pwndParent, UINT nID)=0 |
virtual CWnd * | GetWnd ()=0 |
virtual void | ShowCaption (BOOL bEnable) |
BOOL | GetShowCaption () const |
virtual void | SetCaptionHeight (int nCaptionHeight) |
int | GetCaptionHeight () const |
virtual void | SetCaption (LPCTSTR lpszCaption, HICON hIcon=NULL) |
CString | GetCaption (HICON *pIcon=NULL) const |
virtual void | SetMsgText (LPCTSTR lpszMsg) |
CString | GetMsgText () const |
virtual void | SetMsgFormat (DWORD dwFormat) |
DWORD | GetMsgFormat () const |
Protected Member Functions | |
virtual void | Draw (CDC *pDc) |
virtual CRect | CalcMsgArea () |
virtual void | DrawMsg (CDC *pDc, CRect rect, LPCTSTR lpszMsg, DWORD dwFormat) |
virtual CRect | CalcCaptionArea () |
virtual void | DrawCaption (CDC *pDc, CRect rect, LPCTSTR lpszCaption, HICON hIcon) |
void | SafeUpdateWindow (LPCRECT lpRect=NULL) |
Derived classes have to implement at least the Create() and the GetWnd() method, which returns a pointer to the CWnd-obect of the window, that has been created by the call to the Create() method. An implementation can provide the CWnd-object by using it as a property or by deriving from CWnd or a more specialiced class. This way has been choosen instead of deriving CPropPageFrame from CWnd, to allow derived class to derive from more specialized classes than CWnd (i.e. CStatic, etc.). From the WM_PAINT-handler of your derived class you have to call the Draw()-method.
Most implementations will also implement the DrawCaption() and DrawMsg() methods, to provide custom drawing functionality.
Definition at line 53 of file PropPageFrame.h.
|
Calculates the caption area. The caption area is the rectangular range, the current page's caption should be drawn in. The caption can be enabled or disabled using the ShowCaption() method. This method should return an empty rect, if the caption is disabled. If the caption is enabled the height of the rect should be as large, as specified by the latest call to the SetCaptionHeight() method. The rectangle, returned by this method will be passed to the DrawCaption() method to draw the caption. If the caption is enabled currently, this default implementation returns a rectangle, that has the width of the client area and the height, specified by the latest call to SetCaptionHeight(), starting and y-position 0. If the caption is disabled at the moment, this method returns an empty rectangle with the width of the client area. Reimplemented in TreePropSheet::CPropPageFrameDefault. Definition at line 161 of file PropPageFrame.cpp. References GetCaptionHeight(), GetShowCaption(), and GetWnd(). Referenced by Draw(), SetCaption(), SetCaptionHeight(), and ShowCaption(). |
|
Calculates the area, the message, set by SetMsgText() should be displayed in. The returned rectangle (client coordinates) will be passed to DrawMsg(). This default implementation calls the CalcCaptionArea() method, substracts the returned rectangle from the client area and returns the result. Reimplemented in TreePropSheet::CPropPageFrameDefault. Definition at line 136 of file PropPageFrame.cpp. References GetCaptionHeight(), GetShowCaption(), and GetWnd(). Referenced by Draw(), SetMsgFormat(), and SetMsgText(). |
|
Has to create a window with the specified properties.
Implemented in TreePropSheet::CPropPageFrameDefault. |
|
Draws the whole frame including caption (if enabled) and message. This method calculates the rectangles for the message area and the caption area using the CalcMsgArea() and the CalcCaptionArea() methods, draws then the caption calling the DrawCaption() method (only if caption is enabled) and afterwards the message calling the DrawMsg() method. You should call this method from the WM_PAINT-handler of your derived class.
Definition at line 128 of file PropPageFrame.cpp. References CalcCaptionArea(), CalcMsgArea(), DrawCaption(), DrawMsg(), and GetShowCaption(). Referenced by TreePropSheet::CPropPageFrameDefault::OnPaint(). |
|
Draws the caption. This default implementation draws nothing.
Reimplemented in TreePropSheet::CPropPageFrameDefault. Definition at line 176 of file PropPageFrame.cpp. Referenced by Draw(). |
|
Draws the message with the specified format. This default implementation draws the given msg using the specified properties.
Definition at line 149 of file PropPageFrame.cpp. References GetMsgFormat(), and GetMsgText(). Referenced by Draw(). |
|
Returns the caption, that has been set most recently using the SetCaption() method.
Definition at line 78 of file PropPageFrame.cpp. |
|
Returns the caption height, that has been most recently set by a call to the SetCaptionHeight() method. Definition at line 93 of file PropPageFrame.cpp. Referenced by TreePropSheet::CPropPageFrameDefault::CalcCaptionArea(), CalcCaptionArea(), TreePropSheet::CPropPageFrameDefault::CalcMsgArea(), and CalcMsgArea(). |
|
Returns the format to draw the text with, set by SetMsgText().
Definition at line 119 of file PropPageFrame.cpp. Referenced by DrawMsg(), and TreePropSheet::CTreePropSheet::SetEmptyPageTextFormat(). |
|
Returns the text currently displayed. Definition at line 106 of file PropPageFrame.cpp. Referenced by DrawMsg(). |
|
Returns TRUE if captions are enabled, FALSE otherwise. Definition at line 64 of file PropPageFrame.cpp. Referenced by TreePropSheet::CPropPageFrameDefault::CalcCaptionArea(), CalcCaptionArea(), TreePropSheet::CPropPageFrameDefault::CalcMsgArea(), CalcMsgArea(), Draw(), and TreePropSheet::CTreePropSheet::UpdateCaption(). |
|
Returns a pointer to the window object, that represents the frame. Implemented in TreePropSheet::CPropPageFrameDefault. Referenced by CalcCaptionArea(), CalcMsgArea(), and SafeUpdateWindow(). |
|
If the m_hWnd property of the CWnd-object returend by GetWnd() specifies a valid window, this method will invalidate the specified rectangle, to schedule it for repaint, otherwise the method will return without doing anything.
Definition at line 185 of file PropPageFrame.cpp. References GetWnd(). Referenced by SetCaption(), SetCaptionHeight(), SetMsgFormat(), SetMsgText(), and ShowCaption(). |
|
Sets caption text an icon. This default implementation calls the SafeUpdateWindow() method with the caption rectangle, to force it to be redrawn.
Reimplemented in TreePropSheet::CPropPageFrameDefault. Definition at line 70 of file PropPageFrame.cpp. References CalcCaptionArea(), and SafeUpdateWindow(). Referenced by TreePropSheet::CPropPageFrameDefault::SetCaption(), and TreePropSheet::CTreePropSheet::UpdateCaption(). |
|
Sets the height of the caption in pixels. This value is ignored until the caption is enabled by ShowCaption(TRUE). This default implementation calls the SafeUpdateWindow() method with the caption rectangle, to force it to be redrawn. Definition at line 86 of file PropPageFrame.cpp. References CalcCaptionArea(), and SafeUpdateWindow(). |
|
Specifies the format to draw the text with, set by SetMsgText(). This default implementation calls the SafeUpdateWindow() method with the message rectangle, to force it to be redrawn.
Definition at line 112 of file PropPageFrame.cpp. References CalcMsgArea(), and SafeUpdateWindow(). Referenced by TreePropSheet::CTreePropSheet::SetEmptyPageTextFormat(). |
|
Sets the text to display. This default implementation calls the SafeUpdateWindow() method with the message rectangle, to force it to be redrawn. Definition at line 99 of file PropPageFrame.cpp. References CalcMsgArea(), and SafeUpdateWindow(). Referenced by TreePropSheet::CTreePropSheet::UpdateCaption(). |
|
Enables or disables page caption. This default implementation calls the SafeUpdateWindow() method with the caption rectangle, to force it to be redrawn. Definition at line 57 of file PropPageFrame.cpp. References CalcCaptionArea(), and SafeUpdateWindow(). |