]> git.saurik.com Git - wxWidgets.git/commitdiff
Removal of previous wxValidtor code for wxOS2
authorDavid Webster <Dave.Webster@bhmi.com>
Fri, 19 Nov 1999 22:36:55 +0000 (22:36 +0000)
committerDavid Webster <Dave.Webster@bhmi.com>
Fri, 19 Nov 1999 22:36:55 +0000 (22:36 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4634 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

48 files changed:
include/wx/control.h
include/wx/generic/listctrl.h
include/wx/generic/treectrl.h
include/wx/os2/bmpbuttn.h
include/wx/os2/button.h
include/wx/os2/checkbox.h
include/wx/os2/checklst.h
include/wx/os2/choice.h
include/wx/os2/combobox.h
include/wx/os2/frame.h
include/wx/os2/gauge.h
include/wx/os2/listbox.h
include/wx/os2/radiobox.h
include/wx/os2/radiobut.h
include/wx/os2/scrolbar.h
include/wx/os2/slider.h
include/wx/os2/textctrl.h
include/wx/validate.h
include/wx/window.h
src/common/ctrlcmn.cpp
src/common/validate.cpp
src/common/wincmn.cpp
src/generic/listctrl.cpp
src/generic/treectrl.cpp
src/html/helpfrm.cpp
src/jpeg/MAKEFILE.VA
src/msw/makefile.vc
src/os2/bmpbuttn.cpp
src/os2/button.cpp
src/os2/checkbox.cpp
src/os2/checklst.cpp
src/os2/choice.cpp
src/os2/colordlg.cpp [deleted file]
src/os2/combobox.cpp
src/os2/frame.cpp
src/os2/gauge.cpp
src/os2/listbox.cpp
src/os2/makefile.va
src/os2/radiobox.cpp
src/os2/radiobut.cpp
src/os2/scrolbar.cpp
src/os2/slider.cpp
src/os2/textctrl.cpp
src/os2/utilsexc.cpp
src/os2/window.cpp
src/png/MAKEFILE.VA
src/xpm/MAKEFILE.VA
src/zlib/MAKEFILE.VA

index bfdda99063859b2fdf4d29081b2f6bdef1eacf7a..6f5999c7bc7068b08c0738427e94127f460c27f3 100644 (file)
@@ -42,11 +42,7 @@ protected:
                        const wxSize& size,
                        long style,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-                       const wxValidator* validator,
-#  else
                        const wxValidator& validator,
-#  endif
 #endif
                        const wxString& name);
 
index 6d6c2a81c1f0a064161955c4743829daf1da5036..5d191352b2abf8285197c1ede7273a9cc6d093b8 100644 (file)
@@ -381,11 +381,7 @@ class WXDLLEXPORT wxListTextCtrl: public wxTextCtrl
                     const wxString &value = "",
                     const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-                    int style = 0, const wxValidator* validator = wxDefaultValidator,
-#  else
                     int style = 0, const wxValidator& validator = wxDefaultValidator,
-#  endif
 #endif
                     const wxString &name = "wxListTextCtrlText" );
     void OnChar( wxKeyEvent &event );
@@ -515,11 +511,7 @@ class WXDLLEXPORT wxListCtrl: public wxControl
     wxListCtrl( wxWindow *parent, wxWindowID id = -1,
       const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-      long style = wxLC_ICON, const wxValidator* validator = wxDefaultValidator,
-#  else
       long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator,
-#  endif
 #endif
        const wxString &name = "listctrl" )
     {
@@ -529,11 +521,7 @@ class WXDLLEXPORT wxListCtrl: public wxControl
     bool Create( wxWindow *parent, wxWindowID id = -1,
       const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-      long style = wxLC_ICON, const wxValidator* validator = wxDefaultValidator,
-#  else
       long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator,
-#  endif
 #endif
        const wxString &name = "listctrl" );
     void OnSize( wxSizeEvent &event );
index 9e8bf4ed5cc559275c30fcbc2171b5de618e409f..4be159ae58642f6dd1385875ddcbe8db63326631 100644 (file)
@@ -182,11 +182,7 @@ class WXDLLEXPORT wxTreeTextCtrl: public wxTextCtrl
                     const wxString &value = wxEmptyString,
                     const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-                    int style = 0, const wxValidator* validator = wxDefaultValidator,
-#  else
                     int style = 0, const wxValidator& validator = wxDefaultValidator,
-#  endif
 #endif
                     const wxString &name = wxTextCtrlNameStr );
     void OnChar( wxKeyEvent &event );
@@ -211,11 +207,7 @@ public:
                const wxSize& size = wxDefaultSize,
                long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-               const wxValidator *validator = wxDefaultValidator,
-#  else
                const wxValidator &validator = wxDefaultValidator,
-#  endif
 #endif
                const wxString& name = wxTreeCtrlNameStr)
     {
@@ -229,11 +221,7 @@ public:
                 const wxSize& size = wxDefaultSize,
                 long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-                const wxValidator *validator = wxDefaultValidator,
-#  else
                 const wxValidator &validator = wxDefaultValidator,
-#  endif
 #endif
                 const wxString& name = wxTreeCtrlNameStr);
 
index 76e7fbdaea6671bbd30f6e637818e987bb7a6e68..f7f5b070fe4947c227c142515453600e8a823a12 100644 (file)
@@ -27,11 +27,7 @@ class WXDLLEXPORT wxBitmapButton: public wxButton
            const wxPoint& pos = wxDefaultPosition,
            const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-           const wxValidator* validator = wxDefaultValidator,
-#  else
            const wxValidator& validator = wxDefaultValidator,
-#  endif
 #endif
            const wxString& name = wxButtonNameStr)
   {
@@ -42,11 +38,7 @@ class WXDLLEXPORT wxBitmapButton: public wxButton
            const wxPoint& pos = wxDefaultPosition,
            const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-           const wxValidator* validator = wxDefaultValidator,
-#  else
            const wxValidator& validator = wxDefaultValidator,
-#  endif
 #endif
            const wxString& name = wxButtonNameStr);
 
index 09614dc3c10d5d4408217e986502c301a344a146..2626a0aa9ce8d8742a9dba8850c7ca0a84bea17f 100644 (file)
@@ -26,11 +26,7 @@ class WXDLLEXPORT wxButton: public wxControl
            const wxPoint& pos = wxDefaultPosition,
            const wxSize& size = wxDefaultSize, long style = 0,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-           const wxValidator* validator = wxDefaultValidator,
-#  else
            const wxValidator& validator = wxDefaultValidator,
-#  endif
 #endif
            const wxString& name = wxButtonNameStr)
   {
@@ -41,11 +37,7 @@ class WXDLLEXPORT wxButton: public wxControl
            const wxPoint& pos = wxDefaultPosition,
            const wxSize& size = wxDefaultSize, long style = 0,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-           const wxValidator* validator = wxDefaultValidator,
-#  else
            const wxValidator& validator = wxDefaultValidator,
-#  endif
 #endif
            const wxString& name = wxButtonNameStr);
 
index 677f3699f73ce92d45347b65297a0a7d35b60caf..c3fc2e25138f35e2141ac96247a9128b73d13cd7 100644 (file)
@@ -28,11 +28,7 @@ class WXDLLEXPORT wxCheckBox: public wxControl
            const wxPoint& pos = wxDefaultPosition,
            const wxSize& size = wxDefaultSize, long style = 0,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-           const wxValidator* validator = wxDefaultValidator,
-#  else
            const wxValidator& validator = wxDefaultValidator,
-#  endif
 #endif
            const wxString& name = wxCheckBoxNameStr)
   {
@@ -43,11 +39,7 @@ class WXDLLEXPORT wxCheckBox: public wxControl
            const wxPoint& pos = wxDefaultPosition,
            const wxSize& size = wxDefaultSize, long style = 0,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-           const wxValidator* validator = wxDefaultValidator,
-#  else
            const wxValidator& validator = wxDefaultValidator,
-#  endif
 #endif
            const wxString& name = wxCheckBoxNameStr);
 
@@ -77,11 +69,7 @@ class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
            const wxPoint& pos = wxDefaultPosition,
            const wxSize& size = wxDefaultSize, long style = 0,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-           const wxValidator* validator = wxDefaultValidator,
-#  else
            const wxValidator& validator = wxDefaultValidator,
-#  endif
 #endif
            const wxString& name = wxCheckBoxNameStr)
   {
@@ -92,11 +80,7 @@ class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
            const wxPoint& pos = wxDefaultPosition,
            const wxSize& size = wxDefaultSize, long style = 0,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-           const wxValidator* validator = wxDefaultValidator,
-#  else
            const wxValidator& validator = wxDefaultValidator,
-#  endif
 #endif
            const wxString& name = wxCheckBoxNameStr);
 
index 59a7951d67a3ed75f699c6e50ad4b56d14b94951..1bfeb6c26491b8be07303d808a4f8d08efa441db 100644 (file)
@@ -32,11 +32,7 @@ public:
                  const wxString choices[] = NULL,
                  long style = 0,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-                 const wxValidator* validator = wxDefaultValidator,
-#  else
                  const wxValidator& validator = wxDefaultValidator,
-#  endif
 #endif
                  const wxString& name = wxListBoxNameStr);
 
index 54eab34fa169277b819d4776cf1bec3cdf1b9613..1e3fc5a02b95a45bc25ae0fdddd96da843cecf76 100644 (file)
@@ -29,11 +29,7 @@ public:
              int n = 0, const wxString choices[] = NULL,
              long style = 0,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-             const wxValidator* validator = wxDefaultValidator,
-#  else
              const wxValidator& validator = wxDefaultValidator,
-#  endif
 #endif
              const wxString& name = wxChoiceNameStr)
     {
@@ -46,11 +42,7 @@ public:
              int n = 0, const wxString choices[] = NULL,
              long style = 0,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-             const wxValidator* validator = wxDefaultValidator,
-#  else
              const wxValidator& validator = wxDefaultValidator,
-#  endif
 #endif
              const wxString& name = wxChoiceNameStr);
 
