Removal of previous wxValidtor code for wxOS2

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4634 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Webster
1999-11-19 22:36:55 +00:00
parent f68586e51b
commit f38374d0d7
48 changed files with 334 additions and 792 deletions

View File

@@ -42,11 +42,7 @@ protected:
const wxSize& size, const wxSize& size,
long style, long style,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator,
# else
const wxValidator& validator, const wxValidator& validator,
# endif
#endif #endif
const wxString& name); const wxString& name);

View File

@@ -381,11 +381,7 @@ class WXDLLEXPORT wxListTextCtrl: public wxTextCtrl
const wxString &value = "", const wxString &value = "",
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
int style = 0, const wxValidator* validator = wxDefaultValidator,
# else
int style = 0, const wxValidator& validator = wxDefaultValidator, int style = 0, const wxValidator& validator = wxDefaultValidator,
# endif
#endif #endif
const wxString &name = "wxListTextCtrlText" ); const wxString &name = "wxListTextCtrlText" );
void OnChar( wxKeyEvent &event ); void OnChar( wxKeyEvent &event );
@@ -515,11 +511,7 @@ class WXDLLEXPORT wxListCtrl: public wxControl
wxListCtrl( wxWindow *parent, wxWindowID id = -1, wxListCtrl( wxWindow *parent, wxWindowID id = -1,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
long style = wxLC_ICON, const wxValidator* validator = wxDefaultValidator,
# else
long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator,
# endif
#endif #endif
const wxString &name = "listctrl" ) const wxString &name = "listctrl" )
{ {
@@ -529,11 +521,7 @@ class WXDLLEXPORT wxListCtrl: public wxControl
bool Create( wxWindow *parent, wxWindowID id = -1, bool Create( wxWindow *parent, wxWindowID id = -1,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
long style = wxLC_ICON, const wxValidator* validator = wxDefaultValidator,
# else
long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator,
# endif
#endif #endif
const wxString &name = "listctrl" ); const wxString &name = "listctrl" );
void OnSize( wxSizeEvent &event ); void OnSize( wxSizeEvent &event );

View File

@@ -182,11 +182,7 @@ class WXDLLEXPORT wxTreeTextCtrl: public wxTextCtrl
const wxString &value = wxEmptyString, const wxString &value = wxEmptyString,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
int style = 0, const wxValidator* validator = wxDefaultValidator,
# else
int style = 0, const wxValidator& validator = wxDefaultValidator, int style = 0, const wxValidator& validator = wxDefaultValidator,
# endif
#endif #endif
const wxString &name = wxTextCtrlNameStr ); const wxString &name = wxTextCtrlNameStr );
void OnChar( wxKeyEvent &event ); void OnChar( wxKeyEvent &event );
@@ -211,11 +207,7 @@ public:
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT, long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator *validator = wxDefaultValidator,
# else
const wxValidator &validator = wxDefaultValidator, const wxValidator &validator = wxDefaultValidator,
# endif
#endif #endif
const wxString& name = wxTreeCtrlNameStr) const wxString& name = wxTreeCtrlNameStr)
{ {
@@ -229,11 +221,7 @@ public:
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT, long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator *validator = wxDefaultValidator,
# else
const wxValidator &validator = wxDefaultValidator, const wxValidator &validator = wxDefaultValidator,
# endif
#endif #endif
const wxString& name = wxTreeCtrlNameStr); const wxString& name = wxTreeCtrlNameStr);

View File

@@ -27,11 +27,7 @@ class WXDLLEXPORT wxBitmapButton: public wxButton
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW, const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator = wxDefaultValidator,
# else
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
# endif
#endif #endif
const wxString& name = wxButtonNameStr) const wxString& name = wxButtonNameStr)
{ {
@@ -42,11 +38,7 @@ class WXDLLEXPORT wxBitmapButton: public wxButton
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW, const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator = wxDefaultValidator,
# else
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
# endif
#endif #endif
const wxString& name = wxButtonNameStr); const wxString& name = wxButtonNameStr);

View File

@@ -26,11 +26,7 @@ class WXDLLEXPORT wxButton: public wxControl
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0, const wxSize& size = wxDefaultSize, long style = 0,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator = wxDefaultValidator,
# else
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
# endif
#endif #endif
const wxString& name = wxButtonNameStr) const wxString& name = wxButtonNameStr)
{ {
@@ -41,11 +37,7 @@ class WXDLLEXPORT wxButton: public wxControl
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0, const wxSize& size = wxDefaultSize, long style = 0,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator = wxDefaultValidator,
# else
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
# endif
#endif #endif
const wxString& name = wxButtonNameStr); const wxString& name = wxButtonNameStr);

View File

@@ -28,11 +28,7 @@ class WXDLLEXPORT wxCheckBox: public wxControl
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0, const wxSize& size = wxDefaultSize, long style = 0,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator = wxDefaultValidator,
# else
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
# endif
#endif #endif
const wxString& name = wxCheckBoxNameStr) const wxString& name = wxCheckBoxNameStr)
{ {
@@ -43,11 +39,7 @@ class WXDLLEXPORT wxCheckBox: public wxControl
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0, const wxSize& size = wxDefaultSize, long style = 0,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator = wxDefaultValidator,
# else
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
# endif
#endif #endif
const wxString& name = wxCheckBoxNameStr); const wxString& name = wxCheckBoxNameStr);
@@ -77,11 +69,7 @@ class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0, const wxSize& size = wxDefaultSize, long style = 0,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator = wxDefaultValidator,
# else
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
# endif
#endif #endif
const wxString& name = wxCheckBoxNameStr) const wxString& name = wxCheckBoxNameStr)
{ {
@@ -92,11 +80,7 @@ class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0, const wxSize& size = wxDefaultSize, long style = 0,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator = wxDefaultValidator,
# else
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
# endif
#endif #endif
const wxString& name = wxCheckBoxNameStr); const wxString& name = wxCheckBoxNameStr);

View File

@@ -32,11 +32,7 @@ public:
const wxString choices[] = NULL, const wxString choices[] = NULL,
long style = 0, long style = 0,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator = wxDefaultValidator,
# else
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
# endif
#endif #endif
const wxString& name = wxListBoxNameStr); const wxString& name = wxListBoxNameStr);

View File

@@ -29,11 +29,7 @@ public:
int n = 0, const wxString choices[] = NULL, int n = 0, const wxString choices[] = NULL,
long style = 0, long style = 0,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator = wxDefaultValidator,
# else
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
# endif
#endif #endif
const wxString& name = wxChoiceNameStr) const wxString& name = wxChoiceNameStr)
{ {
@@ -46,11 +42,7 @@ public:
int n = 0, const wxString choices[] = NULL, int n = 0, const wxString choices[] = NULL,
long style = 0, long style = 0,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator = wxDefaultValidator,
# else
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
# endif
#endif #endif
const wxString& name = wxChoiceNameStr); const wxString& name = wxChoiceNameStr);

View File

@@ -34,11 +34,7 @@ class WXDLLEXPORT wxComboBox: public wxChoice
int n = 0, const wxString choices[] = NULL, int n = 0, const wxString choices[] = NULL,
long style = 0, long style = 0,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator = wxDefaultValidator,
# else
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
# endif
#endif #endif
const wxString& name = wxComboBoxNameStr) const wxString& name = wxComboBoxNameStr)
{ {
@@ -52,11 +48,7 @@ class WXDLLEXPORT wxComboBox: public wxChoice
int n = 0, const wxString choices[] = NULL, int n = 0, const wxString choices[] = NULL,
long style = 0, long style = 0,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator = wxDefaultValidator,
# else
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
# endif
#endif #endif
const wxString& name = wxComboBoxNameStr); const wxString& name = wxComboBoxNameStr);

