From afa59b4e8828f1fff43c3c0d4303adf2c6ac59e5 Mon Sep 17 00:00:00 2001 From: David Webster Date: Mon, 22 Oct 2001 05:11:09 +0000 Subject: [PATCH] Some OS/2 Modifications git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12145 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/defs.h | 4 +- include/wx/os2/button.h | 84 ++++++++++++++++++++++++++-------------- include/wx/os2/control.h | 9 ++++- include/wx/os2/dialog.h | 2 +- include/wx/os2/frame.h | 1 + include/wx/os2/setup0.h | 3 ++ include/wx/os2/window.h | 8 +--- include/wx/wxchar.h | 4 +- 8 files changed, 74 insertions(+), 41 deletions(-) diff --git a/include/wx/defs.h b/include/wx/defs.h index 5de3bdf697..917a505aea 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -70,7 +70,7 @@ // using this macro allows constuctions like "wxSTD iostream" to work in // either case #if !wxUSE_IOSTREAMH - #define wxSTD std:: + #define wxSTD std:: #else #define wxSTD #endif @@ -1951,7 +1951,7 @@ typedef struct tagLOGPALETTE #elif defined(__WIN32__) typedef int (__stdcall *WXFARPROC)(); #elif defined(__WXPM__) -# if (defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 )) || defined (__WATCOMC__) +# if (defined(__VISAGECPP__) && (__IBMCPP__ < 400)) || defined (__WATCOMC__) // VA 3.0 for some reason needs base data types when typedefing a proc proto??? typedef void* (_System *WXFARPROC)(unsigned long, unsigned long, void*, void*); # else diff --git a/include/wx/os2/button.h b/include/wx/os2/button.h index 5330bcfb8f..092a589d87 100644 --- a/include/wx/os2/button.h +++ b/include/wx/os2/button.h @@ -20,48 +20,74 @@ WXDLLEXPORT_DATA(extern const char*) wxButtonNameStr; class WXDLLEXPORT wxButton: public wxButtonBase { public: - inline wxButton() {} - inline wxButton(wxWindow *parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, + inline wxButton() {} + inline wxButton( 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 = wxButtonNameStr) - { - Create(parent, id, label, pos, size, style, validator, name); - } + ,const wxString& rsName = wxButtonNameStr + ) + { + Create( pParent + ,vId + ,rsLabel + ,rPos + ,rSize + ,lStyle +#if wxUSE_VALIDATORS + ,rValidator +#endif + ,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 = wxButtonNameStr); + ,const wxString& rsName = wxButtonNameStr + ); - virtual ~wxButton(); + virtual ~wxButton(); - virtual void SetDefault(); + virtual void SetDefault(void); + static wxSize GetDefaultSize(void); + virtual void Command(wxCommandEvent& rEvent); + virtual bool OS2Command( WXUINT uParam + ,WXWORD vId + ); + virtual WXHBRUSH OnCtlColor( WXHDC hDC + ,WXHWND hWnd + ,WXUINT uCtlColor + ,WXUINT uMessage + ,WXWPARAM wParam + ,WXLPARAM lParam + ); + void MakeOwnerDrawn(void); - static wxSize GetDefaultSize(); + virtual MRESULT WindowProc( WXUINT uMsg + ,WXWPARAM wParam + ,WXLPARAM lParam + ); - virtual void Command(wxCommandEvent& event); - virtual bool OS2Command(WXUINT param, WXWORD id); - virtual WXHBRUSH OnCtlColor(WXHDC pDC, - WXHWND pWnd, - WXUINT nCtlColor, - WXUINT message, - WXWPARAM wParam, - WXLPARAM lParam); protected: - // send a notification event, return TRUE if processed - bool SendClickEvent(); - virtual wxSize DoGetBestSize() const; + bool SendClickEvent(void); + virtual wxSize DoGetBestSize(void) const; private: DECLARE_DYNAMIC_CLASS(wxButton) -}; +}; // end of CLASS wxButton #endif // _WX_BUTTON_H_ + diff --git a/include/wx/os2/control.h b/include/wx/os2/control.h index d7cfb69f0f..19ee703ab0 100644 --- a/include/wx/os2/control.h +++ b/include/wx/os2/control.h @@ -106,7 +106,7 @@ protected: wxFunction m_callback; // Callback associated with the window #endif // WXWIN_COMPATIBILITY -protected: +public: // // For controls like radiobuttons which are really composite // @@ -132,7 +132,14 @@ protected: // WXDWORD GetExStyle(WXDWORD& rStyle) const; + inline int GetXComp(void) const {return m_nXComp;} + inline int GetYComp(void) const {return m_nYComp;} + inline void SetXComp(const int nXComp) {m_nXComp = nXComp;} + inline void SetYComp(const int nYComp) {m_nYComp = nYComp;} + private: + int m_nXComp; + int m_nYComp; DECLARE_EVENT_TABLE() }; // end of wxControl diff --git a/include/wx/os2/dialog.h b/include/wx/os2/dialog.h index 49f5af72ec..260a335ef1 100644 --- a/include/wx/os2/dialog.h +++ b/include/wx/os2/dialog.h @@ -41,7 +41,7 @@ public: { long lModalStyle = lStyle ? wxDIALOG_MODAL : wxDIALOG_MODELESS ; - bModal = false; + bModal = FALSE; Create( pParent ,-1 ,rsTitle diff --git a/include/wx/os2/frame.h b/include/wx/os2/frame.h index 4cfbc3c33a..414ab5ac68 100644 --- a/include/wx/os2/frame.h +++ b/include/wx/os2/frame.h @@ -66,6 +66,7 @@ public: // implementation only from now on // ------------------------------- + void AlterChildPos(void); // override some more virtuals virtual bool Show(bool bShow = TRUE); diff --git a/include/wx/os2/setup0.h b/include/wx/os2/setup0.h index a5db6eaf0e..a22a59e0cd 100644 --- a/include/wx/os2/setup0.h +++ b/include/wx/os2/setup0.h @@ -366,5 +366,8 @@ #define wxUSE_CMDLINE_PARSER 1 +#define wxUSE_SPLASH 1 + +#define NO_TEXT_WINDOW_STREAM 1 #endif // _WX_SETUP_H_ diff --git a/include/wx/os2/window.h b/include/wx/os2/window.h index 23c386d90d..a230da8ad2 100644 --- a/include/wx/os2/window.h +++ b/include/wx/os2/window.h @@ -368,11 +368,7 @@ public: bool HandleSysCommand( WXWPARAM wParam ,WXLPARAM lParam ); - bool HandleWindowParams( PWNDPARAMS pParams - ,WXLPARAM lParam - ); bool HandlePaletteChanged(); - bool HandlePresParamChanged(WXWPARAM wParam); bool HandleSysColorChange(void); bool HandleCtlColor(WXHBRUSH* hBrush); bool HandleSetFocus(WXHWND hWnd); @@ -387,14 +383,14 @@ public: ,int nY ,WXUINT uFlags ); - bool HandleChar( WXWORD wParam + bool HandleChar( WXDWORD wParam ,WXLPARAM lParam ,bool bIsASCII = FALSE ); bool HandleKeyDown( WXWORD wParam ,WXLPARAM lParam ); - bool HandleKeyUp( WXWORD wParam + bool HandleKeyUp( WXDWORD wParam ,WXLPARAM lParam ); bool HandleQueryDragIcon(WXHICON* phIcon); diff --git a/include/wx/wxchar.h b/include/wx/wxchar.h index 1ac1585756..c185288ce6 100644 --- a/include/wx/wxchar.h +++ b/include/wx/wxchar.h @@ -281,8 +281,8 @@ typedef _TUCHAR wxUChar; # define wxUSE_WCHAR_T 0 # elif defined(__WATCOMC__) # define wxUSE_WCHAR_T 0 -# elif defined(__VISAGECPP__) && (__IBMCPP__ >= 400) -# define wxUSE_WCHAR_T 1 +# elif defined(__VISAGECPP__) && (__IBMCPP__ < 400) +# define wxUSE_WCHAR_T 0 # else // add additional compiler checks if this fails # define wxUSE_WCHAR_T 1 -- 2.45.2