index 1d9b4392f47f5bae6148c5c685828d5d347e97a6..1b8b532805d32f324652253d81dfd2ebd0d99f51 100644 (file)
@@ -34,11 +34,7 @@ class WXDLLEXPORT wxComboBox: public wxChoice
            int n = 0, const wxString choices[] = NULL,
            long style = 0,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-           const wxValidator* validator = wxDefaultValidator,
-#  else
            const wxValidator& validator = wxDefaultValidator,
-#  endif
 #endif
            const wxString& name = wxComboBoxNameStr)
   {
@@ -52,11 +48,7 @@ class WXDLLEXPORT wxComboBox: public wxChoice
            int n = 0, const wxString choices[] = NULL,
            long style = 0,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-           const wxValidator* validator = wxDefaultValidator,
-#  else
            const wxValidator& validator = wxDefaultValidator,
-#  endif
 #endif
            const wxString& name = wxComboBoxNameStr);
 
index e830d71c49f02a4ec44d70db14732a5bfb850b9b..bdb35dcdc964a875c34d2624137001e42c172bf1 100644 (file)
 #ifndef _WX_FRAME_H_
 #define _WX_FRAME_H_
 
-#include "wx/window.h"
-#include "wx/os2/accel.h"
-#include "wx/icon.h"
-
-WXDLLEXPORT_DATA(extern const wxChar*) wxFrameNameStr;
-WXDLLEXPORT_DATA(extern const wxChar*) wxToolBarNameStr;
-WXDLLEXPORT_DATA(extern const wxChar*) wxStatusLineNameStr;
-
-class WXDLLEXPORT wxMenuBar;
-class WXDLLEXPORT wxStatusBar;
-class WXDLLEXPORT wxToolBar;
-
-class WXDLLEXPORT wxFrame : public wxWindow
+class WXDLLEXPORT wxFrame : public wxFrameBase
 {
-    DECLARE_DYNAMIC_CLASS(wxFrame)
-
 public:
-    wxFrame();
+    // 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)
+            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);
     }
 
-    ~wxFrame();
-
     bool Create(wxWindow *parent,
                 wxWindowID id,
                 const wxString& title,
@@ -51,32 +38,26 @@ public:
                 long style = wxDEFAULT_FRAME_STYLE,
                 const wxString& name = wxFrameNameStr);
 
-    virtual bool Destroy();
-
-    void OnSize(wxSizeEvent& event);
-    void OnMenuHighlight(wxMenuEvent& event);
-    void OnActivate(wxActivateEvent& event);
-    void OnIdle(wxIdleEvent& event);
-    void OnCloseWindow(wxCloseEvent& event);
-
-    bool Show(bool show);
-
-    void DetachMenuBar();
-    // Set menu bar
-    void SetMenuBar(wxMenuBar *menu_bar);
-    virtual wxMenuBar *GetMenuBar() const;
+    virtual ~wxFrame();
 
-    // Call this to simulate a menu command
-    bool Command(int id) { return ProcessCommand(id); }
+    // implement base class pure virtuals
+    virtual void Maximize(bool maximize = TRUE);
+    virtual bool IsMaximized() const;
+    virtual void Iconize(bool iconize = TRUE);
+    virtual bool IsIconized() const;
+    virtual void Restore();
+    virtual void SetMenuBar(wxMenuBar *menubar);
+    virtual void SetIcon(const wxIcon& icon);
 
-    // process menu command: returns TRUE if processed
-    bool ProcessCommand(int id);
+    // implementation only from now on
+    // -------------------------------
 
-    // make the window modal (all other windows unresponsive)
-    virtual void MakeModal(bool modal = TRUE);
+    // override some more virtuals
+    virtual bool Show(bool show = TRUE);
 
-    // Set icon
-    virtual void SetIcon(const wxIcon& icon);
+    // event handlers
+    void OnActivate(wxActivateEvent& event);
+    void OnSysColourChanged(wxSysColourChangedEvent& event);
 
     // Toolbar
 #if wxUSE_TOOLBAR
@@ -84,71 +65,36 @@ public:
                                      wxWindowID id = -1,
                                      const wxString& name = wxToolBarNameStr);
 
-    virtual wxToolBar *OnCreateToolBar(long style, wxWindowID id, const wxString& name);
-
-    virtual void SetToolBar(wxToolBar *toolbar) { m_frameToolBar = toolbar; }
-    virtual wxToolBar *GetToolBar() const { return m_frameToolBar; }
-
     virtual void PositionToolBar();
 #endif // wxUSE_TOOLBAR
 
-#if wxUSE_STATUSBAR
     // Status bar
-    virtual wxStatusBar* CreateStatusBar(int number = 1,
-                                         long style = wxST_SIZEGRIP,
-                                         wxWindowID id = 0,
-                                         const wxString& name = wxStatusLineNameStr);
-
-    wxStatusBar *GetStatusBar() const { return m_frameStatusBar; }
-    void SetStatusBar(wxStatusBar *statusBar) { m_frameStatusBar = statusBar; }
+#if wxUSE_STATUSBAR
+    virtual wxStatusBar* OnCreateStatusBar(int number = 1,
+                                           long style = wxST_SIZEGRIP,
+                                           wxWindowID id = 0,
+                                           const wxString& name = wxStatusLineNameStr);
 
     virtual void PositionStatusBar();
-    virtual wxStatusBar *OnCreateStatusBar(int number,
-                                           long style,
-                                           wxWindowID id,
-                                           const wxString& name);
-
-    // Set status line text
-    virtual void SetStatusText(const wxString& text, int number = 0);
 
-    // Set status line widths
-    virtual void SetStatusWidths(int n, const int widths_field[]);
+    // Hint to tell framework which status bar to use: the default is to use
+    // native one for the platforms which support it (Win32), the generic one
+    // otherwise
 
-    // Hint to tell framework which status bar to use
     // TODO: should this go into a wxFrameworkSettings class perhaps?
-    static void UseNativeStatusBar(bool useNative) { m_useNativeStatusBar = useNative; };
-    static bool UsesNativeStatusBar() { return m_useNativeStatusBar; };
+    static void UseNativeStatusBar(bool useNative)
+        { m_useNativeStatusBar = useNative; };
+    static bool UsesNativeStatusBar()
+        { return m_useNativeStatusBar; };
 #endif // wxUSE_STATUSBAR
 
-    // Iconize
-    virtual void Iconize(bool iconize);
-
-    virtual bool IsIconized() const;
-
-    // Is it maximized?
-    virtual bool IsMaximized() const;
-
-    // Compatibility
-    bool Iconized() const { return IsIconized(); }
-
-    virtual void Maximize(bool maximize);
-    //  virtual bool LoadAccelerators(const wxString& table);
-
-    // Responds to colour changes
-    void OnSysColourChanged(wxSysColourChangedEvent& event);
-
-    // Query app for menu item updates (called from OnIdle)
-    void DoMenuUpdates();
-    void DoMenuUpdates(wxMenu* menu, wxWindow* focusWin);
-
     WXHMENU GetWinMenu() const { return m_hMenu; }
 
     // Returns the origin of client area (may be different from (0,0) if the
     // frame has a toolbar)
     virtual wxPoint GetClientAreaOrigin() const;
 
-    // Implementation only from here
-        // event handlers
+    // event handlers
     bool HandlePaint();
     bool HandleSize(int x, int y, WXUINT flag);
     bool HandleCommand(WXWORD id, WXWORD cmd, WXHWND control);
@@ -158,13 +104,19 @@ public:
                    wxWindow *wx_win, const wxChar *title,
                    int x, int y, int width, int height, long style);
 
-  // tooltip management
+    // tooltip management
 #if wxUSE_TOOLTIPS
     WXHWND GetToolTipCtrl() const { return m_hwndToolTip; }
     void SetToolTipCtrl(WXHWND hwndTT) { m_hwndToolTip = hwndTT; }
 #endif // tooltips
 
 protected:
+    // common part of all ctors
+    void Init();
+
+    // common part of Iconize(), Maximize() and Restore()
+    void DoShowWindow(int nShowCmd);
+
     // override base class virtuals
     virtual void DoGetClientSize(int *width, int *height) const;
     virtual void DoGetSize(int *width, int *height) const;
@@ -175,6 +127,9 @@ protected:
     virtual void DoClientToScreen(int *x, int *y) const;
     virtual void DoScreenToClient(int *x, int *y) const;
 
+    // helper
+    void DetachMenuBar();
+
     // a plug in for MDI frame classes which need to do something special when
     // the menubar is set
     virtual void InternalSetMenuBar();
@@ -188,27 +143,20 @@ protected:
     // window proc for the frames
     MRESULT OS2WindowProc(HWND hwnd, WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
 
-    wxMenuBar *           m_frameMenuBar;
-    wxIcon                m_icon;
     bool                  m_iconized;
     WXHICON               m_defaultIcon;
 
 #if wxUSE_STATUSBAR
-    wxStatusBar *         m_frameStatusBar;
-
     static bool           m_useNativeStatusBar;
 #endif // wxUSE_STATUSBAR
 
-#if wxUSE_TOOLBAR
-    wxToolBar*            m_frameToolBar;
-#endif // wxUSE_TOOLBAR
-
 private:
 #if wxUSE_TOOLTIPS
     WXHWND                m_hwndToolTip;
 #endif // tooltips
 
     DECLARE_EVENT_TABLE()
+    DECLARE_DYNAMIC_CLASS(wxFrame)
 };
 
 #endif
index cdb6d227f6a65742347151e5afb7c596ea983c28..24c44ba4c8b53ac4a3746a04b9405fbf20341ca2 100644 (file)
@@ -28,11 +28,7 @@ class WXDLLEXPORT wxGauge: public wxControl
            const wxSize& size = wxDefaultSize,
            long style = wxGA_HORIZONTAL,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-           const wxValidator* validator = wxDefaultValidator,
