class WXDLLEXPORT wxWindow : public wxWindowBase
{
- DECLARE_DYNAMIC_CLASS(wxWindow);
-
public:
wxWindow() { Init(); }
// event handlers
// --------------
+ void OnSetFocus(wxFocusEvent& rEvent);
void OnEraseBackground(wxEraseEvent& rEvent);
void OnIdle(wxIdleEvent& rEvent);
void UnpackActivate( WXWPARAM wParam
,WXLPARAM lParam
,WXWORD* pState
- ,WXWORD* pMinimized
,WXHWND* pHwnd
);
void UnpackScroll( WXWPARAM wParam
,WXWORD* pPos
,WXHWND* pHwnd
);
- void UnpackCtlColor( WXWPARAM wParam
- ,WXLPARAM lParam
- ,WXWORD* pCtlColor
- ,WXHDC* pHdc
- ,WXHWND* pHwnd
- );
void UnpackMenuSelect( WXWPARAM wParam
,WXLPARAM lParam
,WXWORD* pTtem
,WXHWND control
);
- virtual bool OS2OnNotify( int nIdCtrl
- ,WXLPARAM lParam
- ,WXLPARAM* pResult
- );
-
// owner-drawn controls need to process these messages
virtual bool OS2OnDrawItem( int nId
,WXDRAWITEMSTRUCT* pItem
,int nY
,WXUINT uFlag
);
- bool HandleGetMinMaxInfo(void* pMmInfo);
+ bool HandleGetMinMaxInfo(PSWP pMmInfo);
bool HandleShow( bool bShow
,int nStatus
);
bool HandleActivate( int nFlag
- ,bool bMinimized
,WXHWND hActivate
);
bool HandleCommand( WXWORD nId
bool HandleSysCommand( WXWPARAM wParam
,WXLPARAM lParam
);
- bool HandleCtlColor( WXHBRUSH* phBrush
- ,WXHDC hDc
- ,WXHWND hWnd
- ,WXUINT uCtlColor
- ,WXUINT uMessage
- ,WXWPARAM wParam
- ,WXLPARAM lParam
- );
- bool HandlePaletteChanged(WXHWND hWndPalChange);
- bool HandleQueryNewPalette(void);
+ bool HandleWindowParams( PWNDPARAMS pParams
+ ,WXLPARAM lParam
+ );
+ bool HandlePaletteChanged();
+ bool HandlePresParamChanged(WXWPARAM wParam);
bool HandleSysColorChange(void);
- bool HandleQueryEndSession( long lLogOff
- ,bool* pbMayEnd
- );
- bool HandleEndSession( bool bEndSession
- ,long lLogOff
- );
+ bool HandleCtlColor(WXHBRUSH* hBrush);
bool HandleSetFocus(WXHWND hWnd);
bool HandleKillFocus(WXHWND hWnd);
- bool HandleDropFiles(WXWPARAM wParam);
+ bool HandleEndDrag(WXWPARAM wParam);
bool HandleMouseEvent( WXUINT uMsg
,int nX
,int nY
,WXLPARAM lParam
);
bool HandleQueryDragIcon(WXHICON* phIcon);
- bool HandleSetCursor( WXHWND hWnd
- ,short nHitTest
- ,int nMouseMsg
+ bool HandleSetCursor( USHORT vId
+ ,WXHWND hWnd
);
// Window procedure
- virtual MRESULT OS2WindowProc( HWND hwnd
- ,WXUINT uMsg
+ virtual MRESULT OS2WindowProc( WXUINT uMsg
,WXWPARAM wParam
,WXLPARAM lParam
);
// Calls an appropriate default window procedure
- virtual MRESULT OS2DefWindowProc( HWND hwnd
- ,WXUINT uMsg
+ virtual MRESULT OS2DefWindowProc( WXUINT uMsg
,WXWPARAM wParam
,WXLPARAM lParam
);
);
protected:
+ // PM can't create some MSW styles natively but can perform these after
+ // creation by sending messages
+ typedef enum extra_flags { kFrameToolWindow = 0x0001
+ ,kVertCaption = 0x0002
+ ,kHorzCaption = 0x0004
+ } EExtraFlags;
+ // Some internal sizeing id's to make it easy for event handlers
+ typedef enum size_types { kSizeNormal
+ ,kSizeMax
+ ,kSizeMin
+ } ESizeTypes;
// the window handle
WXHWND m_hWnd;
#endif // wxUSE_MOUSEEVENT_HACK
WXHMENU m_hMenu; // Menu, if any
+ unsigned long m_ulMenubarId; // it's Id, if any
// the return value of WM_GETDLGCODE handler
long m_lDlgCode;
,int nHeight
);
- // get the size which best suits the window: e.g., for a static text it
- // will be the width and height of the text
- virtual wxSize DoGetBestSize(void);
-
// move the window to the specified location and resize it: this is called
// from both DoSetSize() and DoSetClientSize() and would usually just call
// ::MoveWindow() except for composite controls which will want to arrange
,WXLPARAM lParam
,WXLPARAM* pResult
);
+ // the helper functions used by HandleChar/KeyXXX methods
+ wxKeyEvent CreateKeyEvent(wxEventType evType, int id, WXLPARAM lp) const;
+
+ DECLARE_DYNAMIC_CLASS(wxWindow);
DECLARE_NO_COPY_CLASS(wxWindow);
DECLARE_EVENT_TABLE()
private:
// Virtual function hiding supression
inline virtual bool Reparent(wxWindowBase* pNewParent)
{ return(wxWindowBase::Reparent(pNewParent));};
-};
+}; // end of wxWindow
// ---------------------------------------------------------------------------
// global functions