From 210a651b4f4ef5ff4e220a100a10bb4f29e08cfd Mon Sep 17 00:00:00 2001 From: David Webster Date: Fri, 6 Jul 2001 21:45:11 +0000 Subject: [PATCH] OS/2 update for wxUniv merge. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10873 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/bmpbuttn.h | 4 ++ include/wx/frame.h | 22 ++++++++++ include/wx/generic/listctrl.h | 4 ++ include/wx/generic/progdlgg.h | 4 ++ include/wx/os2/accel.h | 20 ---------- include/wx/os2/bmpbuttn.h | 2 +- include/wx/os2/button.h | 5 ++- include/wx/os2/checkbox.h | 6 +-- include/wx/os2/dc.h | 2 + include/wx/os2/dcclient.h | 7 +++- include/wx/os2/frame.h | 24 +++++------ include/wx/os2/menu.h | 35 +++------------- include/wx/os2/menuitem.h | 4 -- include/wx/os2/msgdlg.h | 9 ----- include/wx/os2/notebook.h | 4 +- include/wx/os2/radiobox.h | 8 ++-- include/wx/os2/radiobut.h | 42 -------------------- include/wx/os2/scrolbar.h | 4 +- include/wx/os2/setup.h | 75 ++++++++++++++++++++++++----------- include/wx/os2/setup0.h | 1 - include/wx/os2/slider.h | 2 +- include/wx/os2/statbmp.h | 7 ++-- include/wx/os2/statbox.h | 2 +- include/wx/os2/window.h | 24 +++++------ include/wx/window.h | 6 +++ 25 files changed, 149 insertions(+), 174 deletions(-) diff --git a/include/wx/bmpbuttn.h b/include/wx/bmpbuttn.h index 4b23b568c2..7c1ad834fd 100644 --- a/include/wx/bmpbuttn.h +++ b/include/wx/bmpbuttn.h @@ -69,6 +69,10 @@ protected: // the margins around the bitmap int m_marginX, m_marginY; +private: + // Prevent Virtual function hiding warnings + void SetLabel(const wxString& rsLabel) + { wxWindowBase::SetLabel(rsLabel); } }; #if defined(__WXUNIVERSAL__) diff --git a/include/wx/frame.h b/include/wx/frame.h index fd9afe2a91..4d68e89032 100644 --- a/include/wx/frame.h +++ b/include/wx/frame.h @@ -318,6 +318,28 @@ protected: #endif #elif defined(__WXPM__) #include "wx/os2/frame.h" + #ifndef __WXUNIVERSAL__ + + class WXDLLEXPORT wxFrame : public wxFrameOS2 + { + public: + // construction + wxFrame() { Init(); } + wxFrame(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + { + Init(); + Create(parent, id, title, pos, size, style, name); + } + DECLARE_DYNAMIC_CLASS(wxFrame) + }; + #endif + #elif defined(__WXSTUBS__) #include "wx/stubs/frame.h" #endif diff --git a/include/wx/generic/listctrl.h b/include/wx/generic/listctrl.h index 8ac5dc444d..f239e01b3b 100644 --- a/include/wx/generic/listctrl.h +++ b/include/wx/generic/listctrl.h @@ -189,6 +189,10 @@ protected: friend wxListMainWindow; private: + // Virtual function hiding supression + void Update(void) + { wxWindowBase::Update(); } + // create the header window void CreateHeaderWindow(); diff --git a/include/wx/generic/progdlgg.h b/include/wx/generic/progdlgg.h index 3c6de05288..ec103f99a7 100644 --- a/include/wx/generic/progdlgg.h +++ b/include/wx/generic/progdlgg.h @@ -116,6 +116,10 @@ private: class WXDLLEXPORT wxWindowDisabler *m_winDisabler; DECLARE_EVENT_TABLE() +private: + // Virtual function hiding supression + void Update() + { wxWindowBase::Update(); } }; #endif diff --git a/include/wx/os2/accel.h b/include/wx/os2/accel.h index 226e0320bc..6e33d02ee7 100644 --- a/include/wx/os2/accel.h +++ b/include/wx/os2/accel.h @@ -28,26 +28,6 @@ class WXDLLEXPORT wxAcceleratorTable; // Hold no key down #define wxACCEL_NORMAL 0x00 -class WXDLLEXPORT wxAcceleratorEntry -{ -public: - wxAcceleratorEntry(int flags = 0, int keyCode = 0, int cmd = 0) - { - m_flags = flags; m_keyCode = keyCode; m_command = cmd; - } - - inline void Set(int flags, int keyCode, int cmd) - { m_flags = flags; m_keyCode = keyCode; m_command = cmd; } - - inline int GetFlags() const { return m_flags; } - inline int GetKeyCode() const { return m_keyCode; } - inline int GetCommand() const { return m_command; } - - int m_flags; - int m_keyCode; // ASCII or virtual keycode - int m_command; // Command id to generate -}; - class WXDLLEXPORT wxAcceleratorTable: public wxObject { DECLARE_DYNAMIC_CLASS(wxAcceleratorTable) diff --git a/include/wx/os2/bmpbuttn.h b/include/wx/os2/bmpbuttn.h index f7f5b070fe..8847ff3d10 100644 --- a/include/wx/os2/bmpbuttn.h +++ b/include/wx/os2/bmpbuttn.h @@ -18,7 +18,7 @@ WXDLLEXPORT_DATA(extern const char*) wxButtonNameStr; #define wxDEFAULT_BUTTON_MARGIN 4 -class WXDLLEXPORT wxBitmapButton: public wxButton +class WXDLLEXPORT wxBitmapButton: public wxBitmapButtonBase { DECLARE_DYNAMIC_CLASS(wxBitmapButton) public: diff --git a/include/wx/os2/button.h b/include/wx/os2/button.h index ed2c8a8f40..5330bcfb8f 100644 --- a/include/wx/os2/button.h +++ b/include/wx/os2/button.h @@ -17,9 +17,8 @@ WXDLLEXPORT_DATA(extern const char*) wxButtonNameStr; // Pushbutton -class WXDLLEXPORT wxButton: public wxControl +class WXDLLEXPORT wxButton: public wxButtonBase { - DECLARE_DYNAMIC_CLASS(wxButton) public: inline wxButton() {} inline wxButton(wxWindow *parent, wxWindowID id, const wxString& label, @@ -60,6 +59,8 @@ protected: bool SendClickEvent(); virtual wxSize DoGetBestSize() const; +private: + DECLARE_DYNAMIC_CLASS(wxButton) }; #endif diff --git a/include/wx/os2/checkbox.h b/include/wx/os2/checkbox.h index 4b0bff3419..6079d5f80a 100644 --- a/include/wx/os2/checkbox.h +++ b/include/wx/os2/checkbox.h @@ -18,10 +18,8 @@ WXDLLEXPORT_DATA(extern const char*) wxCheckBoxNameStr; // Checkbox item (single checkbox) class WXDLLEXPORT wxBitmap; -class WXDLLEXPORT wxCheckBox: public wxControl +class WXDLLEXPORT wxCheckBox : public wxCheckBoxBase { - DECLARE_DYNAMIC_CLASS(wxCheckBox) - public: inline wxCheckBox() { } inline wxCheckBox(wxWindow *parent, wxWindowID id, const wxString& label, @@ -54,6 +52,8 @@ class WXDLLEXPORT wxCheckBox: public wxControl protected: virtual wxSize DoGetBestSize() const; +private: + DECLARE_DYNAMIC_CLASS(wxCheckBox) }; class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox diff --git a/include/wx/os2/dc.h b/include/wx/os2/dc.h index d673f3cf33..85d37c6593 100644 --- a/include/wx/os2/dc.h +++ b/include/wx/os2/dc.h @@ -157,6 +157,8 @@ public: const wxBitmap& GetSelectedBitmap(void) const { return m_vSelectedBitmap; } wxBitmap& GetSelectedBitmap(void) { return m_vSelectedBitmap; } + void UpdateClipBox(); + protected: virtual void DoFloodFill( wxCoord vX ,wxCoord vY diff --git a/include/wx/os2/dcclient.h b/include/wx/os2/dcclient.h index f0d6861830..351e993888 100644 --- a/include/wx/os2/dcclient.h +++ b/include/wx/os2/dcclient.h @@ -52,15 +52,18 @@ class WXDLLEXPORT wxClientDC : public wxWindowDC { public: wxClientDC(); + virtual ~wxClientDC(); - // Create a DC corresponding to the client area of the window wxClientDC(wxWindow *win); +protected: + void InitDC(void); + private: DECLARE_DYNAMIC_CLASS(wxClientDC) }; // end of CLASS wxClientDC -class WXDLLEXPORT wxPaintDC : public wxWindowDC +class WXDLLEXPORT wxPaintDC : public wxClientDC { public: wxPaintDC(); diff --git a/include/wx/os2/frame.h b/include/wx/os2/frame.h index 23785ee564..38d5f57600 100644 --- a/include/wx/os2/frame.h +++ b/include/wx/os2/frame.h @@ -17,19 +17,19 @@ // #include "wx/os2/wxOs2.h" -class WXDLLEXPORT wxFrame : public wxFrameBase +class WXDLLEXPORT wxFrameOS2 : public wxFrameBase { public: // construction - wxFrame() { Init(); } - wxFrame( wxWindow* pParent - ,wxWindowID vId - ,const wxString& rsTitle - ,const wxPoint& rPos = wxDefaultPosition - ,const wxSize& rSize = wxDefaultSize - ,long lStyle = wxDEFAULT_FRAME_STYLE - ,const wxString& rsName = wxFrameNameStr - ) + wxFrameOS2() { Init(); } + wxFrameOS2( wxWindow* pParent + ,wxWindowID vId + ,const wxString& rsTitle + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = wxDEFAULT_FRAME_STYLE + ,const wxString& rsName = wxFrameNameStr + ) { Init(); @@ -45,7 +45,7 @@ public: ,const wxString& rsName = wxFrameNameStr ); - virtual ~wxFrame(); + virtual ~wxFrameOS2(); // implement base class pure virtuals virtual void Maximize(bool bMaximize = TRUE); @@ -242,7 +242,7 @@ private: SWP m_vSwpToolBar; DECLARE_EVENT_TABLE() - DECLARE_DYNAMIC_CLASS(wxFrame) + DECLARE_DYNAMIC_CLASS(wxFrameOS2) }; #endif diff --git a/include/wx/os2/menu.h b/include/wx/os2/menu.h index fac76609db..e75b73d6f0 100644 --- a/include/wx/os2/menu.h +++ b/include/wx/os2/menu.h @@ -73,12 +73,6 @@ public: } #endif // wxUSE_MENU_CALLBACK - // - // OS2-specific - // - bool ProcessCommand(wxCommandEvent& rEvent); - - // // Implementation only from now on // ------------------------------- @@ -101,12 +95,6 @@ public: // WXHMENU GetHMenu() const { return m_hMenu; } - // - // Attach/detach menu to/from wxMenuBar - // - void Attach(wxMenuBar* pMenubar); - void Detach(void); - #if wxUSE_ACCEL // // Called by wxMenuBar to build its accel table from the accels of all menus @@ -166,7 +154,7 @@ private: // // The helper variable for creating unique IDs. // - static USHORT m_nextMenuId; + static USHORT m_nextMenuId; #if wxUSE_ACCEL // @@ -254,22 +242,8 @@ public: // Implementation from now on // WXHMENU Create(void); - void Detach(void); - - // - // Returns TRUE if we're attached to a frame - // - bool IsAttached(void) const { return m_pMenuBarFrame != NULL; } - - // - // Get the frame we live in - // - wxFrame * GetFrame(void) const { return m_pMenuBarFrame; } - - // - // Attach to a frame - // - void Attach(wxFrame* pFrame); + virtual void Detach(void); + virtual void Attach(wxFrame* pFrame); #if wxUSE_ACCEL // @@ -305,7 +279,6 @@ protected: wxArrayString m_titles; - wxFrame* m_pMenuBarFrame; WXHMENU m_hMenu; #if wxUSE_ACCEL @@ -315,6 +288,8 @@ protected: wxAcceleratorTable m_vAccelTable; #endif // wxUSE_ACCEL + wxFrame* m_pMenuBarFrame; + private: // // Virtual function hiding suppression diff --git a/include/wx/os2/menuitem.h b/include/wx/os2/menuitem.h index 8436d0d006..33a41cef62 100644 --- a/include/wx/os2/menuitem.h +++ b/include/wx/os2/menuitem.h @@ -60,10 +60,6 @@ public: virtual void Check(bool bDoCheck = TRUE); virtual bool IsChecked(void) const; -#if wxUSE_ACCEL - virtual wxAcceleratorEntry* GetAccel(void) const; -#endif // wxUSE_ACCEL - // unfortunately needed to resolve ambiguity between // wxMenuItemBase::IsCheckable() and wxOwnerDrawn::IsCheckable() bool IsCheckable(void) const { return wxMenuItemBase::IsCheckable(); } diff --git a/include/wx/os2/msgdlg.h b/include/wx/os2/msgdlg.h index af7a32d046..ab51303670 100644 --- a/include/wx/os2/msgdlg.h +++ b/include/wx/os2/msgdlg.h @@ -42,14 +42,5 @@ protected: wxWindow* m_pParent; }; // end of CLASS wxMessageDialog - -int WXDLLEXPORT wxMessageBox( const wxString& rsMessage - ,const wxString& rsCaption = wxMessageBoxCaptionStr - ,long lStyle = wxOK|wxCENTRE - ,wxWindow* pParent = NULL - ,int nX = -1 - ,int nY = -1 - ); - #endif // _WX_MSGBOXDLG_H_ diff --git a/include/wx/os2/notebook.h b/include/wx/os2/notebook.h index 39415272d8..7e533d6966 100644 --- a/include/wx/os2/notebook.h +++ b/include/wx/os2/notebook.h @@ -17,7 +17,7 @@ #include "wx/dynarray.h" #include "wx/string.h" -#include "wx/control.h" +#include "wx/notebook.h" // ---------------------------------------------------------------------------- // types @@ -38,7 +38,7 @@ WX_DEFINE_ARRAY(wxNotebookPage *, wxArrayNBPages); // FIXME this class should really derive from wxTabCtrl, but the interface is not // exactly the same, so I can't do it right now and instead we reimplement // part of wxTabCtrl here -class WXDLLEXPORT wxNotebook : public wxControl +class WXDLLEXPORT wxNotebook : public wxNotebookBase { public: // ctors diff --git a/include/wx/os2/radiobox.h b/include/wx/os2/radiobox.h index 9c424e8894..e664ccf7bf 100644 --- a/include/wx/os2/radiobox.h +++ b/include/wx/os2/radiobox.h @@ -12,14 +12,12 @@ #ifndef _WX_RADIOBOX_H_ #define _WX_RADIOBOX_H_ -#include "wx/control.h" - WXDLLEXPORT_DATA(extern const char*) wxRadioBoxNameStr; // List box item class WXDLLEXPORT wxBitmap ; -class WXDLLEXPORT wxRadioBox: public wxControl +class WXDLLEXPORT wxRadioBox: public wxControl, public wxRadioBoxBase { DECLARE_DYNAMIC_CLASS(wxRadioBox) public: @@ -53,7 +51,11 @@ public: int FindString(const wxString& s) const; void SetSelection(int N); int GetSelection() const; + virtual int GetCount() const; wxString GetString(int N) const; + virtual void SetString(int n, const wxString& label); + virtual int GetColumnCount() const; + virtual int GetRowCount() const; void GetSize(int *x, int *y) const; void GetPosition(int *x, int *y) const; diff --git a/include/wx/os2/radiobut.h b/include/wx/os2/radiobut.h index f1e03be04a..ee96b5008b 100644 --- a/include/wx/os2/radiobut.h +++ b/include/wx/os2/radiobut.h @@ -51,47 +51,5 @@ class WXDLLEXPORT wxRadioButton: public wxControl void Command(wxCommandEvent& event); }; -// Not implemented -class WXDLLEXPORT wxBitmap ; - -WXDLLEXPORT_DATA(extern const char*) wxBitmapRadioButtonNameStr; - -class WXDLLEXPORT wxBitmapRadioButton: public wxRadioButton -{ - DECLARE_DYNAMIC_CLASS(wxBitmapRadioButton) - protected: - wxBitmap *theButtonBitmap; - public: - inline wxBitmapRadioButton() { theButtonBitmap = NULL; } - inline wxBitmapRadioButton(wxWindow *parent, wxWindowID id, - const wxBitmap *label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, -#if wxUSE_VALIDATORS - const wxValidator& validator = wxDefaultValidator, -#endif - const wxString& name = wxBitmapRadioButtonNameStr) - { - Create(parent, id, label, pos, size, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - const wxBitmap *label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, -#if wxUSE_VALIDATORS - const wxValidator& validator = wxDefaultValidator, -#endif - const wxString& name = wxBitmapRadioButtonNameStr); - - virtual void SetLabel(const wxBitmap *label); - virtual void SetValue(bool val) ; - virtual bool GetValue() const ; -private: - // virtual function hiding suppression, do not use - virtual void SetLabel(const wxString& label) - { wxRadioButton::SetLabel(label); }; -}; - #endif // _WX_RADIOBUT_H_ diff --git a/include/wx/os2/scrolbar.h b/include/wx/os2/scrolbar.h index e77f17ec44..c7798d1529 100644 --- a/include/wx/os2/scrolbar.h +++ b/include/wx/os2/scrolbar.h @@ -12,12 +12,12 @@ #ifndef _WX_SCROLBAR_H_ #define _WX_SCROLBAR_H_ -#include "wx/control.h" +#include "wx/scrolbar.h" WXDLLEXPORT_DATA(extern const char*) wxScrollBarNameStr; // Scrollbar item -class WXDLLEXPORT wxScrollBar: public wxControl +class WXDLLEXPORT wxScrollBar: public wxScrollBarBase { DECLARE_DYNAMIC_CLASS(wxScrollBar) diff --git a/include/wx/os2/setup.h b/include/wx/os2/setup.h index 562a2b1470..1fdeed452f 100644 --- a/include/wx/os2/setup.h +++ b/include/wx/os2/setup.h @@ -34,6 +34,8 @@ #define wxUSE_NET_API 1 // Utilize OS/2's UPM netapi's +#define wxUSE_DATETIME 1 // Utilize the date-time classes + #define wxUSE_CONFIG 1 // Use wxConfig, with CreateConfig in wxApp @@ -74,40 +76,62 @@ #define wxUSE_DRAG_AND_DROP 1 // 0 for no drag and drop +#define wxUSE_CONTROLS 1 // Do not change +#define wxUSE_POPUPWIN 0 // OS/2 does not use this + +// Recommended setting: 1 +#define wxUSE_BUTTON 1 // wxButton +#define wxUSE_BMPBUTTON 1 // wxBitmapButton +#define wxUSE_CALENDARCTRL 1 // wxCalendarCtrl +#define wxUSE_CHECKBOX 1 // wxCheckBox +#define wxUSE_CHECKLISTBOX 1 // wxCheckListBox (requires wxUSE_OWNER_DRAWN) +#define wxUSE_CHOICE 1 // wxChoice +#define wxUSE_COMBOBOX 1 // wxComboBox +#define wxUSE_GAUGE 1 // wxGauge +#define wxUSE_LISTBOX 1 // wxListBox +#define wxUSE_LISTCTRL 1 // wxListCtrl +#define wxUSE_RADIOBOX 1 // wxRadioBox +#define wxUSE_RADIOBTN 1 // wxRadioButton +#define wxUSE_SCROLLBAR 1 // wxScrollBar +#define wxUSE_SLIDER 1 // wxSlider +#define wxUSE_SPINBTN 1 // wxSpinButton +#define wxUSE_SPINCTRL 1 // wxSpinCtrl +#define wxUSE_STATBOX 1 // wxStaticBox +#define wxUSE_STATLINE 1 // wxStaticLine +#define wxUSE_STATTEXT 1 // wxStaticText +#define wxUSE_STATBMP 1 // wxStaticBitmap +#define wxUSE_TEXTCTRL 1 // wxTextCtrl +#define wxUSE_TOGGLEBTN 1 // requires wxButton +#define wxUSE_TREECTRL 1 // wxTreeCtrl +#define wxUSE_CHOICEDLG 1 +#define wxUSE_COLOURDLG 1 +#define wxUSE_DATAOBJ 1 +#define wxUSE_FILEDLG 1 +#define wxUSE_FONTDLG 1 +#define wxUSE_FONTMAP 1 +#define wxUSE_GRID 1 +#define wxUSE_IMAGLIST 1 +#define wxUSE_LOGGUI 1 +#define wxUSE_LOGWINDOW 1 +#define wxUSE_LOG_DIALOG 1 +#define wxUSE_MIMETYPE 1 +#define wxUSE_MSGDLG 1 +#define wxUSE_NOTEBOOK 1 +#define wxUSE_SPLITTER 1 +#define wxUSE_STOPWATCH 1 +#define wxUSE_TAB_DIALOG 1 +#define wxUSE_WXHTML_HELP 1 + #define wxUSE_BUTTONBAR 1 // Define 1 to use buttonbar classes (enhanced toolbar // for MS Windows) -#define wxUSE_GAUGE 1 - // Define 1 to use Microsoft's gauge (Windows) - // or Bull's gauge (Motif) library (both in contrib). -#define wxUSE_COMBOBOX 1 - // Define 1 to use COMBOXBOX control (Windows) - // or FWW's ComboBox widget (Motif). -#define wxUSE_CHOICE 1 - // Define 1 to use CHOICE #define wxUSE_RADIOBUTTON 1 // Define 1 to use radio button control -#define wxUSE_RADIOBTN 1 - // Unfortunately someone introduced this one, too #define wxUSE_SCROLLBAR 1 // Define 1 to compile contributed wxScrollBar class -#define wxUSE_CHECKBOX 1 - // Define 1 to compile checkbox - -#define wxUSE_LISTBOX 1 - // Define 1 to compile listbox - -#define wxUSE_SPINBTN 1 - // Define 1 to compile spin button - -// use wxStaticLine class (separator line in the dialog)? -#define wxUSE_STATLINE 1 - -#define wxUSE_CHECKLISTBOX 1 - // Define 1 to compile check listbox #define wxUSE_CARET 1 // Define 1 to use wxCaret class #define wxUSE_TREECTRL 1 @@ -252,6 +276,7 @@ #define wxUSE_ZIPSTREAM 1 // input stream for reading from zip archives +#define wxUSE_TIMER 1 // use the timer class /* * Finer detail * @@ -265,6 +290,8 @@ // use wxFile class - required by i18n code, wxConfig and others - recommended #define wxUSE_FILE 1 +#define wxUSE_FFILE 1 + // use wxTextFile class: requires wxFile, required by wxConfig #define wxUSE_TEXTFILE 1 diff --git a/include/wx/os2/setup0.h b/include/wx/os2/setup0.h index fabfe09f8d..283a68a075 100644 --- a/include/wx/os2/setup0.h +++ b/include/wx/os2/setup0.h @@ -36,7 +36,6 @@ #define wxUSE_CONFIG 1 // Use wxConfig, with CreateConfig in wxApp - #define wxUSE_POSTSCRIPT 1 // 0 for no PostScript device context #define wxUSE_AFM_FOR_POSTSCRIPT 1 diff --git a/include/wx/os2/slider.h b/include/wx/os2/slider.h index b290372735..ba675da4d1 100644 --- a/include/wx/os2/slider.h +++ b/include/wx/os2/slider.h @@ -17,7 +17,7 @@ WXDLLEXPORT_DATA(extern const char*) wxSliderNameStr; // Slider -class WXDLLEXPORT wxSlider: public wxControl +class WXDLLEXPORT wxSlider: public wxSliderBase { DECLARE_DYNAMIC_CLASS(wxSlider) diff --git a/include/wx/os2/statbmp.h b/include/wx/os2/statbmp.h index 01ad8f183a..116e25034d 100644 --- a/include/wx/os2/statbmp.h +++ b/include/wx/os2/statbmp.h @@ -21,9 +21,8 @@ WXDLLEXPORT_DATA(extern const char*) wxStaticBitmapNameStr; -class WXDLLEXPORT wxStaticBitmap: public wxControl +class WXDLLEXPORT wxStaticBitmap : public wxStaticBitmapBase { - DECLARE_DYNAMIC_CLASS(wxStaticBitmap) public: inline wxStaticBitmap() { Init(); } @@ -56,7 +55,7 @@ class WXDLLEXPORT wxStaticBitmap: public wxControl // vice versa const wxIcon& GetIcon() const { wxASSERT( m_bIsIcon ); return *(wxIcon *)m_pImage; } - const wxBitmap& GetBitmap() const + wxBitmap GetBitmap() const { wxASSERT( !m_bIsIcon ); return *(wxBitmap *)m_pImage; } // overriden base class virtuals @@ -76,6 +75,8 @@ protected: // we can have either an icon or a bitmap bool m_bIsIcon; wxGDIImage* m_pImage; +private: + DECLARE_DYNAMIC_CLASS(wxStaticBitmap) }; #endif diff --git a/include/wx/os2/statbox.h b/include/wx/os2/statbox.h index 147e7beb38..df6122aeb9 100644 --- a/include/wx/os2/statbox.h +++ b/include/wx/os2/statbox.h @@ -17,7 +17,7 @@ WXDLLEXPORT_DATA(extern const char*) wxStaticBoxNameStr; // Group box -class WXDLLEXPORT wxStaticBox: public wxControl +class WXDLLEXPORT wxStaticBox : public wxStaticBoxBase { DECLARE_DYNAMIC_CLASS(wxStaticBox) diff --git a/include/wx/os2/window.h b/include/wx/os2/window.h index 358c0e849a..4c3fc7391e 100644 --- a/include/wx/os2/window.h +++ b/include/wx/os2/window.h @@ -44,21 +44,21 @@ enum // wxWindow declaration for OS/2 PM // --------------------------------------------------------------------------- -class WXDLLEXPORT wxWindow : public wxWindowBase +class WXDLLEXPORT wxWindowOS2 : public wxWindowBase { public: - wxWindow() + wxWindowOS2() { Init(); } - wxWindow( wxWindow* pParent - ,wxWindowID vId - ,const wxPoint& rPos = wxDefaultPosition - ,const wxSize& rSize = wxDefaultSize - ,long lStyle = 0 - ,const wxString& rName = wxPanelNameStr - ) + wxWindowOS2( wxWindow* pParent + ,wxWindowID vId + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = 0 + ,const wxString& rName = wxPanelNameStr + ) { Init(); Create( pParent @@ -70,7 +70,7 @@ public: ); } - virtual ~wxWindow(); + virtual ~wxWindowOS2(); bool Create( wxWindow* pParent ,wxWindowID vId @@ -550,8 +550,8 @@ private: // 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_DYNAMIC_CLASS(wxWindowOS2); + DECLARE_NO_COPY_CLASS(wxWindowOS2) DECLARE_EVENT_TABLE() private: HWND m_hWndScrollBarHorz; diff --git a/include/wx/window.h b/include/wx/window.h index c1565a6520..5cef6812a1 100644 --- a/include/wx/window.h +++ b/include/wx/window.h @@ -981,6 +981,12 @@ private: #endif // wxUniv #include "wx/mac/window.h" #elif defined(__WXPM__) + #ifdef __WXUNIVERSAL__ + #define wxWindowNative wxWindowOS2 + #else // !wxUniv + #define wxWindowOS2 wxWindow + #define sm_classwxWindowOS2 sm_classwxWindow + #endif // wxUniv/!wxUniv #include "wx/os2/window.h" #endif -- 2.45.2