-#  else
            const wxValidator& validator = wxDefaultValidator,
-#  endif
 #endif
            const wxString& name = wxGaugeNameStr)
   {
@@ -45,11 +41,7 @@ class WXDLLEXPORT wxGauge: public wxControl
            const wxSize& size = wxDefaultSize,
            long style = wxGA_HORIZONTAL,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-           const wxValidator* validator = wxDefaultValidator,
-#  else
            const wxValidator& validator = wxDefaultValidator,
-#  endif
 #endif
            const wxString& name = wxGaugeNameStr);
 
index 4a5691fb7ba9b686cf72a0cba5bc18135a6535f8..4bc2ade8bebb4bc91c38b49ee64d92a4e48e79a8 100644 (file)
@@ -43,11 +43,7 @@ public:
             int n = 0, const wxString choices[] = NULL,
             long style = 0,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-            const wxValidator* validator = wxDefaultValidator,
-#  else
             const wxValidator& validator = wxDefaultValidator,
-#  endif
 #endif
             const wxString& name = wxListBoxNameStr)
     {
@@ -60,11 +56,7 @@ public:
                 int n = 0, const wxString choices[] = NULL,
                 long style = 0,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-                const wxValidator* validator = wxDefaultValidator,
-#  else
                 const wxValidator& validator = wxDefaultValidator,
-#  endif
 #endif
                 const wxString& name = wxListBoxNameStr);
 
index ec2ac64f86244f8543d1197099dede317f735258..9c424e88940cd001a8167d29911efc44593bb34c 100644 (file)
@@ -30,11 +30,7 @@ public:
              int n = 0, const wxString choices[] = NULL,
              int majorDim = 0, long style = wxRA_HORIZONTAL,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-             const wxValidator* val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr)
-#  else
              const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr)
-#  endif
 #endif
   {
     Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name);
@@ -47,11 +43,7 @@ public:
              int n = 0, const wxString choices[] = NULL,
              int majorDim = 0, long style = wxRA_HORIZONTAL,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-             const wxValidator* val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
-#  else
              const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
-#  endif
 #endif
 
   virtual bool OS2Command(WXUINT param, WXWORD id);
index 996f74487c1410de55bba8e68142de9e928b40ef..f1e03be04a577d8a9c30dae5942695146f753331 100644 (file)
@@ -27,11 +27,7 @@ class WXDLLEXPORT wxRadioButton: public wxControl
            const wxPoint& pos = wxDefaultPosition,
            const wxSize& size = wxDefaultSize, long style = 0,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-           const wxValidator* validator = wxDefaultValidator,
-#  else
            const wxValidator& validator = wxDefaultValidator,
-#  endif
 #endif
            const wxString& name = wxRadioButtonNameStr)
   {
@@ -43,11 +39,7 @@ class WXDLLEXPORT wxRadioButton: public wxControl
            const wxPoint& pos = wxDefaultPosition,
            const wxSize& size = wxDefaultSize, long style = 0,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-           const wxValidator* validator = wxDefaultValidator,
-#  else
            const wxValidator& validator = wxDefaultValidator,
-#  endif
 #endif
            const wxString& name = wxRadioButtonNameStr);
 
@@ -76,11 +68,7 @@ class WXDLLEXPORT wxBitmapRadioButton: public wxRadioButton
            const wxPoint& pos = wxDefaultPosition,
            const wxSize& size = wxDefaultSize, long style = 0,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-           const wxValidator* validator = wxDefaultValidator,
-#  else
            const wxValidator& validator = wxDefaultValidator,
-#  endif
 #endif
            const wxString& name = wxBitmapRadioButtonNameStr)
   {
@@ -92,11 +80,7 @@ class WXDLLEXPORT wxBitmapRadioButton: public wxRadioButton
            const wxPoint& pos = wxDefaultPosition,
            const wxSize& size = wxDefaultSize, long style = 0,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-           const wxValidator* validator = wxDefaultValidator,
-#  else
            const wxValidator& validator = wxDefaultValidator,
-#  endif
 #endif
            const wxString& name = wxBitmapRadioButtonNameStr);
 
index 7be44ed401ee3f6f814cff0eabaef2ad46e2601f..e77f17ec4457ebfc9ebabfa71758b21fd4d75083 100644 (file)
@@ -30,11 +30,7 @@ public:
            const wxSize& size = wxDefaultSize,
            long style = wxSB_HORIZONTAL,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-           const wxValidator* validator = wxDefaultValidator,
-#  else
            const wxValidator& validator = wxDefaultValidator,
-#  endif
 #endif
            const wxString& name = wxScrollBarNameStr)
   {
@@ -45,11 +41,7 @@ public:
            const wxSize& size = wxDefaultSize,
            long style = wxSB_HORIZONTAL,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-           const wxValidator* validator = wxDefaultValidator,
-#  else
            const wxValidator& validator = wxDefaultValidator,
-#  endif
 #endif
            const wxString& name = wxScrollBarNameStr);
 
index 09ed09095772278e80f12388854789c66987ec5b..b290372735dfa0d207cc03bccc8060e8001b6fc7 100644 (file)
@@ -30,11 +30,7 @@ public:
            const wxSize& size = wxDefaultSize,
            long style = wxSL_HORIZONTAL,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-           const wxValidator* validator = wxDefaultValidator,
-#  else
            const wxValidator& validator = wxDefaultValidator,
-#  endif
 #endif
            const wxString& name = wxSliderNameStr)
   {
@@ -49,11 +45,7 @@ public:
            const wxSize& size = wxDefaultSize,
            long style = wxSL_HORIZONTAL,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-           const wxValidator* validator = wxDefaultValidator,
-#  else
            const wxValidator& validator = wxDefaultValidator,
-#  endif
 #endif
            const wxString& name = wxSliderNameStr);
 
index 56ba625ffa30a23c5eb114129d7a5824cb4e7dcb..a378830e5522bb1020cad8f88321a61343f7790f 100644 (file)
@@ -25,11 +25,7 @@ public:
                const wxSize& size = wxDefaultSize,
                long style = 0,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-               const wxValidator* validator = wxDefaultValidator,
-#  else
                const wxValidator& validator = wxDefaultValidator,
-#  endif
 #endif
                const wxString& name = wxTextCtrlNameStr)
     {
@@ -42,11 +38,7 @@ public:
                 const wxSize& size = wxDefaultSize,
                 long style = 0,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-                const wxValidator* validator = wxDefaultValidator,
-#  else
                 const wxValidator& validator = wxDefaultValidator,
-#  endif
 #endif
                 const wxString& name = wxTextCtrlNameStr);
 
index 370f38e473e24badc8e372e81204834abb6edde0..25a4c5894aa06ea27dc58c1a70b5cff13ee2f13b 100644 (file)
@@ -82,11 +82,7 @@ private:
     DECLARE_DYNAMIC_CLASS(wxValidator)
 };
 
-#if defined(__VISAGECPP__)
-WXDLLEXPORT_DATA(extern const wxValidator*) wxDefaultValidator;
-#else
 WXDLLEXPORT_DATA(extern const wxValidator) wxDefaultValidator;
-#endif
 
 #endif // wxUSE_VALIDATORS
 
index afc521e18f019ba0f85976c9214096df71a2b77f..f78da2dbfce7aeb8c4dbb035b8806967aecf9559 100644 (file)
@@ -121,12 +121,9 @@ public:
                     const wxPoint& pos = wxDefaultPosition,
                     const wxSize& size = wxDefaultSize,
                     long style = 0,
+
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-                    const wxValidator* validator = wxDefaultValidator,
-#  else
                     const wxValidator& validator = wxDefaultValidator,
-#  endif
 #endif // wxUSE_VALIDATORS
                     const wxString& name = wxPanelNameStr);
 
@@ -392,11 +389,7 @@ public:
 #if wxUSE_VALIDATORS
         // a window may have an associated validator which is used to control
         // user input
-#  if defined(__VISAGECPP__)
-    virtual void SetValidator( const wxValidator *validator );
-#  else
     virtual void SetValidator( const wxValidator &validator );
-#  endif
     virtual wxValidator *GetValidator() { return m_windowValidator; }
 #endif // wxUSE_VALIDATORS
 