View File

@@ -12,37 +12,24 @@
#ifndef _WX_FRAME_H_ #ifndef _WX_FRAME_H_
#define _WX_FRAME_H_ #define _WX_FRAME_H_
#include "wx/window.h" class WXDLLEXPORT wxFrame : public wxFrameBase
#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
{ {
DECLARE_DYNAMIC_CLASS(wxFrame)
public: public:
wxFrame(); // construction
wxFrame() { Init(); }
wxFrame(wxWindow *parent, wxFrame(wxWindow *parent,
wxWindowID id, wxWindowID id,
const wxString& title, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE, long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxFrameNameStr) const wxString& name = wxFrameNameStr)
{ {
Init();
Create(parent, id, title, pos, size, style, name); Create(parent, id, title, pos, size, style, name);
} }
~wxFrame();
bool Create(wxWindow *parent, bool Create(wxWindow *parent,
wxWindowID id, wxWindowID id,
const wxString& title, const wxString& title,
@@ -51,104 +38,63 @@ public:
long style = wxDEFAULT_FRAME_STYLE, long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxFrameNameStr); const wxString& name = wxFrameNameStr);
virtual bool Destroy(); virtual ~wxFrame();
void OnSize(wxSizeEvent& event); // implement base class pure virtuals
void OnMenuHighlight(wxMenuEvent& event); virtual void Maximize(bool maximize = TRUE);
void OnActivate(wxActivateEvent& event); virtual bool IsMaximized() const;
void OnIdle(wxIdleEvent& event); virtual void Iconize(bool iconize = TRUE);
void OnCloseWindow(wxCloseEvent& event); virtual bool IsIconized() const;
virtual void Restore();
bool Show(bool show); virtual void SetMenuBar(wxMenuBar *menubar);
void DetachMenuBar();
// Set menu bar
void SetMenuBar(wxMenuBar *menu_bar);
virtual wxMenuBar *GetMenuBar() const;
// Call this to simulate a menu command
bool Command(int id) { return ProcessCommand(id); }
// process menu command: returns TRUE if processed
bool ProcessCommand(int id);
// make the window modal (all other windows unresponsive)
virtual void MakeModal(bool modal = TRUE);
// Set icon
virtual void SetIcon(const wxIcon& icon); virtual void SetIcon(const wxIcon& icon);
// implementation only from now on
// -------------------------------
// override some more virtuals
virtual bool Show(bool show = TRUE);
// event handlers
void OnActivate(wxActivateEvent& event);
void OnSysColourChanged(wxSysColourChangedEvent& event);
// Toolbar // Toolbar
#if wxUSE_TOOLBAR #if wxUSE_TOOLBAR
virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER | wxTB_HORIZONTAL | wxTB_FLAT, virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER | wxTB_HORIZONTAL | wxTB_FLAT,
wxWindowID id = -1, wxWindowID id = -1,
const wxString& name = wxToolBarNameStr); 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(); virtual void PositionToolBar();
#endif // wxUSE_TOOLBAR #endif // wxUSE_TOOLBAR
#if wxUSE_STATUSBAR
// Status bar // Status bar
virtual wxStatusBar* CreateStatusBar(int number = 1, #if wxUSE_STATUSBAR
long style = wxST_SIZEGRIP, virtual wxStatusBar* OnCreateStatusBar(int number = 1,
wxWindowID id = 0, long style = wxST_SIZEGRIP,
const wxString& name = wxStatusLineNameStr); wxWindowID id = 0,
const wxString& name = wxStatusLineNameStr);
wxStatusBar *GetStatusBar() const { return m_frameStatusBar; }
void SetStatusBar(wxStatusBar *statusBar) { m_frameStatusBar = statusBar; }
virtual void PositionStatusBar(); virtual void PositionStatusBar();
virtual wxStatusBar *OnCreateStatusBar(int number,
long style,
wxWindowID id,
const wxString& name);
// Set status line text // Hint to tell framework which status bar to use: the default is to use
virtual void SetStatusText(const wxString& text, int number = 0); // native one for the platforms which support it (Win32), the generic one
// otherwise
// Set status line widths
virtual void SetStatusWidths(int n, const int widths_field[]);
// Hint to tell framework which status bar to use
// TODO: should this go into a wxFrameworkSettings class perhaps? // TODO: should this go into a wxFrameworkSettings class perhaps?
static void UseNativeStatusBar(bool useNative) { m_useNativeStatusBar = useNative; }; static void UseNativeStatusBar(bool useNative)
static bool UsesNativeStatusBar() { return m_useNativeStatusBar; }; { m_useNativeStatusBar = useNative; };
static bool UsesNativeStatusBar()
{ return m_useNativeStatusBar; };
#endif // wxUSE_STATUSBAR #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; } WXHMENU GetWinMenu() const { return m_hMenu; }
// Returns the origin of client area (may be different from (0,0) if the // Returns the origin of client area (may be different from (0,0) if the
// frame has a toolbar) // frame has a toolbar)
virtual wxPoint GetClientAreaOrigin() const; virtual wxPoint GetClientAreaOrigin() const;
// Implementation only from here // event handlers
// event handlers
bool HandlePaint(); bool HandlePaint();
bool HandleSize(int x, int y, WXUINT flag); bool HandleSize(int x, int y, WXUINT flag);
bool HandleCommand(WXWORD id, WXWORD cmd, WXHWND control); bool HandleCommand(WXWORD id, WXWORD cmd, WXHWND control);
@@ -158,13 +104,19 @@ public:
wxWindow *wx_win, const wxChar *title, wxWindow *wx_win, const wxChar *title,
int x, int y, int width, int height, long style); int x, int y, int width, int height, long style);
// tooltip management // tooltip management
#if wxUSE_TOOLTIPS #if wxUSE_TOOLTIPS
WXHWND GetToolTipCtrl() const { return m_hwndToolTip; } WXHWND GetToolTipCtrl() const { return m_hwndToolTip; }
void SetToolTipCtrl(WXHWND hwndTT) { m_hwndToolTip = hwndTT; } void SetToolTipCtrl(WXHWND hwndTT) { m_hwndToolTip = hwndTT; }
#endif // tooltips #endif // tooltips
protected: protected:
// common part of all ctors
void Init();
// common part of Iconize(), Maximize() and Restore()
void DoShowWindow(int nShowCmd);
// override base class virtuals // override base class virtuals
virtual void DoGetClientSize(int *width, int *height) const; virtual void DoGetClientSize(int *width, int *height) const;
virtual void DoGetSize(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 DoClientToScreen(int *x, int *y) const;
virtual void DoScreenToClient(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 // a plug in for MDI frame classes which need to do something special when
// the menubar is set // the menubar is set
virtual void InternalSetMenuBar(); virtual void InternalSetMenuBar();
@@ -188,27 +143,20 @@ protected:
// window proc for the frames // window proc for the frames
MRESULT OS2WindowProc(HWND hwnd, WXUINT message, WXWPARAM wParam, WXLPARAM lParam); MRESULT OS2WindowProc(HWND hwnd, WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
wxMenuBar * m_frameMenuBar;
wxIcon m_icon;
bool m_iconized; bool m_iconized;
WXHICON m_defaultIcon; WXHICON m_defaultIcon;
#if wxUSE_STATUSBAR #if wxUSE_STATUSBAR
wxStatusBar * m_frameStatusBar;
static bool m_useNativeStatusBar; static bool m_useNativeStatusBar;
#endif // wxUSE_STATUSBAR #endif // wxUSE_STATUSBAR
#if wxUSE_TOOLBAR
wxToolBar* m_frameToolBar;
#endif // wxUSE_TOOLBAR
private: private:
#if wxUSE_TOOLTIPS #if wxUSE_TOOLTIPS
WXHWND m_hwndToolTip; WXHWND m_hwndToolTip;
#endif // tooltips #endif // tooltips
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS(wxFrame)
}; };
#endif #endif

View File

@@ -28,11 +28,7 @@ class WXDLLEXPORT wxGauge: public wxControl
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxGA_HORIZONTAL, long style = wxGA_HORIZONTAL,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator = wxDefaultValidator,
# else
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
# endif
#endif #endif
const wxString& name = wxGaugeNameStr) const wxString& name = wxGaugeNameStr)
{ {
@@ -45,11 +41,7 @@ class WXDLLEXPORT wxGauge: public wxControl
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxGA_HORIZONTAL, long style = wxGA_HORIZONTAL,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator = wxDefaultValidator,
# else
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
# endif
#endif #endif
const wxString& name = wxGaugeNameStr); const wxString& name = wxGaugeNameStr);

