#define _WX_CHECKBOX_H_
#include "wx/control.h"
-
-WXDLLEXPORT_DATA(extern const char*) wxCheckBoxNameStr;
+ WXDLLEXPORT_DATA(extern const char*) wxCheckBoxNameStr;
// Checkbox item (single checkbox)
class WXDLLEXPORT wxBitmap;
class WXDLLEXPORT wxCheckBox : public wxCheckBoxBase
{
public:
- inline wxCheckBox() { }
- inline wxCheckBox(wxWindow *parent, wxWindowID id, const wxString& label,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize, long style = 0,
+ inline wxCheckBox() { }
+ inline wxCheckBox( wxWindow* pParent
+ ,wxWindowID vId
+ ,const wxString& rsLabel
+ ,const wxPoint& rPos = wxDefaultPosition
+ ,const wxSize& rSize = wxDefaultSize
+ ,long lStyle = 0
+#if wxUSE_VALIDATORS
+ ,const wxValidator& rValidator = wxDefaultValidator
+#endif
+ ,const wxString& rsName = wxCheckBoxNameStr
+ )
+ {
+ Create( pParent
+ ,vId
+ ,rsLabel
+ ,rPos
+ ,rSize
+ ,lStyle
#if wxUSE_VALIDATORS
- const wxValidator& validator = wxDefaultValidator,
+ ,rValidator
#endif
- const wxString& name = wxCheckBoxNameStr)
- {
- Create(parent, id, label, pos, size, style, validator, name);
- }
+ ,rsName
+ );
+ }
- bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize, long style = 0,
+ bool Create( wxWindow* pParent
+ ,wxWindowID vId
+ ,const wxString& rsLabel
+ ,const wxPoint& rPos = wxDefaultPosition
+ ,const wxSize& rSize = wxDefaultSize
+ ,long lStyle = 0
#if wxUSE_VALIDATORS
- const wxValidator& validator = wxDefaultValidator,
+ ,const wxValidator& rValidator = wxDefaultValidator
#endif
- const wxString& name = wxCheckBoxNameStr);
+ ,const wxString& rsName = wxCheckBoxNameStr
+ );
- virtual void SetValue(bool);
- virtual bool GetValue() const ;
+ virtual void SetValue(bool bValue);
+ virtual bool GetValue(void) const ;
- virtual bool OS2Command(WXUINT param, WXWORD id);
- virtual void SetLabel(const wxString& label);
- virtual void Command(wxCommandEvent& event);
- virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
- WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
+ virtual bool OS2Command( WXUINT uParam
+ ,WXWORD wId
+ );
+ virtual void SetLabel(const wxString& rsLabel);
+ virtual void Command(wxCommandEvent& rEvent);
protected:
- virtual wxSize DoGetBestSize() const;
+ virtual wxSize DoGetBestSize(void) const;
private:
DECLARE_DYNAMIC_CLASS(wxCheckBox)
};
class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
{
- DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox)
-
public:
- int checkWidth ;
- int checkHeight ;
- inline wxBitmapCheckBox() { checkWidth = -1; checkHeight = -1; }
- inline wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize, long style = 0,
+ inline wxBitmapCheckBox() { m_nCheckWidth = -1; m_nCheckHeight = -1; }
+ inline wxBitmapCheckBox( wxWindow* pParent
+ ,wxWindowID vId
+ ,const wxBitmap* pLabel
+ ,const wxPoint& rPos = wxDefaultPosition
+ ,const wxSize& rSize = wxDefaultSize
+ ,long lStyle = 0
#if wxUSE_VALIDATORS
- const wxValidator& validator = wxDefaultValidator,
+ ,const wxValidator& rValidator = wxDefaultValidator
#endif
- const wxString& name = wxCheckBoxNameStr)
- {
- Create(parent, id, label, pos, size, style, validator, name);
- }
+ ,const wxString& rsName = wxCheckBoxNameStr
+ )
+ {
+ Create( pParent
+ ,vId
+ ,pLabel
+ ,rPos
+ ,rSize
+ ,lStyle
+ ,rValidator
+ ,rsName
+ );
+ }
- bool Create(wxWindow *parent, wxWindowID id, const wxBitmap *bitmap,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize, long style = 0,
+ bool Create( wxWindow* pParent
+ ,wxWindowID vId
+ ,const wxBitmap* pLabel
+ ,const wxPoint& rPos = wxDefaultPosition
+ ,const wxSize& rSize = wxDefaultSize
+ ,long lStyle = 0
#if wxUSE_VALIDATORS
- const wxValidator& validator = wxDefaultValidator,
+ ,const wxValidator& rValidator = wxDefaultValidator
#endif
- const wxString& name = wxCheckBoxNameStr);
+ ,const wxString& rsName = wxCheckBoxNameStr
+ );
+
+ virtual void SetLabel(const wxBitmap& rBitmap);
+
+ int m_nCheckWidth;
+ int m_nCheckHeight;
- virtual void SetLabel(const wxBitmap& bitmap);
private:
- virtual void SetLabel(const wxString& string)
- { wxCheckBox::SetLabel(string); };
+
+ virtual void SetLabel(const wxString& rsString)
+ { wxCheckBox::SetLabel(rsString); };
+ DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox)
};
#endif
// _WX_CHECKBOX_H_
{
long lModalStyle = lStyle ? wxDIALOG_MODAL : wxDIALOG_MODELESS ;
- bModal = FALSE;
Create( pParent
,-1
,rsTitle
);
~wxDialog();
- virtual bool Destroy(void);
- virtual bool Show(bool bShow);
- virtual void Iconize(bool bIconize);
- virtual bool IsIconized(void) const;
-
- virtual bool IsTopLevel(void) const { return TRUE; }
-
- void SetModal(bool bFlag);
+ void SetModal(bool bFlag);
virtual bool IsModal(void) const;
- //
// For now, same as Show(TRUE) but returns return code
- //
- virtual int ShowModal(void);
- virtual void EndModal(int nRetCode);
+ virtual int ShowModal();
+
+ // may be called to terminate the dialog with the given return code
+ virtual void EndModal(int retCode);
//
// Returns TRUE if we're in a modal loop
//
- bool IsModalShowing() const;
-
-#if WXWIN_COMPATIBILITY
- bool Iconized() const { return IsIconized(); };
-#endif
+ bool IsModalShowing() const;
//
// Implementation only from now on
// -------------------------------
//
+ //
+ // Override some base class virtuals
+ //
+ virtual bool Show(bool bShow);
+
//
// Event handlers
//
void OnCharHook(wxKeyEvent& rEvent);
void OnCloseWindow(wxCloseEvent& rEvent);
- //
- // May be called to terminate the dialog with the given return code
- //
-
//
// Standard buttons
//
,WXWPARAM wParam
,WXLPARAM lParam
);
+
protected:
//
- // Override more base class virtuals
- //
- virtual void DoSetClientSize( int nWidth
- ,int nHeight
- );
- virtual void DoGetPosition( int* pnX
- ,int* pnY
- ) const;
- //
// Show modal dialog and enter modal loop
//
void DoShowModal(void);
//
// Common part of all ctors
//
- void Init();
+ void Init(void);
private:
wxWindow* m_pOldFocus;
virtual ~wxFrame();
// implement base class pure virtuals
- virtual void Maximize(bool bMaximize = TRUE);
- virtual bool IsMaximized(void) const;
- virtual void Iconize(bool bIconize = TRUE);
- virtual bool IsIconized(void) const;
- virtual void Restore(void);
#if wxUSE_MENUS_NATIVE
virtual void SetMenuBar(wxMenuBar* pMenubar);
#endif
- virtual void SetIcon(const wxIcon& rIcon);
virtual bool ShowFullScreen( bool bShow
,long lStyle = wxFULLSCREEN_ALL
);
- virtual bool IsFullScreen(void) const { return m_bFsIsShowing; };
// implementation only from now on
// -------------------------------
- void AlterChildPos(void);
- // override some more virtuals
- virtual bool Show(bool bShow = TRUE);
+ virtual void Raise(void);
// event handlers
void OnActivate(wxActivateEvent& rEvent);
,WXHMENU hMenu
);
- bool OS2Create( int nId
- ,wxWindow* pParent
- ,const wxChar* zWclass
- ,wxWindow* pWxWin
- ,const wxChar* zTitle
- ,int nX
- ,int nY
- ,int nWidth
- ,int nHeight
- ,long nStyle
- );
-
+ void SendSizeEvent(void);
// tooltip management
#if wxUSE_TOOLTIPS
WXHWND GetToolTipCtrl(void) const { return m_hWndToolTip; }
void SetClient(WXHWND c_Hwnd);
void SetClient(wxWindow* c_Window);
wxWindow *GetClient();
- HWND GetFrame(void) const { return m_hFrame; }
friend MRESULT EXPENTRY wxFrameWndProc(HWND hWnd,ULONG ulMsg, MPARAM wParam, MPARAM lParam);
friend MRESULT EXPENTRY wxFrameMainWndProc(HWND hWnd,ULONG ulMsg, MPARAM wParam, MPARAM lParam);
// common part of all ctors
void Init(void);
- // common part of Iconize(), Maximize() and Restore()
- void DoShowWindow(int nShowCmd);
-
+ virtual WXHICON GetDefaultIcon(void) const;
// override base class virtuals
virtual void DoGetClientSize( int* pWidth
,int* pHeight
) const;
- virtual void DoGetSize( int* pWidth
- ,int* pHeight
- ) const;
- virtual void DoGetPosition( int* pX
- ,int* pY
- ) const;
virtual void DoSetClientSize( int nWidth
,int nWeight
);
+ inline virtual bool IsMDIChild(void) const { return FALSE; }
#if wxUSE_MENUS_NATIVE
// helper
// that we don't have child objects for (m_hWnd in wxWindow is the
// handle of the Frame's client window!
//
- WXHWND m_hFrame;
WXHWND m_hTitleBar;
WXHWND m_hHScroll;
WXHWND m_hVScroll;
// Swp structures for various client data
// DW: Better off in attached RefData?
//
- SWP m_vSwp;
- SWP m_vSwpClient;
SWP m_vSwpTitleBar;
SWP m_vSwpMenuBar;
SWP m_vSwpHScroll;