index be7735196dbd9c357e5849d8fdc142ff7154abac..dec9f63a0c724a07c892e4263090456c8e0a38c7 100644 (file)
@@ -43,11 +43,7 @@ bool wxControlBase::CreateControl(wxWindowBase *parent,
                                   const wxSize& size,
                                   long style,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-                                  const wxValidator* validator,
-#  else
                                   const wxValidator& validator,
-#  endif
 #endif
                                   const wxString& name)
 {
index 50d072c6b28c6ea975a717bdd48eac65f09e721e..44e0caeeceb8adf77fb44313e5b66df57d1519aa 100644 (file)
 
 #include "wx/validate.h"
 
-#if defined(__VISAGECPP__)
-// treated as a static global class by VA and thus cannot use in this form.
-// Defined as a pointer and then explicity allocated and deallocated
-// by user if desired
-const wxValidator* wxDefaultValidator = NULL;
-#else
 const wxValidator wxDefaultValidator;
-#endif
 
 #if !USE_SHARED_LIBRARY
     IMPLEMENT_DYNAMIC_CLASS(wxValidator, wxEvtHandler)
index 782d3bf7d17e2f035834e947e04c37ea4ae0d6d1..dd3822251dc7f176f2fa8020166cb9909fb237dd 100644 (file)
@@ -159,11 +159,7 @@ bool wxWindowBase::CreateBase(wxWindowBase *parent,
                               const wxSize& WXUNUSED(size),
                               long style,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-                              const wxValidator* validator,
-#  else
                               const wxValidator& validator,
-#  endif
 #endif
                               const wxString& name)
 {
@@ -619,18 +615,6 @@ void wxWindowBase::SetCaret(wxCaret *caret)
 // validators
 // ----------------------------------------------------------------------------
 
-#  if defined(__VISAGECPP__)
-void wxWindowBase::SetValidator(const wxValidator* validator)
-{
-    if ( m_windowValidator )
-        delete m_windowValidator;
-
-    m_windowValidator = (wxValidator *)validator->Clone();
-
-    if ( m_windowValidator )
-        m_windowValidator->SetWindow(this) ;
-}
-#  else
 void wxWindowBase::SetValidator(const wxValidator& validator)
 {
     if ( m_windowValidator )
@@ -641,7 +625,6 @@ void wxWindowBase::SetValidator(const wxValidator& validator)
     if ( m_windowValidator )
         m_windowValidator->SetWindow(this) ;
 }
-#  endif // __VISAGECPP__
 #endif // wxUSE_VALIDATORS
 
 // ----------------------------------------------------------------------------
index ead089a2052d09230db769765fb871dd9b4edcf4..59bf7da65d474aa27cc2c0f616982d058023bcc1 100644 (file)
@@ -981,11 +981,7 @@ wxListTextCtrl::wxListTextCtrl( wxWindow *parent, const wxWindowID id,
     bool *accept, wxString *res, wxListMainWindow *owner,
     const wxString &value, const wxPoint &pos, const wxSize &size,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-    int style, const wxValidator* validator, const wxString &name ) :
-#  else
     int style, const wxValidator& validator, const wxString &name ) :
-#  endif
 #endif
   wxTextCtrl( parent, id, value, pos, size, style, validator, name )
 {
@@ -2576,11 +2572,7 @@ wxListCtrl::~wxListCtrl()
 bool wxListCtrl::Create( wxWindow *parent, wxWindowID id,
       const wxPoint &pos, const wxSize &size,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-      long style, const wxValidator *validator,
-#  else
       long style, const wxValidator &validator,
-#  endif
 #endif
       const wxString &name )
 {
index aaaeeed06b3268ff9f7c6d213d7d27cadadf07d8..0c7de225773209712422708a2743d1fb060aec96 100644 (file)
@@ -197,11 +197,7 @@ wxTreeTextCtrl::wxTreeTextCtrl( wxWindow *parent, const wxWindowID id,
     bool *accept, wxString *res, wxTreeCtrl *owner,
     const wxString &value, const wxPoint &pos, const wxSize &size,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-    int style, const wxValidator* validator, const wxString &name ) :
-#  else
     int style, const wxValidator& validator, const wxString &name ) :
-#  endif
 #endif
   wxTextCtrl( parent, id, value, pos, size, style, validator, name )
 {
@@ -523,7 +519,7 @@ void wxTreeCtrl::Init()
   m_dragCount = 0;
 
   m_renameTimer = new wxTreeRenameTimer( this );
-  
+
   m_normalFont = wxSystemSettings::GetSystemFont( wxSYS_DEFAULT_GUI_FONT );
   m_boldFont = wxFont( m_normalFont.GetPointSize(),
                             m_normalFont.GetFamily(),
@@ -536,11 +532,7 @@ bool wxTreeCtrl::Create(wxWindow *parent, wxWindowID id,
                         const wxPoint& pos, const wxSize& size,
                         long style,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-            const wxValidator *validator,
-#  else
             const wxValidator &validator,
-#  endif
 #endif
             const wxString& name )
 {
@@ -843,7 +835,7 @@ wxTreeItemId wxTreeCtrl::DoInsertItem(const wxTreeItemId& parentId,
     }
 
     wxClientDC dc(this);
-    wxGenericTreeItem *item = 
+    wxGenericTreeItem *item =
         new wxGenericTreeItem( parent, text, dc, image, selImage, data );
 
     if ( data != NULL )
@@ -871,7 +863,7 @@ wxTreeItemId wxTreeCtrl::AddRoot(const wxString& text,
     {
         data->m_pItem = m_anchor;
     }
-  
+
     if (!HasFlag(wxTR_MULTIPLE))
     {
         m_current = m_key_current = m_anchor;
@@ -1602,7 +1594,7 @@ void wxTreeCtrl::OnPaint( wxPaintEvent &WXUNUSED(event) )
 
     dc.SetFont( m_normalFont );
     dc.SetPen( m_dottedPen );
-    
+
     // this is now done dynamically
     //if(GetImageList() == NULL)
     // m_lineHeight = (int)(dc.GetCharHeight() + 4);
index 68fbdd7f4c3ad5d2d0fcc7eaae9f1d5e803c943a..8f61ef0ffc86aee301993eb602b229c3b1a4b6b8 100644 (file)
@@ -292,6 +292,12 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id, const wxString& ti
     // showtime
     if (m_NavigPan && m_Splitter) {
         m_Splitter -> SetMinimumPaneSize(20);
+        if (m_Cfg.navig_on)
+            m_Splitter -> SplitVertically(m_NavigPan, m_HtmlWin, m_Cfg.sashpos);
+        else {
+            m_Splitter -> SplitVertically(m_NavigPan, m_HtmlWin, m_Cfg.sashpos);
+            m_Splitter -> Unsplit();
+        }
         if (m_Cfg.navig_on) {
             m_NavigPan -> Show(TRUE);
             m_Splitter -> SplitVertically(m_NavigPan, m_HtmlWin, m_Cfg.sashpos);
index b4926a384fcec9c26354671e0d50d3896c5b15d4..50c8d57b87e2e530520cbcf972cf8c845b14385a 100644 (file)
@@ -19,7 +19,7 @@ OS2LIBFLAGS=/NOL /NOE
 OS2LIBS=CPPOM30.lib CPPOOC3.LIB OS2386.LIB
 
 # Change WXDIR or WXWIN to wherever wxWindows is found
-WXDIR = j:\dev\wx2\wxWindows
+WXDIR = h:\dev\wx2\wxWindows
 
 OS2JPEGDIR=$(WXDIR)\src\jpeg
 OS2JPEGINC=$(WINJPEGDIR)
index 92897f90728078fd1184ec09bccf91e64faef1e6..6d7c6ebc811e1f289e407b3fe620ee3deead6c92 100644 (file)
@@ -350,22 +350,22 @@ test:   $(MSWDIR)\$D\wave.obj
 test2:  ..\common\Debug\config.obj
 
 $D:
-    mkdir $D
+    md $D
 
 $(COMMDIR)\$D:
-    mkdir $(COMMDIR)\$D
+    md $(COMMDIR)\$D
 
 $(MSWDIR)\$D:
-    mkdir $(MSWDIR)\$D
+    md $(MSWDIR)\$D
 
 $(GENDIR)\$D:
-    mkdir $(GENDIR)\$D
+    md $(GENDIR)\$D
 
 $(OLEDIR)\$D:
-    mkdir $(OLEDIR)\$D
+    md $(OLEDIR)\$D
 
 $(HTMLDIR)\$D:
-    mkdir $(HTMLDIR)\$D
+    md $(HTMLDIR)\$D
 
 # wxWindows library as DLL
 dll:
@@ -727,7 +727,7 @@ $(DOCDIR)/pdf/techref.rtf:         $(DOCDIR)/latex/techref/techref.tex
 
 $(DOCDIR)\html\wx\wx.htm:         $(DOCDIR)\latex\wx\classes.tex $(DOCDIR)\latex\wx\body.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)\latex\wx\manual.tex
         cd $(DOCDIR)\latex\wx
-        -mkdir $(DOCDIR)\html\wx
+        -md $(DOCDIR)\html\wx
         -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\wx\manual.tex $(DOCDIR)\html\wx\wx.htm -twice -html
         -erase $(DOCDIR)\html\wx\*.con
         -erase $(DOCDIR)\html\wx\*.ref
@@ -743,7 +743,7 @@ $(DOCDIR)\html\wx\wx.chm : $(DOCDIR)\html\wx\wx.htm $(DOCDIR)\html\wx\wx.hhp
 
 $(DOCDIR)\html\porting\port.htm:         $(DOCDIR)\latex\porting\porting.tex
         cd $(DOCDIR)\latex\porting
-        -mkdir $(DOCDIR)\html\porting
+        -md $(DOCDIR)\html\porting
         -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\porting\porting.tex $(DOCDIR)\html\porting\port.htm -twice -html
         -erase $(DOCDIR)\html\porting\*.con
         -erase $(DOCDIR)\html\porting\*.ref
@@ -753,7 +753,7 @@ $(DOCDIR)\html\porting\port.htm:         $(DOCDIR)\latex\porting\porting.tex
 
 $(DOCDIR)\html\proplist\prop.htm:         $(DOCDIR)\latex\proplist\prop.tex $(DOCDIR)\latex\proplist\body.tex $(DOCDIR)\latex\proplist\classes.tex $(DOCDIR)\latex\proplist\changes.tex
         cd $(DOCDIR)\latex\proplist
-        -mkdir $(DOCDIR)\html\proplist
+        -md $(DOCDIR)\html\proplist
         -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\proplist\prop.tex $(DOCDIR)\html\proplist\prop.htm -twice -html
         -erase $(DOCDIR)\html\proplist\*.con
         -erase $(DOCDIR)\html\proplist\*.ref
index 0035901c3b372d6cc9ea82830214d2277e629958..8f61361eba44f941d4e258b88669db892535d19d 100644 (file)
@@ -29,11 +29,7 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bit
            const wxPoint& pos,
            const wxSize& size, long style,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-           const wxValidator* validator,
-#  else
            const wxValidator& validator,
-#  endif
 #endif
            const wxString& name)
 {
index dc33b17225f21cc0a7cb97bb756afac70368ca1d..c4f5ac0f1066c3885281785c60174afdd75177c9 100644 (file)
@@ -33,11 +33,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
            const wxPoint& pos,
            const wxSize& size, long style,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-           const wxValidator* validator,
-#  else
            const wxValidator& validator,
-#  endif
 #endif
            const wxString& name)
 {
index 035c4504cc34c7e5e012ccaf670e0eade745ad98..c4a3b2f099325c49151db95cc20c35d1be7bc744 100644 (file)
@@ -50,11 +50,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
            const wxPoint& pos,
            const wxSize& size, long style,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-           const wxValidator* validator,
-#  else
            const wxValidator& validator,
-#  endif
 #endif
            const wxString& name)
 {
@@ -185,11 +181,7 @@ bool wxBitmapCheckBox::Create(wxWindow *parent, wxWindowID id, const wxBitmap *l
            const wxPoint& pos,
            const wxSize& size, long style,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-           const wxValidator* validator,
-#  else
            const wxValidator& validator,
-#  endif
 #endif
            const wxString& name)
 {
index e53cf202841a4c493f8de6870c3462bb20bd8466..b11ed7c1f8cf0698961c32b9f76fb3500cbaf992 100644 (file)
@@ -260,11 +260,7 @@ wxCheckListBox::wxCheckListBox(wxWindow *parent, wxWindowID id,
                                const wxPoint& pos, const wxSize& size,
                                int nStrings, const wxString choices[],
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-                               long style, const wxValidator* val,
-#  else
                                long style, const wxValidator& val,
-#  endif
 #endif
                                const wxString& name)
               : wxListBox()
index dbfeedf60a77a9849e3f28595e593689e81eb05f..b5dc463a1e09a651c222084b803dbb7736647e14 100644 (file)
@@ -31,11 +31,7 @@ bool wxChoice::Create(wxWindow *parent,
                       int n, const wxString choices[],
                       long style,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-                      const wxValidator* validator,
-#  else
                       const wxValidator& validator,
-#  endif
 #endif
                       const wxString& name)
 {
diff --git a/src/os2/colordlg.cpp b/src/os2/colordlg.cpp
deleted file mode 100644 (file)
index 4460798..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name:        colordlg.cpp
-// Purpose:     wxColourDialog class. NOTE: you can use the generic class
-//              if you wish, instead of implementing this.
-// Author:      David Webster
-// Modified by:
-// Created:     10/13/99
-// RCS-ID:      $Id$
-// Copyright:   (c) David Webster
-// Licence:     wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-// For compilers that support precompilation, includes "wx.h".
-#include "wx/wxprec.h"
-
-#ifndef WX_PRECOMP
-#include <stdio.h>
-#include "wx/defs.h"
-#include "wx/bitmap.h"
-#include "wx/pen.h"
-#include "wx/brush.h"
-#include "wx/colour.h"
-#include "wx/gdicmn.h"
-#include "wx/utils.h"
-#include "wx/frame.h"
-#include "wx/dialog.h"
-#include "wx/msgdlg.h"
-#endif
-
-#define INCL_PM
-#include <os2.h>
-
-#include "wx/os2/private.h"
-#include "wx/colordlg.h"
-#include "wx/cmndata.h"
-
-#include <math.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define wxDIALOG_DEFAULT_X 300
-#define wxDIALOG_DEFAULT_Y 300
-
-#if !USE_SHARED_LIBRARY
-IMPLEMENT_DYNAMIC_CLASS(wxColourDialog, wxDialog)
-#endif
-
-/*
- * wxColourDialog
- */
-
-wxColourDialog::wxColourDialog()
-{
-    m_dialogParent = NULL;
-}
-
-wxColourDialog::wxColourDialog(wxWindow *parent, wxColourData *data)
-{
-    Create(parent, data);
-}
-
-bool wxColourDialog::Create(wxWindow *parent, wxColourData *data)
-{
-    m_dialogParent = parent;
-
-    if (data)
-        m_colourData = *data;
-    return TRUE;
-}
-
-int wxColourDialog::ShowModal()
-{
-    /* TODO: implement dialog
-     */
-
-    return wxID_CANCEL;
-}
-
index d8b0bd0e6d594563c4ef5cdbce475666c6a27fb0..a91a566f367b3f9195d830d032e2d64d7b8f46e4 100644 (file)
@@ -64,11 +64,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
                         int n, const wxString choices[],
                         long style,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-                        const wxValidator* validator,
-#  else
                         const wxValidator& validator,
-#  endif
 #endif
                         const wxString& name)
 {
index 3464ed330028b62f23b3698ef1e4545a2dec8bdc..fa543a0f5259ef5d5a1d1cd3c03ae5e68485c76f 100644 (file)
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
-#ifdef __BORLANDC__
-    #pragma hdrstop
-#endif
-
 #ifndef WX_PRECOMP
     #include "wx/setup.h"
     #include "wx/frame.h"
 #endif // WX_PRECOMP
 
 #include "wx/os2/private.h"
-#include "wx/statusbr.h"
-#include "wx/toolbar.h"
+
+#if wxUSE_STATUSBAR
+    #include "wx/statusbr.h"
+#endif // wxUSE_STATUSBAR
+
+#if wxUSE_TOOLBAR
+    #include "wx/toolbar.h"
+#endif // wxUSE_TOOLBAR
+
 #include "wx/menuitem.h"
 #include "wx/log.h"
 
+// ----------------------------------------------------------------------------
+// globals
+// ----------------------------------------------------------------------------
+
 extern wxWindowList wxModelessWindows;
 extern wxList WXDLLEXPORT wxPendingDelete;
 extern wxChar wxFrameClassName[];
 extern wxMenu *wxCurrentPopupMenu;
 
+// ----------------------------------------------------------------------------
+// event tables
+// ----------------------------------------------------------------------------
+
 #if !USE_SHARED_LIBRARY
-BEGIN_EVENT_TABLE(wxFrame, wxWindow)
-  EVT_SIZE(wxFrame::OnSize)
-  EVT_ACTIVATE(wxFrame::OnActivate)
-  EVT_MENU_HIGHLIGHT_ALL(wxFrame::OnMenuHighlight)
-  EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged)
-  EVT_IDLE(wxFrame::OnIdle)
-  EVT_CLOSE(wxFrame::OnCloseWindow)
+BEGIN_EVENT_TABLE(wxFrame, wxFrameBase)
+    EVT_ACTIVATE(wxFrame::OnActivate)
+    EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged)
 END_EVENT_TABLE()
 
 IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxWindow)
 #endif
 
-bool wxFrame::m_useNativeStatusBar = FALSE;
+// ============================================================================
+// implementation
+// ============================================================================
 
-wxFrame::wxFrame()
-{
-  m_frameToolBar = NULL ;
-  m_frameMenuBar = NULL;
-  m_frameStatusBar = NULL;
+// ----------------------------------------------------------------------------
+// static class members
+// ----------------------------------------------------------------------------
 
-  m_iconized = FALSE;
-}
+#if wxUSE_NATIVE_STATUSBAR
+    bool wxFrame::m_useNativeStatusBar = TRUE;
+#else
+    bool wxFrame::m_useNativeStatusBar = FALSE;
+#endif
 
-bool wxFrame::Create(wxWindow *parent,
-           wxWindowID id,
-           const wxString& title,
-           const wxPoint& pos,
-           const wxSize& size,
-           long style,
-           const wxString& name)
+// ----------------------------------------------------------------------------
+// creation/destruction
+// ----------------------------------------------------------------------------
+
+void wxFrame::Init()
 {
+    m_iconized = FALSE;
+
 #if wxUSE_TOOLTIPS
     m_hwndToolTip = 0;
 #endif
+}
 
+bool wxFrame::Create(wxWindow *parent,
+                     wxWindowID id,
+                     const wxString& title,
+                     const wxPoint& pos,
+                     const wxSize& size,
+                     long style,
+                     const wxString& name)
+{
   SetName(name);
   m_windowStyle = style;
   m_frameMenuBar = NULL;
-  m_frameToolBar = NULL ;
+  m_frameToolBar = NULL;
   m_frameStatusBar = NULL;
 
   SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE));
 
-//  m_icon = NULL;
   if ( id > -1 )
     m_windowId = id;
   else
@@ -119,13 +137,9 @@ wxFrame::~wxFrame()
   m_isBeingDeleted = TRUE;
   wxTopLevelWindows.DeleteObject(this);
 
-  if (m_frameStatusBar)
-    delete m_frameStatusBar;
-  if (m_frameMenuBar)
-    delete m_frameMenuBar;
-
-/* New behaviour March 1998: check if it's the last top-level window */
-//  if (wxTheApp && (this == wxTheApp->GetTopWindow()))
+// TODO:
+/*
+  DeleteAllBars();
 
   if (wxTheApp && (wxTopLevelWindows.Number() == 0))
   {
@@ -133,7 +147,7 @@ wxFrame::~wxFrame()
 
     if (wxTheApp->GetExitOnFrameDelete())
     {
-//       PostQuitMessage(0);
+       PostQuitMessage(0);
     }
   }
 
@@ -144,9 +158,6 @@ wxFrame::~wxFrame()
   // Try to bring the parent to the top.
   // MT:Only do this if this frame is currently the active window, else weird
   // things start to happen
-
-// TODO:
-/*
   if ( wxGetActiveWindow() == this )
   if (GetParent() && GetParent()->GetHWND())
     ::BringWindowToTop((HWND) GetParent()->GetHWND());
@@ -161,12 +172,14 @@ void wxFrame::DoGetClientSize(int *x, int *y) const
   RECT rect;
   ::GetClientRect(GetHwnd(), &rect);
 
+#if wxUSE_STATUSBAR
   if ( GetStatusBar() )
   {
     int statusX, statusY;
     GetStatusBar()->GetClientSize(&statusX, &statusY);
     rect.bottom -= statusY;
   }
+#endif // wxUSE_STATUSBAR
 
   wxPoint pt(GetClientAreaOrigin());
   rect.bottom -= pt.y;
@@ -199,12 +212,14 @@ void wxFrame::DoSetClientSize(int width, int height)
   int actual_width = rect2.right - rect2.left - rect.right + width;
   int actual_height = rect2.bottom - rect2.top - rect.bottom + height;
 
+#if wxUSE_STATUSBAR
   if ( GetStatusBar() )
   {
     int statusX, statusY;
     GetStatusBar()->GetClientSize(&statusX, &statusY);
     actual_height += statusY;
   }
+#endif // wxUSE_STATUSBAR
 
   wxPoint pt(GetClientAreaOrigin());
   actual_width += pt.y;
@@ -248,73 +263,61 @@ void wxFrame::DoGetPosition(int *x, int *y) const
 */
 }
 
-bool wxFrame::Show(bool show)
+// ----------------------------------------------------------------------------
+// variations around ::ShowWindow()
+// ----------------------------------------------------------------------------
+
+void wxFrame::DoShowWindow(int nShowCmd)
 {
 // TODO:
 /*
-  int cshow;
-  if (show)
-    cshow = SW_SHOW;
-  else
-    cshow = SW_HIDE;
-
-  if (!show)
-  {
-    // Try to highlight the correct window (the parent)
-    HWND hWndParent = 0;
-    if (GetParent())
-    {
-      hWndParent = (HWND) GetParent()->GetHWND();
-      if (hWndParent)
-        ::BringWindowToTop(hWndParent);
-    }
-  }
-
-  ShowWindow(GetHwnd(), (BOOL)cshow);
-  if (show)
-  {
-    BringWindowToTop(GetHwnd());
+    ::ShowWindow(GetHwnd(), nShowCmd);
 
-    wxActivateEvent event(wxEVT_ACTIVATE, TRUE, m_windowId);
-    event.SetEventObject( this );
-    GetEventHandler()->ProcessEvent(event);
-  }
-  return TRUE;
+    m_iconized = nShowCmd == SW_MINIMIZE;
 */
-  return FALSE;
 }
 
-void wxFrame::Iconize(bool iconize)
+bool wxFrame::Show(bool show)
 {
 // TODO:
 /*
-  if (!iconize)
-    Show(TRUE);
+    DoShowWindow(show ? SW_SHOW : SW_HIDE);
 
-  int cshow;
-  if (iconize)
-    cshow = SW_MINIMIZE;
-  else
-    cshow = SW_RESTORE;
-  ShowWindow(GetHwnd(), (BOOL)cshow);
-  m_iconized = iconize;
+    if ( show )
+    {
+        ::BringWindowToTop(GetHwnd());
+
+        wxActivateEvent event(wxEVT_ACTIVATE, TRUE, m_windowId);
+        event.SetEventObject( this );
+        GetEventHandler()->ProcessEvent(event);
+    }
+    else
+    {
+        // Try to highlight the correct window (the parent)
+        if ( GetParent() )
+        {
+            HWND hWndParent = GetHwndOf(GetParent());
+            if (hWndParent)
+                ::BringWindowToTop(hWndParent);
+        }
+    }
 */
+    return TRUE;
+}
+
+void wxFrame::Iconize(bool iconize)
+{
+//    DoShowWindow(iconize ? SW_MINIMIZE : SW_RESTORE);
 }
 
-// Equivalent to maximize/restore in Windows
 void wxFrame::Maximize(bool maximize)
 {
-// TODO:
-/*
-  Show(TRUE);
-  int cshow;
-  if (maximize)
-    cshow = SW_MAXIMIZE;
-  else
-    cshow = SW_RESTORE;
-  ShowWindow(GetHwnd(), cshow);
-  m_iconized = FALSE;
-*/
+//    DoShowWindow(maximize ? SW_MAXIMIZE : SW_RESTORE);
+}
+
+void wxFrame::Restore()
+{
+//    DoShowWindow(SW_RESTORE);
 }
 
 bool wxFrame::IsIconized() const
@@ -324,99 +327,63 @@ bool wxFrame::IsIconized() const
   ((wxFrame *)this)->m_iconized = (::IsIconic(GetHwnd()) != 0);
   return m_iconized;
 */
-  return FALSE;
+    return FALSE;
 }
 
 // Is it maximized?
 bool wxFrame::IsMaximized() const
 {
-//    return (::IsZoomed(GetHwnd()) != 0) ;
-  return FALSE;
+// TODO:
+/*
+    return (::IsZoomed(GetHwnd()) != 0);
+*/
+    return FALSE;
 }
 
 void wxFrame::SetIcon(const wxIcon& icon)
 {
+    wxFrameBase::SetIcon(icon);
+
 // TODO:
 /*
-  m_icon = icon;
-  if ( m_icon.Ok() )
-    SendMessage(GetHwnd(), WM_SETICON,
-                (WPARAM)TRUE, (LPARAM)(HICON) m_icon.GetHICON());
+    if ( m_icon.Ok() )
+    {
+        SendMessage(GetHwnd(), WM_SETICON,
+                    (WPARAM)TRUE, (LPARAM)(HICON) m_icon.GetHICON());
+    }
 */
 }
 
 #if wxUSE_STATUSBAR
-wxStatusBar *wxFrame::OnCreateStatusBar(int number, long style, wxWindowID id,
-    const wxString& name)
+wxStatusBar *wxFrame::OnCreateStatusBar(int number,
+                                        long style,
+                                        wxWindowID id,
+                                        const wxString& name)
 {
     wxStatusBar *statusBar = NULL;
-    {
-        statusBar = new wxStatusBar(this, id, wxPoint(0, 0), wxSize(100, 20),
-            style, name);
-
-        // Set the height according to the font and the border size
-        wxClientDC dc(statusBar);
-        dc.SetFont(statusBar->GetFont());
-
-        long x, y;
-        dc.GetTextExtent("X", &x, &y);
-
-        int height = (int)( (y  * 1.1) + 2* statusBar->GetBorderY());
-
-        statusBar->SetSize(-1, -1, 100, height);
-    }
-
-  statusBar->SetFieldsCount(number);
-  return statusBar;
-}
-
-wxStatusBar* wxFrame::CreateStatusBar(int number, long style, wxWindowID id,
-    const wxString& name)
-{
-  // VZ: calling CreateStatusBar twice is an error - why anyone would do it?
-  wxCHECK_MSG( m_frameStatusBar == NULL, FALSE,
-               wxT("recreating status bar in wxFrame") );
-
-  m_frameStatusBar = OnCreateStatusBar(number, style, id,
-    name);
-  if ( m_frameStatusBar )
-  {
-    PositionStatusBar();
-    return m_frameStatusBar;
-  }
-  else
-    return NULL;
-}
-
-void wxFrame::SetStatusText(const wxString& text, int number)
-{
-  wxCHECK_RET( m_frameStatusBar != NULL, wxT("no statusbar to set text for") );
 
-  m_frameStatusBar->SetStatusText(text, number);
-}
-
-void wxFrame::SetStatusWidths(int n, const int widths_field[])
-{
-  wxCHECK_RET( m_frameStatusBar != NULL, wxT("no statusbar to set widths for") );
+    statusBar = wxFrameBase::OnCreateStatusBar(number, style, id, name);
 
-  m_frameStatusBar->SetStatusWidths(n, widths_field);
-  PositionStatusBar();
+    return statusBar;
 }
 
 void wxFrame::PositionStatusBar()
 {
-  // native status bar positions itself
-  if (m_frameStatusBar)
-  {
-      int w, h;
-      GetClientSize(&w, &h);
-      int sw, sh;
-      m_frameStatusBar->GetSize(&sw, &sh);
-
-      // Since we wish the status bar to be directly under the client area,
-      // we use the adjusted sizes without using wxSIZE_NO_ADJUSTMENTS.
-      m_frameStatusBar->SetSize(0, h, w, sh);
-  }
+// TODO:
+/*
+    // native status bar positions itself
+    if ( m_frameStatusBar )
+    {
+        int w, h;
+        GetClientSize(&w, &h);
+        int sw, sh;
+        m_frameStatusBar->GetSize(&sw, &sh);
+
+        // Since we wish the status bar to be directly under the client area,
+        // we use the adjusted sizes without using wxSIZE_NO_ADJUSTMENTS.
+        m_frameStatusBar->SetSize(0, h, w, sh);
+    }
+*/
 }
 #endif // wxUSE_STATUSBAR
 
@@ -467,6 +434,8 @@ void wxFrame::InternalSetMenuBar()
 // Responds to colour changes, and passes event on to children.
 void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event)
 {
+// TODO:
+/*
     SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE));
     Refresh();
 
@@ -479,6 +448,7 @@ void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event)
 
     // Propagate the event to the non-top-level children
     wxWindow::OnSysColourChanged(event);
+*/
 }
 
 /*
@@ -555,57 +525,8 @@ bool wxFrame::OS2Create(int id, wxWindow *parent, const wxChar *wclass, wxWindow
   // style instead of WS_OVERLAPPED
   if (width > -1 && height > -1)
     ::PostMessage(GetHwnd(), WM_SIZE, SIZE_RESTORED, MAKELPARAM(width, height));
-
-  return TRUE;
 */
-  return FALSE;
-}
-
-// Default resizing behaviour - if only ONE subwindow, resize to client
-// rectangle size
-void wxFrame::OnSize(wxSizeEvent& event)
-{
-    // if we're using constraints - do use them
-#if wxUSE_CONSTRAINTS
-    if ( GetAutoLayout() )
-    {
-        Layout();
-        return;
-    }
-#endif
-
-    // do we have _exactly_ one child?
-    wxWindow *child = NULL;
-    for ( wxWindowList::Node *node = GetChildren().GetFirst();
-          node;
-          node = node->GetNext() )
-    {
-        wxWindow *win = node->GetData();
-        if ( !win->IsTopLevel()
-#if wxUSE_STATUSBAR
-                && (win != GetStatusBar())
-#endif // wxUSE_STATUSBAR
-#if wxUSE_TOOLBAR
-                && (win != GetToolBar())
-#endif // wxUSE_TOOLBAR
-           )
-        {
-            if ( child )
-                return;     // it's our second subwindow - nothing to do
-            child = win;
-        }
-    }
-
-    if ( child ) {
-        // we have exactly one child - set it's size to fill the whole frame
-        int clientW, clientH;
-        GetClientSize(&clientW, &clientH);
-
-        int x = 0;
-        int y = 0;
-
-        child->SetSize(x, y, clientW, clientH);
-    }
+  return TRUE;
 }
 
 // Default activation behaviour - set the focus for the first child
@@ -637,67 +558,11 @@ void wxFrame::OnActivate(wxActivateEvent& event)
     }
 }
 