View File

@@ -43,11 +43,7 @@ public:
int n = 0, const wxString choices[] = NULL, int n = 0, const wxString choices[] = NULL,
long style = 0, long style = 0,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator = wxDefaultValidator,
# else
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
# endif
#endif #endif
const wxString& name = wxListBoxNameStr) const wxString& name = wxListBoxNameStr)
{ {
@@ -60,11 +56,7 @@ public:
int n = 0, const wxString choices[] = NULL, int n = 0, const wxString choices[] = NULL,
long style = 0, long style = 0,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator = wxDefaultValidator,
# else
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
# endif
#endif #endif
const wxString& name = wxListBoxNameStr); const wxString& name = wxListBoxNameStr);

View File

@@ -30,11 +30,7 @@ public:
int n = 0, const wxString choices[] = NULL, int n = 0, const wxString choices[] = NULL,
int majorDim = 0, long style = wxRA_HORIZONTAL, int majorDim = 0, long style = wxRA_HORIZONTAL,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr)
# else
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr) const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr)
# endif
#endif #endif
{ {
Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name); 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 n = 0, const wxString choices[] = NULL,
int majorDim = 0, long style = wxRA_HORIZONTAL, int majorDim = 0, long style = wxRA_HORIZONTAL,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
# else
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr); const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
# endif
#endif #endif
virtual bool OS2Command(WXUINT param, WXWORD id); virtual bool OS2Command(WXUINT param, WXWORD id);

View File

@@ -27,11 +27,7 @@ class WXDLLEXPORT wxRadioButton: public wxControl
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0, const wxSize& size = wxDefaultSize, long style = 0,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator = wxDefaultValidator,
# else
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
# endif
#endif #endif
const wxString& name = wxRadioButtonNameStr) const wxString& name = wxRadioButtonNameStr)
{ {
@@ -43,11 +39,7 @@ class WXDLLEXPORT wxRadioButton: public wxControl
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0, const wxSize& size = wxDefaultSize, long style = 0,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator = wxDefaultValidator,
# else
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
# endif
#endif #endif
const wxString& name = wxRadioButtonNameStr); const wxString& name = wxRadioButtonNameStr);
@@ -76,11 +68,7 @@ class WXDLLEXPORT wxBitmapRadioButton: public wxRadioButton
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0, const wxSize& size = wxDefaultSize, long style = 0,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator = wxDefaultValidator,
# else
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
# endif
#endif #endif
const wxString& name = wxBitmapRadioButtonNameStr) const wxString& name = wxBitmapRadioButtonNameStr)
{ {
@@ -92,11 +80,7 @@ class WXDLLEXPORT wxBitmapRadioButton: public wxRadioButton
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0, const wxSize& size = wxDefaultSize, long style = 0,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator = wxDefaultValidator,
# else
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
# endif
#endif #endif
const wxString& name = wxBitmapRadioButtonNameStr); const wxString& name = wxBitmapRadioButtonNameStr);

View File

@@ -30,11 +30,7 @@ public:
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxSB_HORIZONTAL, long style = wxSB_HORIZONTAL,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator = wxDefaultValidator,
# else
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
# endif
#endif #endif
const wxString& name = wxScrollBarNameStr) const wxString& name = wxScrollBarNameStr)
{ {
@@ -45,11 +41,7 @@ public:
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxSB_HORIZONTAL, long style = wxSB_HORIZONTAL,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator = wxDefaultValidator,
# else
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
# endif
#endif #endif
const wxString& name = wxScrollBarNameStr); const wxString& name = wxScrollBarNameStr);

View File

@@ -30,11 +30,7 @@ public:
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxSL_HORIZONTAL, long style = wxSL_HORIZONTAL,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator = wxDefaultValidator,
# else
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
# endif
#endif #endif
const wxString& name = wxSliderNameStr) const wxString& name = wxSliderNameStr)
{ {
@@ -49,11 +45,7 @@ public:
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxSL_HORIZONTAL, long style = wxSL_HORIZONTAL,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator = wxDefaultValidator,
# else
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
# endif
#endif #endif
const wxString& name = wxSliderNameStr); const wxString& name = wxSliderNameStr);

View File

@@ -25,11 +25,7 @@ public:
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = 0, long style = 0,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator = wxDefaultValidator,
# else
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
# endif
#endif #endif
const wxString& name = wxTextCtrlNameStr) const wxString& name = wxTextCtrlNameStr)
{ {
@@ -42,11 +38,7 @@ public:
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = 0, long style = 0,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator = wxDefaultValidator,
# else
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
# endif
#endif #endif
const wxString& name = wxTextCtrlNameStr); const wxString& name = wxTextCtrlNameStr);

View File

@@ -82,11 +82,7 @@ private:
DECLARE_DYNAMIC_CLASS(wxValidator) DECLARE_DYNAMIC_CLASS(wxValidator)
}; };
#if defined(__VISAGECPP__)
WXDLLEXPORT_DATA(extern const wxValidator*) wxDefaultValidator;
#else
WXDLLEXPORT_DATA(extern const wxValidator) wxDefaultValidator; WXDLLEXPORT_DATA(extern const wxValidator) wxDefaultValidator;
#endif
#endif // wxUSE_VALIDATORS #endif // wxUSE_VALIDATORS

View File

@@ -121,12 +121,9 @@ public:
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = 0, long style = 0,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator = wxDefaultValidator,
# else
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
# endif
#endif // wxUSE_VALIDATORS #endif // wxUSE_VALIDATORS
const wxString& name = wxPanelNameStr); const wxString& name = wxPanelNameStr);
@@ -392,11 +389,7 @@ public:
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
// a window may have an associated validator which is used to control // a window may have an associated validator which is used to control
// user input // user input
# if defined(__VISAGECPP__)
virtual void SetValidator( const wxValidator *validator );
# else
virtual void SetValidator( const wxValidator &validator ); virtual void SetValidator( const wxValidator &validator );
# endif
virtual wxValidator *GetValidator() { return m_windowValidator; } virtual wxValidator *GetValidator() { return m_windowValidator; }
#endif // wxUSE_VALIDATORS #endif // wxUSE_VALIDATORS

View File

@@ -43,11 +43,7 @@ bool wxControlBase::CreateControl(wxWindowBase *parent,
const wxSize& size, const wxSize& size,
long style, long style,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator,
# else
const wxValidator& validator, const wxValidator& validator,
# endif
#endif #endif
const wxString& name) const wxString& name)
{ {

View File

@@ -32,14 +32,7 @@
#include "wx/validate.h" #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; const wxValidator wxDefaultValidator;
#endif
#if !USE_SHARED_LIBRARY #if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxValidator, wxEvtHandler) IMPLEMENT_DYNAMIC_CLASS(wxValidator, wxEvtHandler)

View File

@@ -159,11 +159,7 @@ bool wxWindowBase::CreateBase(wxWindowBase *parent,
const wxSize& WXUNUSED(size), const wxSize& WXUNUSED(size),
long style, long style,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator,
# else
const wxValidator& validator, const wxValidator& validator,
# endif
#endif #endif
const wxString& name) const wxString& name)
{ {
@@ -619,18 +615,6 @@ void wxWindowBase::SetCaret(wxCaret *caret)
// validators // 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) void wxWindowBase::SetValidator(const wxValidator& validator)
{ {
if ( m_windowValidator ) if ( m_windowValidator )
@@ -641,7 +625,6 @@ void wxWindowBase::SetValidator(const wxValidator& validator)
if ( m_windowValidator ) if ( m_windowValidator )
m_windowValidator->SetWindow(this) ; m_windowValidator->SetWindow(this) ;
} }
# endif // __VISAGECPP__
#endif // wxUSE_VALIDATORS #endif // wxUSE_VALIDATORS
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -981,11 +981,7 @@ wxListTextCtrl::wxListTextCtrl( wxWindow *parent, const wxWindowID id,
bool *accept, wxString *res, wxListMainWindow *owner, bool *accept, wxString *res, wxListMainWindow *owner,
const wxString &value, const wxPoint &pos, const wxSize &size, const wxString &value, const wxPoint &pos, const wxSize &size,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
int style, const wxValidator* validator, const wxString &name ) :
# else
int style, const wxValidator& validator, const wxString &name ) : int style, const wxValidator& validator, const wxString &name ) :
# endif
#endif #endif
wxTextCtrl( parent, id, value, pos, size, style, validator, name ) wxTextCtrl( parent, id, value, pos, size, style, validator, name )
{ {
@@ -2576,11 +2572,7 @@ wxListCtrl::~wxListCtrl()
bool wxListCtrl::Create( wxWindow *parent, wxWindowID id, bool wxListCtrl::Create( wxWindow *parent, wxWindowID id,
const wxPoint &pos, const wxSize &size, const wxPoint &pos, const wxSize &size,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
long style, const wxValidator *validator,
# else
long style, const wxValidator &validator, long style, const wxValidator &validator,
# endif
#endif #endif
const wxString &name ) const wxString &name )
{ {

View File

@@ -197,11 +197,7 @@ wxTreeTextCtrl::wxTreeTextCtrl( wxWindow *parent, const wxWindowID id,
bool *accept, wxString *res, wxTreeCtrl *owner, bool *accept, wxString *res, wxTreeCtrl *owner,
const wxString &value, const wxPoint &pos, const wxSize &size, const wxString &value, const wxPoint &pos, const wxSize &size,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
int style, const wxValidator* validator, const wxString &name ) :
# else
int style, const wxValidator& validator, const wxString &name ) : int style, const wxValidator& validator, const wxString &name ) :
# endif
#endif #endif
wxTextCtrl( parent, id, value, pos, size, style, validator, name ) wxTextCtrl( parent, id, value, pos, size, style, validator, name )
{ {
@@ -523,7 +519,7 @@ void wxTreeCtrl::Init()
m_dragCount = 0; m_dragCount = 0;
m_renameTimer = new wxTreeRenameTimer( this ); m_renameTimer = new wxTreeRenameTimer( this );
m_normalFont = wxSystemSettings::GetSystemFont( wxSYS_DEFAULT_GUI_FONT ); m_normalFont = wxSystemSettings::GetSystemFont( wxSYS_DEFAULT_GUI_FONT );
m_boldFont = wxFont( m_normalFont.GetPointSize(), m_boldFont = wxFont( m_normalFont.GetPointSize(),
m_normalFont.GetFamily(), m_normalFont.GetFamily(),
@@ -536,11 +532,7 @@ bool wxTreeCtrl::Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos, const wxSize& size, const wxPoint& pos, const wxSize& size,
long style, long style,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator *validator,
# else
const wxValidator &validator, const wxValidator &validator,
# endif
#endif #endif
const wxString& name ) const wxString& name )
{ {
@@ -843,7 +835,7 @@ wxTreeItemId wxTreeCtrl::DoInsertItem(const wxTreeItemId& parentId,
} }
wxClientDC dc(this); wxClientDC dc(this);
wxGenericTreeItem *item = wxGenericTreeItem *item =
new wxGenericTreeItem( parent, text, dc, image, selImage, data ); new wxGenericTreeItem( parent, text, dc, image, selImage, data );
if ( data != NULL ) if ( data != NULL )
@@ -871,7 +863,7 @@ wxTreeItemId wxTreeCtrl::AddRoot(const wxString& text,
{ {
data->m_pItem = m_anchor; data->m_pItem = m_anchor;
} }
if (!HasFlag(wxTR_MULTIPLE)) if (!HasFlag(wxTR_MULTIPLE))
{ {
m_current = m_key_current = m_anchor; m_current = m_key_current = m_anchor;
@@ -1602,7 +1594,7 @@ void wxTreeCtrl::OnPaint( wxPaintEvent &WXUNUSED(event) )
dc.SetFont( m_normalFont ); dc.SetFont( m_normalFont );
dc.SetPen( m_dottedPen ); dc.SetPen( m_dottedPen );
// this is now done dynamically // this is now done dynamically
//if(GetImageList() == NULL) //if(GetImageList() == NULL)
// m_lineHeight = (int)(dc.GetCharHeight() + 4); // m_lineHeight = (int)(dc.GetCharHeight() + 4);

View File

@@ -292,6 +292,12 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id, const wxString& ti
// showtime // showtime
if (m_NavigPan && m_Splitter) { if (m_NavigPan && m_Splitter) {
m_Splitter -> SetMinimumPaneSize(20); 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) { if (m_Cfg.navig_on) {
m_NavigPan -> Show(TRUE); m_NavigPan -> Show(TRUE);
m_Splitter -> SplitVertically(m_NavigPan, m_HtmlWin, m_Cfg.sashpos); m_Splitter -> SplitVertically(m_NavigPan, m_HtmlWin, m_Cfg.sashpos);

View File

@@ -19,7 +19,7 @@ OS2LIBFLAGS=/NOL /NOE
OS2LIBS=CPPOM30.lib CPPOOC3.LIB OS2386.LIB OS2LIBS=CPPOM30.lib CPPOOC3.LIB OS2386.LIB
# Change WXDIR or WXWIN to wherever wxWindows is found # Change WXDIR or WXWIN to wherever wxWindows is found
WXDIR = j:\dev\wx2\wxWindows WXDIR = h:\dev\wx2\wxWindows
OS2JPEGDIR=$(WXDIR)\src\jpeg OS2JPEGDIR=$(WXDIR)\src\jpeg
OS2JPEGINC=$(WINJPEGDIR) OS2JPEGINC=$(WINJPEGDIR)

View File

@@ -350,22 +350,22 @@ test: $(MSWDIR)\$D\wave.obj
test2: ..\common\Debug\config.obj test2: ..\common\Debug\config.obj
$D: $D:
mkdir $D md $D
$(COMMDIR)\$D: $(COMMDIR)\$D:
mkdir $(COMMDIR)\$D md $(COMMDIR)\$D
$(MSWDIR)\$D: $(MSWDIR)\$D:
mkdir $(MSWDIR)\$D md $(MSWDIR)\$D
$(GENDIR)\$D: $(GENDIR)\$D:
mkdir $(GENDIR)\$D md $(GENDIR)\$D
$(OLEDIR)\$D: $(OLEDIR)\$D:
mkdir $(OLEDIR)\$D md $(OLEDIR)\$D
$(HTMLDIR)\$D: $(HTMLDIR)\$D:
mkdir $(HTMLDIR)\$D md $(HTMLDIR)\$D
# wxWindows library as DLL # wxWindows library as DLL
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 $(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 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 -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\wx\manual.tex $(DOCDIR)\html\wx\wx.htm -twice -html
-erase $(DOCDIR)\html\wx\*.con -erase $(DOCDIR)\html\wx\*.con
-erase $(DOCDIR)\html\wx\*.ref -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 $(DOCDIR)\html\porting\port.htm: $(DOCDIR)\latex\porting\porting.tex
cd $(DOCDIR)\latex\porting 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 -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\porting\porting.tex $(DOCDIR)\html\porting\port.htm -twice -html
-erase $(DOCDIR)\html\porting\*.con -erase $(DOCDIR)\html\porting\*.con
-erase $(DOCDIR)\html\porting\*.ref -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 $(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 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 -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\proplist\prop.tex $(DOCDIR)\html\proplist\prop.htm -twice -html
-erase $(DOCDIR)\html\proplist\*.con -erase $(DOCDIR)\html\proplist\*.con
-erase $(DOCDIR)\html\proplist\*.ref -erase $(DOCDIR)\html\proplist\*.ref

View File

@@ -29,11 +29,7 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bit
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, long style, const wxSize& size, long style,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator,
# else
const wxValidator& validator, const wxValidator& validator,
# endif
#endif #endif
const wxString& name) const wxString& name)
{ {

View File

@@ -33,11 +33,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, long style, const wxSize& size, long style,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator,
# else
const wxValidator& validator, const wxValidator& validator,
# endif
#endif #endif
const wxString& name) const wxString& name)
{ {

View File

@@ -50,11 +50,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, long style, const wxSize& size, long style,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator,
# else
const wxValidator& validator, const wxValidator& validator,
# endif
#endif #endif
const wxString& name) const wxString& name)
{ {
@@ -185,11 +181,7 @@ bool wxBitmapCheckBox::Create(wxWindow *parent, wxWindowID id, const wxBitmap *l
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, long style, const wxSize& size, long style,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator,
# else
const wxValidator& validator, const wxValidator& validator,
# endif
#endif #endif
const wxString& name) const wxString& name)
{ {

View File

@@ -260,11 +260,7 @@ wxCheckListBox::wxCheckListBox(wxWindow *parent, wxWindowID id,
const wxPoint& pos, const wxSize& size, const wxPoint& pos, const wxSize& size,
int nStrings, const wxString choices[], int nStrings, const wxString choices[],
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
long style, const wxValidator* val,
# else
long style, const wxValidator& val, long style, const wxValidator& val,
# endif
#endif #endif
const wxString& name) const wxString& name)
: wxListBox() : wxListBox()

View File

@@ -31,11 +31,7 @@ bool wxChoice::Create(wxWindow *parent,
int n, const wxString choices[], int n, const wxString choices[],
long style, long style,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator,
# else
const wxValidator& validator, const wxValidator& validator,
# endif
#endif #endif
const wxString& name) const wxString& name)
{ {

View File

@@ -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;
}

View File

@@ -64,11 +64,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
int n, const wxString choices[], int n, const wxString choices[],
long style, long style,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator,
# else
const wxValidator& validator, const wxValidator& validator,
# endif
#endif #endif
const wxString& name) const wxString& name)
{ {

View File

@@ -12,10 +12,6 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/setup.h" #include "wx/setup.h"
#include "wx/frame.h" #include "wx/frame.h"
@@ -28,61 +24,83 @@
#endif // WX_PRECOMP #endif // WX_PRECOMP
#include "wx/os2/private.h" #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/menuitem.h"
#include "wx/log.h" #include "wx/log.h"
// ----------------------------------------------------------------------------
// globals
// ----------------------------------------------------------------------------
extern wxWindowList wxModelessWindows; extern wxWindowList wxModelessWindows;
extern wxList WXDLLEXPORT wxPendingDelete; extern wxList WXDLLEXPORT wxPendingDelete;
extern wxChar wxFrameClassName[]; extern wxChar wxFrameClassName[];
extern wxMenu *wxCurrentPopupMenu; extern wxMenu *wxCurrentPopupMenu;
// ----------------------------------------------------------------------------
// event tables
// ----------------------------------------------------------------------------
#if !USE_SHARED_LIBRARY #if !USE_SHARED_LIBRARY
BEGIN_EVENT_TABLE(wxFrame, wxWindow) BEGIN_EVENT_TABLE(wxFrame, wxFrameBase)
EVT_SIZE(wxFrame::OnSize) EVT_ACTIVATE(wxFrame::OnActivate)
EVT_ACTIVATE(wxFrame::OnActivate) EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged)
EVT_MENU_HIGHLIGHT_ALL(wxFrame::OnMenuHighlight)
EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged)
EVT_IDLE(wxFrame::OnIdle)
EVT_CLOSE(wxFrame::OnCloseWindow)
END_EVENT_TABLE() END_EVENT_TABLE()
IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxWindow) IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxWindow)
#endif #endif
bool wxFrame::m_useNativeStatusBar = FALSE; // ============================================================================
// implementation
// ============================================================================
wxFrame::wxFrame() // ----------------------------------------------------------------------------
// static class members
// ----------------------------------------------------------------------------
#if wxUSE_NATIVE_STATUSBAR
bool wxFrame::m_useNativeStatusBar = TRUE;
#else
bool wxFrame::m_useNativeStatusBar = FALSE;
#endif
// ----------------------------------------------------------------------------
// creation/destruction
// ----------------------------------------------------------------------------
void wxFrame::Init()
{ {
m_frameToolBar = NULL ; m_iconized = FALSE;
m_frameMenuBar = NULL;
m_frameStatusBar = NULL;
m_iconized = FALSE;
}
bool wxFrame::Create(wxWindow *parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos,
const wxSize& size,
long style,
const wxString& name)
{
#if wxUSE_TOOLTIPS #if wxUSE_TOOLTIPS
m_hwndToolTip = 0; m_hwndToolTip = 0;
#endif #endif
}
bool wxFrame::Create(wxWindow *parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos,
const wxSize& size,
long style,
const wxString& name)
{
SetName(name); SetName(name);
m_windowStyle = style; m_windowStyle = style;
m_frameMenuBar = NULL; m_frameMenuBar = NULL;
m_frameToolBar = NULL ; m_frameToolBar = NULL;
m_frameStatusBar = NULL; m_frameStatusBar = NULL;
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE)); SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE));
// m_icon = NULL;
if ( id > -1 ) if ( id > -1 )
m_windowId = id; m_windowId = id;
else else
@@ -119,13 +137,9 @@ wxFrame::~wxFrame()
m_isBeingDeleted = TRUE; m_isBeingDeleted = TRUE;
wxTopLevelWindows.DeleteObject(this); wxTopLevelWindows.DeleteObject(this);
if (m_frameStatusBar) // TODO:
delete m_frameStatusBar; /*
if (m_frameMenuBar) DeleteAllBars();
delete m_frameMenuBar;
/* New behaviour March 1998: check if it's the last top-level window */
// if (wxTheApp && (this == wxTheApp->GetTopWindow()))
if (wxTheApp && (wxTopLevelWindows.Number() == 0)) if (wxTheApp && (wxTopLevelWindows.Number() == 0))
{ {
@@ -133,7 +147,7 @@ wxFrame::~wxFrame()
if (wxTheApp->GetExitOnFrameDelete()) if (wxTheApp->GetExitOnFrameDelete())
{ {
// PostQuitMessage(0); PostQuitMessage(0);
} }
} }
@@ -144,9 +158,6 @@ wxFrame::~wxFrame()
// Try to bring the parent to the top. // Try to bring the parent to the top.
// MT:Only do this if this frame is currently the active window, else weird // MT:Only do this if this frame is currently the active window, else weird
// things start to happen // things start to happen
// TODO:
/*
if ( wxGetActiveWindow() == this ) if ( wxGetActiveWindow() == this )
if (GetParent() && GetParent()->GetHWND()) if (GetParent() && GetParent()->GetHWND())
::BringWindowToTop((HWND) GetParent()->GetHWND()); ::BringWindowToTop((HWND) GetParent()->GetHWND());
@@ -161,12 +172,14 @@ void wxFrame::DoGetClientSize(int *x, int *y) const
RECT rect; RECT rect;
::GetClientRect(GetHwnd(), &rect); ::GetClientRect(GetHwnd(), &rect);
#if wxUSE_STATUSBAR
if ( GetStatusBar() ) if ( GetStatusBar() )
{ {
int statusX, statusY; int statusX, statusY;
GetStatusBar()->GetClientSize(&statusX, &statusY); GetStatusBar()->GetClientSize(&statusX, &statusY);
rect.bottom -= statusY; rect.bottom -= statusY;
} }
#endif // wxUSE_STATUSBAR
wxPoint pt(GetClientAreaOrigin()); wxPoint pt(GetClientAreaOrigin());
rect.bottom -= pt.y; 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_width = rect2.right - rect2.left - rect.right + width;
int actual_height = rect2.bottom - rect2.top - rect.bottom + height; int actual_height = rect2.bottom - rect2.top - rect.bottom + height;
#if wxUSE_STATUSBAR
if ( GetStatusBar() ) if ( GetStatusBar() )
{ {
int statusX, statusY; int statusX, statusY;
GetStatusBar()->GetClientSize(&statusX, &statusY); GetStatusBar()->GetClientSize(&statusX, &statusY);
actual_height += statusY; actual_height += statusY;
} }
#endif // wxUSE_STATUSBAR
wxPoint pt(GetClientAreaOrigin()); wxPoint pt(GetClientAreaOrigin());
actual_width += pt.y; actual_width += pt.y;
@@ -248,73 +263,61 @@ void wxFrame::DoGetPosition(int *x, int *y) const
*/ */
} }
// ----------------------------------------------------------------------------
// variations around ::ShowWindow()
// ----------------------------------------------------------------------------
void wxFrame::DoShowWindow(int nShowCmd)
{
// TODO:
/*
::ShowWindow(GetHwnd(), nShowCmd);
m_iconized = nShowCmd == SW_MINIMIZE;
*/
}
bool wxFrame::Show(bool show) bool wxFrame::Show(bool show)
{ {
// TODO: // TODO:
/* /*
int cshow; DoShowWindow(show ? SW_SHOW : SW_HIDE);
if (show)
cshow = SW_SHOW;
else
cshow = SW_HIDE;
if (!show) if ( show )
{
// Try to highlight the correct window (the parent)
HWND hWndParent = 0;
if (GetParent())
{ {
hWndParent = (HWND) GetParent()->GetHWND(); ::BringWindowToTop(GetHwnd());
if (hWndParent)
::BringWindowToTop(hWndParent); 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);
}
} }
}
ShowWindow(GetHwnd(), (BOOL)cshow);
if (show)
{
BringWindowToTop(GetHwnd());
wxActivateEvent event(wxEVT_ACTIVATE, TRUE, m_windowId);
event.SetEventObject( this );
GetEventHandler()->ProcessEvent(event);
}
return TRUE;
*/ */
return FALSE; return TRUE;
} }
void wxFrame::Iconize(bool iconize) void wxFrame::Iconize(bool iconize)
{ {
// TODO: // DoShowWindow(iconize ? SW_MINIMIZE : SW_RESTORE);
/*
if (!iconize)
Show(TRUE);
int cshow;
if (iconize)
cshow = SW_MINIMIZE;
else
cshow = SW_RESTORE;
ShowWindow(GetHwnd(), (BOOL)cshow);
m_iconized = iconize;
*/
} }
// Equivalent to maximize/restore in Windows
void wxFrame::Maximize(bool maximize) void wxFrame::Maximize(bool maximize)
{ {
// TODO: // DoShowWindow(maximize ? SW_MAXIMIZE : SW_RESTORE);
/* }
Show(TRUE);
int cshow; void wxFrame::Restore()
if (maximize) {
cshow = SW_MAXIMIZE; // DoShowWindow(SW_RESTORE);
else
cshow = SW_RESTORE;
ShowWindow(GetHwnd(), cshow);
m_iconized = FALSE;
*/
} }
bool wxFrame::IsIconized() const bool wxFrame::IsIconized() const
@@ -324,99 +327,63 @@ bool wxFrame::IsIconized() const
((wxFrame *)this)->m_iconized = (::IsIconic(GetHwnd()) != 0); ((wxFrame *)this)->m_iconized = (::IsIconic(GetHwnd()) != 0);
return m_iconized; return m_iconized;
*/ */
return FALSE; return FALSE;
} }
// Is it maximized? // Is it maximized?
bool wxFrame::IsMaximized() const bool wxFrame::IsMaximized() const
{ {
// return (::IsZoomed(GetHwnd()) != 0) ; // TODO:
return FALSE; /*
return (::IsZoomed(GetHwnd()) != 0);
*/
return FALSE;
} }
void wxFrame::SetIcon(const wxIcon& icon) void wxFrame::SetIcon(const wxIcon& icon)
{ {
wxFrameBase::SetIcon(icon);
// TODO: // TODO:
/* /*
m_icon = icon; if ( m_icon.Ok() )
if ( m_icon.Ok() ) {
SendMessage(GetHwnd(), WM_SETICON, SendMessage(GetHwnd(), WM_SETICON,
(WPARAM)TRUE, (LPARAM)(HICON) m_icon.GetHICON()); (WPARAM)TRUE, (LPARAM)(HICON) m_icon.GetHICON());
}
*/ */
} }
#if wxUSE_STATUSBAR #if wxUSE_STATUSBAR
wxStatusBar *wxFrame::OnCreateStatusBar(int number, long style, wxWindowID id, wxStatusBar *wxFrame::OnCreateStatusBar(int number,
const wxString& name) long style,
wxWindowID id,
const wxString& name)
{ {
wxStatusBar *statusBar = NULL; 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 statusBar = wxFrameBase::OnCreateStatusBar(number, style, id, name);
wxClientDC dc(statusBar);
dc.SetFont(statusBar->GetFont());
long x, y; return statusBar;
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") );
m_frameStatusBar->SetStatusWidths(n, widths_field);
PositionStatusBar();
} }
void wxFrame::PositionStatusBar() void wxFrame::PositionStatusBar()
{ {
// native status bar positions itself // TODO:
if (m_frameStatusBar) /*
{ // native status bar positions itself
int w, h; if ( m_frameStatusBar )
GetClientSize(&w, &h); {
int sw, sh; int w, h;
m_frameStatusBar->GetSize(&sw, &sh); GetClientSize(&w, &h);
int sw, sh;
m_frameStatusBar->GetSize(&sw, &sh);
// Since we wish the status bar to be directly under the client area, // Since we wish the status bar to be directly under the client area,
// we use the adjusted sizes without using wxSIZE_NO_ADJUSTMENTS. // we use the adjusted sizes without using wxSIZE_NO_ADJUSTMENTS.
m_frameStatusBar->SetSize(0, h, w, sh); m_frameStatusBar->SetSize(0, h, w, sh);
} }
*/
} }
#endif // wxUSE_STATUSBAR #endif // wxUSE_STATUSBAR
@@ -467,6 +434,8 @@ void wxFrame::InternalSetMenuBar()
// Responds to colour changes, and passes event on to children. // Responds to colour changes, and passes event on to children.
void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event) void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event)
{ {
// TODO:
/*
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE)); SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE));
Refresh(); Refresh();
@@ -479,6 +448,7 @@ void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event)
// Propagate the event to the non-top-level children // Propagate the event to the non-top-level children
wxWindow::OnSysColourChanged(event); wxWindow::OnSysColourChanged(event);
*/
} }
/* /*
@@ -555,57 +525,8 @@ bool wxFrame::OS2Create(int id, wxWindow *parent, const wxChar *wclass, wxWindow
// style instead of WS_OVERLAPPED // style instead of WS_OVERLAPPED
if (width > -1 && height > -1) if (width > -1 && height > -1)
::PostMessage(GetHwnd(), WM_SIZE, SIZE_RESTORED, MAKELPARAM(width, height)); ::PostMessage(GetHwnd(), WM_SIZE, SIZE_RESTORED, MAKELPARAM(width, height));
return TRUE;
*/ */
return FALSE; return TRUE;
}
// 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);
}
} }
// Default activation behaviour - set the focus for the first child // 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) // 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
Destroy(); // frame contents
} // ----------------------------------------------------------------------------
// 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);
}
// Checks if there is a toolbar, and returns the first free client position // Checks if there is a toolbar, and returns the first free client position
wxPoint wxFrame::GetClientAreaOrigin() const wxPoint wxFrame::GetClientAreaOrigin() const
@@ -744,28 +609,20 @@ void wxFrame::DoClientToScreen(int *x, int *y) const
wxWindow::DoClientToScreen(x, y); wxWindow::DoClientToScreen(x, y);
} }
// ----------------------------------------------------------------------------
// tool/status bar stuff
// ----------------------------------------------------------------------------
#if wxUSE_TOOLBAR #if wxUSE_TOOLBAR
wxToolBar* wxFrame::CreateToolBar(long style, wxWindowID id, const wxString& name) wxToolBar* wxFrame::CreateToolBar(long style, wxWindowID id, const wxString& name)
{ {
wxCHECK_MSG( m_frameToolBar == NULL, FALSE, if ( wxFrameBase::CreateToolBar(style, id, name) )
wxT("recreating toolbar in wxFrame") );
wxToolBar* toolBar = OnCreateToolBar(style, id, name);
if (toolBar)
{ {
SetToolBar(toolBar);
PositionToolBar(); PositionToolBar();
return toolBar;
} }
else
{
return NULL;
}
}
wxToolBar* wxFrame::OnCreateToolBar(long style, wxWindowID id, const wxString& name) return m_frameToolBar;
{
return new wxToolBar(this, id, wxDefaultPosition, wxDefaultSize, style, name);
} }
void wxFrame::PositionToolBar() void wxFrame::PositionToolBar()
@@ -775,33 +632,40 @@ void wxFrame::PositionToolBar()
RECT rect; RECT rect;
::GetClientRect(GetHwnd(), &rect); ::GetClientRect(GetHwnd(), &rect);
#if wxUSE_STATUSBAR
if ( GetStatusBar() ) if ( GetStatusBar() )
{ {
int statusX, statusY; int statusX, statusY;
GetStatusBar()->GetClientSize(&statusX, &statusY); GetStatusBar()->GetClientSize(&statusX, &statusY);
rect.bottom -= statusY; rect.bottom -= statusY;
} }
#endif // wxUSE_STATUSBAR
if (GetToolBar()) if ( GetToolBar() )
{ {
int tw, th; 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 th = rect.bottom;
GetToolBar()->SetSize(0, 0, tw, rect.bottom, wxSIZE_NO_ADJUSTMENTS);
} }
else else
{ {
// Use the 'real' MSW position tw = rect.right;
GetToolBar()->SetSize(0, 0, rect.right, th, wxSIZE_NO_ADJUSTMENTS);
} }
// Use the 'real' MSW position here
GetToolBar()->SetSize(0, 0, tw, th, wxSIZE_NO_ADJUSTMENTS);
} }
*/ */
} }
#endif // wxUSE_TOOLBAR #endif // wxUSE_TOOLBAR
// ----------------------------------------------------------------------------
// frame state (iconized/maximized/...)
// ----------------------------------------------------------------------------
// propagate our state change to all child frames: this allows us to emulate X // 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 // Windows behaviour where child frames float independently of the parent one
// on the desktop, but are iconized/restored with it // 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 // message processing
// =========================================================================== // ===========================================================================
@@ -844,9 +694,11 @@ void wxFrame::MakeModal(bool modal)
bool wxFrame::OS2TranslateMessage(WXMSG* pMsg) bool wxFrame::OS2TranslateMessage(WXMSG* pMsg)
{ {
// TODO:
/*
if ( wxWindow::OS2TranslateMessage(pMsg) ) if ( wxWindow::OS2TranslateMessage(pMsg) )
return TRUE; return TRUE;
*/
// try the menu bar accels // try the menu bar accels
wxMenuBar *menuBar = GetMenuBar(); wxMenuBar *menuBar = GetMenuBar();
if ( !menuBar ) if ( !menuBar )
@@ -944,10 +796,20 @@ bool wxFrame::HandleSize(int x, int y, WXUINT id)
m_iconized = TRUE; m_iconized = TRUE;
break; break;
} }
*/
if ( !m_iconized ) if ( !m_iconized )
{ {
// forward WM_SIZE to status bar control // 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(); PositionStatusBar();
PositionToolBar(); PositionToolBar();
@@ -955,18 +817,20 @@ bool wxFrame::HandleSize(int x, int y, WXUINT id)
event.SetEventObject( this ); event.SetEventObject( this );
processed = GetEventHandler()->ProcessEvent(event); processed = GetEventHandler()->ProcessEvent(event);
} }
*/
return processed; return processed;
} }
bool wxFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control) bool wxFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control)
{ {
// TODO:
/*
if ( control ) if ( control )
{ {
// In case it's e.g. a toolbar. // In case it's e.g. a toolbar.
wxWindow *win = wxFindWinFromHandle(control); wxWindow *win = wxFindWinFromHandle(control);
if ( win ) if ( win )
return win->OS2Command(cmd, id); return win->MSWCommand(cmd, id);
} }
// handle here commands from menus and accelerators // handle here commands from menus and accelerators
@@ -977,7 +841,7 @@ bool wxFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control)
wxMenu *popupMenu = wxCurrentPopupMenu; wxMenu *popupMenu = wxCurrentPopupMenu;
wxCurrentPopupMenu = NULL; wxCurrentPopupMenu = NULL;
return popupMenu->OS2Command(cmd, id); return popupMenu->MSWCommand(cmd, id);
} }
if ( ProcessCommand(id) ) if ( ProcessCommand(id) )
@@ -985,7 +849,7 @@ bool wxFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control)
return TRUE; return TRUE;
} }
} }
*/
return FALSE; return FALSE;
} }
@@ -1003,14 +867,13 @@ bool wxFrame::HandleMenuSelect(WXWORD nItem, WXWORD flags, WXHMENU hMenu)
{ {
item = nItem; item = nItem;
} }
*/
else else
{ {
// don't give hints for separators (doesn't make sense) nor for the // don't give hints for separators (doesn't make sense) nor for the
// items opening popup menus (they don't have them anyhow) // items opening popup menus (they don't have them anyhow)
return FALSE; return FALSE;
} }
*/
wxMenuEvent event(wxEVT_MENU_HIGHLIGHT, item); wxMenuEvent event(wxEVT_MENU_HIGHLIGHT, item);
event.SetEventObject( this ); 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 wxFrame::OS2WindowProc(HWND hwnd, WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
{ {
MRESULT rc = 0; long rc = 0;
bool processed = FALSE; bool processed = FALSE;
// TODO: // TODO:
@@ -1074,10 +937,12 @@ MRESULT wxFrame::OS2WindowProc(HWND hwnd, WXUINT message, WXWPARAM wParam, WXLPA
processed = HandleSize(LOWORD(lParam), HIWORD(lParam), wParam); processed = HandleSize(LOWORD(lParam), HIWORD(lParam), wParam);
break; break;
} }
*/
if ( !processed ) if ( !processed )
rc = wxWindow::OS2WindowProc(hwnd, message, wParam, lParam); rc = wxWindow::MSWWindowProc(message, wParam, lParam);
return rc; return rc;
*/
return (MRESULT)0;
} }