-// The default implementation for the close window event.
-void wxFrame::OnCloseWindow(wxCloseEvent& event)
-{
-    Destroy();
-}
-
-// Destroy the window (delayed, if a managed window)
-bool wxFrame::Destroy()
-{
-  if (!wxPendingDelete.Member(this))
-    wxPendingDelete.Append(this);
-  return TRUE;
-}
-
-// Default menu selection behaviour - display a help string
-void wxFrame::OnMenuHighlight(wxMenuEvent& event)
-{
-  if (GetStatusBar())
-  {
-    wxString help;
-    int menuId = event.GetMenuId();
-    if ( menuId != -1 )
-    {
-      wxMenuBar *menuBar = GetMenuBar();
-      if (menuBar && menuBar->FindItem(menuId))
-      {
-        help = menuBar->GetHelpString(menuId);
-      }
-    }
-
-    // set status text even if the string is empty - this will at
-    // least remove the string from the item which was previously
-    // selected
-    SetStatusText(help);
-  }
-}
-
-wxMenuBar *wxFrame::GetMenuBar() const
-{
-  return m_frameMenuBar;
-}
-
-bool wxFrame::ProcessCommand(int id)
-{
-    wxMenuBar *bar = GetMenuBar() ;
-    if ( !bar )
-        return FALSE;
-
-    wxMenuItem *item = bar->FindItem(id);
-
-    if ( item &&  item->IsCheckable() )
-    {
-        bar->Check(id, !bar->IsChecked(id)) ;
-    }
-
-    wxCommandEvent commandEvent(wxEVT_COMMAND_MENU_SELECTED, id);
-    commandEvent.SetInt( id );
-    commandEvent.SetEventObject( this );
-
-    return GetEventHandler()->ProcessEvent(commandEvent);
-}
+// ----------------------------------------------------------------------------
+// wxFrame size management: we exclude the areas taken by menu/status/toolbars
+// from the client area, so the client area is what's really available for the
+// frame contents
+// ----------------------------------------------------------------------------
 
 // Checks if there is a toolbar, and returns the first free client position
 wxPoint wxFrame::GetClientAreaOrigin() const
@@ -744,28 +609,20 @@ void wxFrame::DoClientToScreen(int *x, int *y) const
     wxWindow::DoClientToScreen(x, y);
 }
 
+// ----------------------------------------------------------------------------
+// tool/status bar stuff
+// ----------------------------------------------------------------------------
+
 #if wxUSE_TOOLBAR
+
 wxToolBar* wxFrame::CreateToolBar(long style, wxWindowID id, const wxString& name)
 {
-    wxCHECK_MSG( m_frameToolBar == NULL, FALSE,
-                 wxT("recreating toolbar in wxFrame") );
-
-    wxToolBar* toolBar = OnCreateToolBar(style, id, name);
-    if (toolBar)
+    if ( wxFrameBase::CreateToolBar(style, id, name) )
     {
-        SetToolBar(toolBar);
         PositionToolBar();
-        return toolBar;
-    }
-    else
-    {
-        return NULL;
     }
-}
 
-wxToolBar* wxFrame::OnCreateToolBar(long style, wxWindowID id, const wxString& name)
-{
-    return new wxToolBar(this, id, wxDefaultPosition, wxDefaultSize, style, name);
+    return m_frameToolBar;
 }
 
 void wxFrame::PositionToolBar()
@@ -775,33 +632,40 @@ void wxFrame::PositionToolBar()
     RECT rect;
     ::GetClientRect(GetHwnd(), &rect);
 