View File

@@ -58,11 +58,7 @@ bool wxGauge::Create(wxWindow *parent, wxWindowID id,
const wxSize& size, const wxSize& size,
long style, long style,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator,
# else
const wxValidator& validator, const wxValidator& validator,
# endif
#endif #endif
const wxString& name) const wxString& name)
{ {

View File

@@ -81,11 +81,7 @@ bool wxListBox::Create(wxWindow *parent,
int n, const wxString choices[], int n, const wxString choices[],
long style, long style,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator,
# else
const wxValidator& validator, const wxValidator& validator,
# endif
#endif #endif
const wxString& name) const wxString& name)
{ {

View File

@@ -353,7 +353,7 @@ COMLIBOBJS2 = \
utilscmn.obj \ utilscmn.obj \
valgen.obj \ valgen.obj \
validate.obj \ validate.obj \
valtext.obj valtext.obj
COMLIBOBJS3 = \ COMLIBOBJS3 = \
variant.obj \ variant.obj \
@@ -518,6 +518,7 @@ OS2LIBOBJS2 = \
window.obj window.obj
HTMLOBJS = \ HTMLOBJS = \
..\html\$D\helpctrl.obj \
..\html\$D\helpdata.obj \ ..\html\$D\helpdata.obj \
..\html\$D\helpfrm.obj \ ..\html\$D\helpfrm.obj \
..\html\$D\htmlcell.obj \ ..\html\$D\htmlcell.obj \
@@ -537,6 +538,7 @@ HTMLOBJS = \
..\html\$D\winpars.obj ..\html\$D\winpars.obj
HTMLLIBOBJS = \ HTMLLIBOBJS = \
helpctrl.obj \
helpdata.obj \ helpdata.obj \
helpfrm.obj \ helpfrm.obj \
htmlcell.obj \ htmlcell.obj \
@@ -701,6 +703,7 @@ $(GENLIBOBJS):
copy ..\generic\$D\treectrl.obj copy ..\generic\$D\treectrl.obj
$(HTMLLIBOBJS): $(HTMLLIBOBJS):
copy ..\html\$D\helpctrl.obj
copy ..\html\$D\helpdata.obj copy ..\html\$D\helpdata.obj
copy ..\html\$D\helpfrm.obj copy ..\html\$D\helpfrm.obj
copy ..\html\$D\htmlcell.obj copy ..\html\$D\htmlcell.obj

View File

@@ -144,11 +144,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
int n, const wxString choices[], int n, const wxString choices[],
int majorDim, long style, int majorDim, long style,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* val, const wxString& name)
# else
const wxValidator& val, const wxString& name) const wxValidator& val, const wxString& name)
# endif
#endif #endif
{ {
m_selectedButton = -1; m_selectedButton = -1;

View File

@@ -47,11 +47,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, long style, const wxSize& size, long style,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator,
# else
const wxValidator& validator, const wxValidator& validator,
# endif
#endif #endif
const wxString& name) const wxString& name)
{ {
@@ -159,11 +155,7 @@ bool wxBitmapRadioButton::Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, long style, const wxSize& size, long style,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator,
# else
const wxValidator& validator, const wxValidator& validator,
# endif
#endif #endif
const wxString& name) const wxString& name)
{ {

View File

@@ -36,11 +36,7 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, long style, const wxSize& size, long style,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator,
# else
const wxValidator& validator, const wxValidator& validator,
# endif
#endif #endif
const wxString& name) const wxString& name)
{ {

View File

@@ -47,11 +47,7 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, long style, const wxSize& size, long style,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator,
# else
const wxValidator& validator, const wxValidator& validator,
# endif
#endif #endif
const wxString& name) const wxString& name)
{ {

View File

@@ -88,11 +88,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
const wxSize& size, const wxSize& size,
long style, long style,
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator,
# else
const wxValidator& validator, const wxValidator& validator,
# endif
#endif #endif
const wxString& name) const wxString& name)
{ {

View File

@@ -29,6 +29,10 @@
#define INCL_DOSERRORS #define INCL_DOSERRORS
#define INCL_DOS #define INCL_DOS
#include <os2.h> #include <os2.h>
#define PURE_32
#include <upm.h>
#include <netcons.h>
#include <netbios.h>
#include <ctype.h> #include <ctype.h>
#include <direct.h> #include <direct.h>

View File

@@ -382,7 +382,7 @@ void wxWindow::SetTitle(
const wxString& rTitle const wxString& rTitle
) )
{ {
::WinSetWindowText(GetHwnd(), title.c_str()); ::WinSetWindowText(GetHwnd(), rTitle.c_str());
} }
wxString wxWindow::GetTitle() const wxString wxWindow::GetTitle() const
@@ -392,24 +392,77 @@ wxString wxWindow::GetTitle() const
void wxWindow::CaptureMouse() void wxWindow::CaptureMouse()
{ {
// TODO: HWND hWnd = GetHwnd();
if (hWnd && !m_bWinCaptured)
{
::WinSetCapture(HWND_DESKTOP, hWnd);
m_bWinCaptured = TRUE;
}
} }
void wxWindow::ReleaseMouse() 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); 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: if ( !wxWindowBase::SetCursor(rCursor))
return(TRUE); {
// 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) void wxWindow::WarpPointer(int x_pos, int y_pos)

View File

@@ -19,7 +19,7 @@ OS2LIBFLAGS=/NOL /NOE
OS2LIBS=CPPOM30.lib CPPOOC3.LIB OS2386.LIB OS2LIBS=CPPOM30.lib CPPOOC3.LIB OS2386.LIB
# Change WXDIR or WXWIN to wherever wxWindows is found # Change WXDIR or WXWIN to wherever wxWindows is found
WXDIR = j:\dev\wx2\wxWindows WXDIR = h:\dev\wx2\wxWindows
OS2PNGDIR=$(WXDIR)\src\png OS2PNGDIR=$(WXDIR)\src\png
OS2PNGINC=$(WINPNGDIR) OS2PNGINC=$(WINPNGDIR)

View File

@@ -19,7 +19,7 @@ OS2LIBFLAGS=/NOL /NOE
OS2LIBS=CPPOM30.lib CPPOOC3.LIB OS2386.LIB OS2LIBS=CPPOM30.lib CPPOOC3.LIB OS2386.LIB
# Change WXDIR or WXWIN to wherever wxWindows is found # Change WXDIR or WXWIN to wherever wxWindows is found
WXDIR = j:\dev\wx2\wxWindows WXDIR = h:\dev\wx2\wxWindows
OS2XPMDIR=$(WXDIR)\src\xpm OS2XPMDIR=$(WXDIR)\src\xpm
OS2XPMINC=$(WINXPMDIR) OS2XPMINC=$(WINXPMDIR)

View File

@@ -19,7 +19,7 @@ OS2LIBFLAGS=/NOL /NOE
OS2LIBS=CPPOM30.lib CPPOOC3.LIB OS2386.LIB OS2LIBS=CPPOM30.lib CPPOOC3.LIB OS2386.LIB
# Change WXDIR or WXWIN to wherever wxWindows is found # Change WXDIR or WXWIN to wherever wxWindows is found
WXDIR = j:\dev\wx2\wxWindows WXDIR = h:\dev\wx2\wxWindows
OS2ZLIBDIR=$(WXDIR)\src\zlib OS2ZLIBDIR=$(WXDIR)\src\zlib
OS2ZLIBINC=$(WINPNGDIR) OS2ZLIBINC=$(WINPNGDIR)