+#if wxUSE_STATUSBAR
     if ( GetStatusBar() )
     {
-      int statusX, statusY;
-      GetStatusBar()->GetClientSize(&statusX, &statusY);
-      rect.bottom -= statusY;
+        int statusX, statusY;
+        GetStatusBar()->GetClientSize(&statusX, &statusY);
+        rect.bottom -= statusY;
     }
+#endif // wxUSE_STATUSBAR
 
-    if (GetToolBar())
+    if ( GetToolBar() )
     {
         int tw, th;
-        GetToolBar()->GetSize(& tw, & th);
+        GetToolBar()->GetSize(&tw, &th);
 
-        if (GetToolBar()->GetWindowStyleFlag() & wxTB_VERTICAL)
+        if ( GetToolBar()->GetWindowStyleFlag() & wxTB_VERTICAL )
         {
-            // Use the 'real' MSW position
-            GetToolBar()->SetSize(0, 0, tw, rect.bottom, wxSIZE_NO_ADJUSTMENTS);
+            th = rect.bottom;
         }
         else
         {
-            // Use the 'real' MSW position
-            GetToolBar()->SetSize(0, 0, rect.right, th, wxSIZE_NO_ADJUSTMENTS);
+            tw = rect.right;
         }
+
+        // Use the 'real' MSW position here
+        GetToolBar()->SetSize(0, 0, tw, th, wxSIZE_NO_ADJUSTMENTS);
     }
 */
 }
 #endif // wxUSE_TOOLBAR
 
+// ----------------------------------------------------------------------------
+// frame state (iconized/maximized/...)
+// ----------------------------------------------------------------------------
+
 // propagate our state change to all child frames: this allows us to emulate X
 // Windows behaviour where child frames float independently of the parent one
 // on the desktop, but are iconized/restored with it
@@ -820,20 +684,6 @@ void wxFrame::IconizeChildFrames(bool bIconize)
     }
 }
 
-
-// make the window modal (all other windows unresponsive)
-void wxFrame::MakeModal(bool modal)
-{
-    if (modal) {
-        wxEnableTopLevelWindows(FALSE);
-        Enable(TRUE);           // keep this window enabled
-    }
-    else {
-        wxEnableTopLevelWindows(TRUE);
-    }
-}
-
-
 // ===========================================================================
 // message processing
 // ===========================================================================
@@ -844,9 +694,11 @@ void wxFrame::MakeModal(bool modal)
 
 bool wxFrame::OS2TranslateMessage(WXMSG* pMsg)
 {
+// TODO:
+/*
     if ( wxWindow::OS2TranslateMessage(pMsg) )
         return TRUE;
-
+*/
     // try the menu bar accels
     wxMenuBar *menuBar = GetMenuBar();
     if ( !menuBar )
@@ -944,10 +796,20 @@ bool wxFrame::HandleSize(int x, int y, WXUINT id)
             m_iconized = TRUE;
             break;
     }
-*/
+
     if ( !m_iconized )
     {
         // forward WM_SIZE to status bar control
+#if wxUSE_NATIVE_STATUSBAR
+        if (m_frameStatusBar && m_frameStatusBar->IsKindOf(CLASSINFO(wxStatusBar95)))
+        {
+            wxSizeEvent event(wxSize(x, y), m_frameStatusBar->GetId());
+            event.SetEventObject( m_frameStatusBar );
+
+            ((wxStatusBar95 *)m_frameStatusBar)->OnSize(event);
+        }
+#endif // wxUSE_NATIVE_STATUSBAR
+
         PositionStatusBar();
         PositionToolBar();
 
@@ -955,18 +817,20 @@ bool wxFrame::HandleSize(int x, int y, WXUINT id)
         event.SetEventObject( this );
         processed = GetEventHandler()->ProcessEvent(event);
     }
-
+*/
     return processed;
 }
 
 bool wxFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control)
 {
+// TODO:
+/*
     if ( control )
     {
         // In case it's e.g. a toolbar.
         wxWindow *win = wxFindWinFromHandle(control);
         if ( win )
-            return win->OS2Command(cmd, id);
+            return win->MSWCommand(cmd, id);
     }
 
     // handle here commands from menus and accelerators
@@ -977,7 +841,7 @@ bool wxFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control)
             wxMenu *popupMenu = wxCurrentPopupMenu;
             wxCurrentPopupMenu = NULL;
 
-            return popupMenu->OS2Command(cmd, id);
+            return popupMenu->MSWCommand(cmd, id);
         }
 
         if ( ProcessCommand(id) )
@@ -985,7 +849,7 @@ bool wxFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control)
             return TRUE;
         }
     }
-
+*/
     return FALSE;
 }
 
@@ -1003,14 +867,13 @@ bool wxFrame::HandleMenuSelect(WXWORD nItem, WXWORD flags, WXHMENU hMenu)
     {
         item = nItem;
     }
-*/
     else
     {
         // don't give hints for separators (doesn't make sense) nor for the
         // items opening popup menus (they don't have them anyhow)
         return FALSE;
     }
-
+*/
     wxMenuEvent event(wxEVT_MENU_HIGHLIGHT, item);
     event.SetEventObject( this );
 
@@ -1023,7 +886,7 @@ bool wxFrame::HandleMenuSelect(WXWORD nItem, WXWORD flags, WXHMENU hMenu)
 
 MRESULT wxFrame::OS2WindowProc(HWND hwnd, WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
 {
-    MRESULT rc = 0;
+    long rc = 0;
     bool processed = FALSE;
 
 // TODO:
@@ -1074,10 +937,12 @@ MRESULT wxFrame::OS2WindowProc(HWND hwnd, WXUINT message, WXWPARAM wParam, WXLPA
             processed = HandleSize(LOWORD(lParam), HIWORD(lParam), wParam);
             break;
     }
-*/
+
     if ( !processed )
-        rc = wxWindow::OS2WindowProc(hwnd, message, wParam, lParam);
+        rc = wxWindow::MSWWindowProc(message, wParam, lParam);
 
     return rc;
+*/
+    return (MRESULT)0;
 }
 
index 8bce479cecd965c78e7f6da8f8f478dc6f7ce386..d8185a69d90b4dc6a9f03d949c73fce3dad32e33 100644 (file)
@@ -58,11 +58,7 @@ bool wxGauge::Create(wxWindow *parent, wxWindowID id,
            const wxSize& size,
            long style,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-           const wxValidator* validator,
-#  else
            const wxValidator& validator,
-#  endif
 #endif
            const wxString& name)
 {
index 7fa3750188190c708dc3cefb8954b675551ee7ff..f90d2d14173f56832b992a6bc6ae489f14f73665 100644 (file)
@@ -81,11 +81,7 @@ bool wxListBox::Create(wxWindow *parent,
                        int n, const wxString choices[],
                        long style,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-                       const wxValidator* validator,
-#  else
                        const wxValidator& validator,
-#  endif
 #endif
                        const wxString& name)
 {
index d599b860fbf88f5b2f9a3bef1fdc02d9ed7f6d2c..78d12ab328852c0b49bf77c0ebc567838c86175f 100644 (file)
@@ -353,7 +353,7 @@ COMLIBOBJS2 = \
   utilscmn.obj \
   valgen.obj \
   validate.obj \
-  valtext.obj 
+  valtext.obj
 
 COMLIBOBJS3 = \
   variant.obj \
@@ -518,6 +518,7 @@ OS2LIBOBJS2 = \
   window.obj
 
 HTMLOBJS = \
+  ..\html\$D\helpctrl.obj \
   ..\html\$D\helpdata.obj \
   ..\html\$D\helpfrm.obj \
   ..\html\$D\htmlcell.obj \
@@ -537,6 +538,7 @@ HTMLOBJS = \
   ..\html\$D\winpars.obj
 
 HTMLLIBOBJS = \
+  helpctrl.obj \
   helpdata.obj \
   helpfrm.obj \
   htmlcell.obj \
@@ -701,6 +703,7 @@ $(GENLIBOBJS):
   copy ..\generic\$D\treectrl.obj
 
 $(HTMLLIBOBJS):
+  copy ..\html\$D\helpctrl.obj
   copy ..\html\$D\helpdata.obj
   copy ..\html\$D\helpfrm.obj
   copy ..\html\$D\htmlcell.obj
index 43bcd15f5e95a680fe63a4df3e064be843e0955d..0ea23cc0628556ec28a9fcd6ea9b5cb5a293f5d5 100644 (file)
@@ -144,11 +144,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
         int n, const wxString choices[],
         int majorDim, long style,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-        const wxValidator* val, const wxString& name)
-#  else
         const wxValidator& val, const wxString& name)
-#  endif
 #endif
 {
     m_selectedButton = -1;
index 5453a8ec5287cf119e7c7f1286394a856d1d82fa..1905f909e26e1a8cb13a1a25bf180e87fa4a2ff9 100644 (file)
@@ -47,11 +47,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
            const wxPoint& pos,
            const wxSize& size, long style,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-           const wxValidator* validator,
-#  else
            const wxValidator& validator,
-#  endif
 #endif
            const wxString& name)
 {
@@ -159,11 +155,7 @@ bool wxBitmapRadioButton::Create(wxWindow *parent, wxWindowID id,
            const wxPoint& pos,
            const wxSize& size, long style,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-           const wxValidator* validator,
-#  else
            const wxValidator& validator,
-#  endif
 #endif
            const wxString& name)
 {
index a279ce36127331f617165e1fae9b511491069b5f..bcf4a9e18763f32f0f2b4c6fa72a88cb1fb73027 100644 (file)
@@ -36,11 +36,7 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
            const wxPoint& pos,
            const wxSize& size, long style,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-           const wxValidator* validator,
-#  else
            const wxValidator& validator,
-#  endif
 #endif
            const wxString& name)
 {
index e0a6852d4aa74d6ecba6dc633099d4e97bdee5d5..7817503b7f978e40a147568d34fef0ea76d36187 100644 (file)
@@ -47,11 +47,7 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
            const wxPoint& pos,
            const wxSize& size, long style,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-           const wxValidator* validator,
-#  else
            const wxValidator& validator,
-#  endif
 #endif
            const wxString& name)
 {
index c9d836f4ea81bfa8f922d979a9d5af0204ec0202..20aeec6bb9a46bf5ed0300c8e6cfa330be63c21a 100644 (file)
@@ -88,11 +88,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
                         const wxSize& size,
                         long style,
 #if wxUSE_VALIDATORS
-#  if defined(__VISAGECPP__)
-                        const wxValidator* validator,
-#  else
                         const wxValidator& validator,
-#  endif
 #endif
                         const wxString& name)
 {
index 1ebf11803466b6645ab7dd6af2f2d22d4739c0d0..88048a5d18896941a105924bb0a94b6e9e374a0d 100644 (file)
 #define INCL_DOSERRORS
 #define INCL_DOS
 #include <os2.h>
+#define PURE_32
+#include <upm.h>
+#include <netcons.h>
+#include <netbios.h>
 
 #include <ctype.h>
 #include <direct.h>
index 3ae47914ad49e177b8dd8eb7fa1265b5ed7ff00d..ebb2c611d22734c65e1ab149b401361727497cfd 100644 (file)
@@ -382,7 +382,7 @@ void wxWindow::SetTitle(
   const wxString&                   rTitle
 )
 {
-    ::WinSetWindowText(GetHwnd(), title.c_str());
+    ::WinSetWindowText(GetHwnd(), rTitle.c_str());
 }
 
 wxString wxWindow::GetTitle() const
@@ -392,24 +392,77 @@ wxString wxWindow::GetTitle() const
 
 void wxWindow::CaptureMouse()
 {
-    // TODO:
+    HWND                            hWnd = GetHwnd();
+
+    if (hWnd && !m_bWinCaptured)
+    {
+        ::WinSetCapture(HWND_DESKTOP, hWnd);
+        m_bWinCaptured = TRUE;
+    }
 }
 
 void wxWindow::ReleaseMouse()
 {
-    // TODO:
+    if ( m_bWinCaptured )
+    {
+        ::WinSetCapture(HWND_DESKTOP, NULLHANDLE);
+        m_bWinCaptured = FALSE;
+    }
 }
 
-bool wxWindow::SetFont(const wxFont& f)
+bool wxWindow::SetFont(
+  const wxFont&                     rFont
+)
 {
-    // TODO:
+    if (!wxWindowBase::SetFont(rFont))
+    {
+        // nothing to do
+        return(FALSE);
+    }
+
+    HWND                            hWnd = GetHwnd();
+
+    if (hWnd != 0)
+    {
+        wxChar                      zFont[128];
+
+        sprintf(zFont, "%d.%s", rFont.GetPointSize(), rFont.GetFaceName().c_str());
+        return(::WinSetPresParam(hWnd, PP_FONTNAMESIZE, strlen(zFont), (PVOID)zFont));
+    }
     return(TRUE);
 }
 
-bool wxWindow::SetCursor(const wxCursor& cursor) // check if base implementation is OK
+bool wxWindow::SetCursor(
+  const wxCursor&                   rCursor
+) // check if base implementation is OK
 {
-    // TODO:
-    return(TRUE);
+    if ( !wxWindowBase::SetCursor(rCursor))
+    {
+        // no change
+        return FALSE;
+    }
+
+    wxASSERT_MSG( m_cursor.Ok(),
+                  wxT("cursor must be valid after call to the base version"));
+
+    HWND                            hWnd = GetHwnd();
+    POINTL                          vPoint;
+    RECTL                           vRect;
+    HPS                             hPS;
+    HRGN                            hRGN;
+
+    hPS = ::WinGetPS(hWnd);
+
+    ::WinQueryPointerPos(HWND_DESKTOP, &vPoint);
+    ::WinQueryWindowRect(hWnd, &vRect);
+
+    hRGN = ::GpiCreateRegion(hPS, 1L, &vRect);
+
+    if ((::GpiPtInRegion(hPS, hRGN, &vPoint) == PRGN_INSIDE) && !wxIsBusy())
+    {
+//        ::SetCursor((HCURSOR)m_cursor.GetHCURSOR());
+    }
+    return TRUE;
 }
 
 void wxWindow::WarpPointer(int x_pos, int y_pos)
index ca5e78db751cfb51babe1910e5790594854d4a1c..23909907dd381925c7a5b78e1738ff51fea84376 100644 (file)
@@ -19,7 +19,7 @@ OS2LIBFLAGS=/NOL /NOE
 OS2LIBS=CPPOM30.lib CPPOOC3.LIB OS2386.LIB
 
 # Change WXDIR or WXWIN to wherever wxWindows is found
-WXDIR = j:\dev\wx2\wxWindows
+WXDIR = h:\dev\wx2\wxWindows
 
 OS2PNGDIR=$(WXDIR)\src\png
 OS2PNGINC=$(WINPNGDIR)
index f3466868c201b86f8b7de1b6a6d95fac991cd760..b6282a002abae05e143b249e3a0a1363352f7dae 100644 (file)
@@ -19,7 +19,7 @@ OS2LIBFLAGS=/NOL /NOE
 OS2LIBS=CPPOM30.lib CPPOOC3.LIB OS2386.LIB
 
 # Change WXDIR or WXWIN to wherever wxWindows is found
-WXDIR = j:\dev\wx2\wxWindows
+WXDIR = h:\dev\wx2\wxWindows
 
 OS2XPMDIR=$(WXDIR)\src\xpm
 OS2XPMINC=$(WINXPMDIR)
index 3e4fcdf3eb608c230a851e3c0a9c0c25a8755e11..165b8e9eceea732ef97e0b136494e25bdbc70a90 100644 (file)
@@ -19,7 +19,7 @@ OS2LIBFLAGS=/NOL /NOE
 OS2LIBS=CPPOM30.lib CPPOOC3.LIB OS2386.LIB
 
 # Change WXDIR or WXWIN to wherever wxWindows is found
-WXDIR = j:\dev\wx2\wxWindows
+WXDIR = h:\dev\wx2\wxWindows
 
 OS2ZLIBDIR=$(WXDIR)\src\zlib
 OS2ZLIBINC=$(WINPNGDIR)