removed WXWIN_COMPATIBILITY and WXWIN_COMPATIBILITY_2
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22966 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -779,7 +779,6 @@ WX_ARG_ENABLE(no_exceptions, [ --enable-no_exceptions create code without C++
|
|||||||
WX_ARG_ENABLE(permissive, [ --enable-permissive compile code disregarding strict ANSI], wxUSE_PERMISSIVE)
|
WX_ARG_ENABLE(permissive, [ --enable-permissive compile code disregarding strict ANSI], wxUSE_PERMISSIVE)
|
||||||
WX_ARG_ENABLE(no_deps, [ --enable-no_deps create code without dependency information], wxUSE_NO_DEPS)
|
WX_ARG_ENABLE(no_deps, [ --enable-no_deps create code without dependency information], wxUSE_NO_DEPS)
|
||||||
|
|
||||||
WX_ARG_ENABLE(compat20, [ --enable-compat20 enable wxWindows 2.0 compatibility], WXWIN_COMPATIBILITY_2)
|
|
||||||
WX_ARG_ENABLE(compat22, [ --enable-compat22 enable wxWindows 2.2 compatibility], WXWIN_COMPATIBILITY_2_2)
|
WX_ARG_ENABLE(compat22, [ --enable-compat22 enable wxWindows 2.2 compatibility], WXWIN_COMPATIBILITY_2_2)
|
||||||
WX_ARG_ENABLE(compat24, [ --disable-compat24 disable wxWindows 2.4 compatibility], WXWIN_COMPATIBILITY_2_4, disable)
|
WX_ARG_ENABLE(compat24, [ --disable-compat24 disable wxWindows 2.4 compatibility], WXWIN_COMPATIBILITY_2_4, disable)
|
||||||
|
|
||||||
@@ -4168,12 +4167,6 @@ dnl ---------------------------------------------------------------------------
|
|||||||
dnl compatibility level
|
dnl compatibility level
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
|
|
||||||
if test "$WXWIN_COMPATIBILITY_2" = "yes"; then
|
|
||||||
AC_DEFINE(WXWIN_COMPATIBILITY_2)
|
|
||||||
|
|
||||||
WXWIN_COMPATIBILITY_2_2="yes"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "x$WXWIN_COMPATIBILITY_2_2" = "xyes"; then
|
if test "x$WXWIN_COMPATIBILITY_2_2" = "xyes"; then
|
||||||
AC_DEFINE(WXWIN_COMPATIBILITY_2_2)
|
AC_DEFINE(WXWIN_COMPATIBILITY_2_2)
|
||||||
|
|
||||||
@@ -5920,7 +5913,6 @@ echo " Should wxWindows be linked as a shared library? ${wxUSE_SHARED:-
|
|||||||
echo " Should wxWindows be compiled in Unicode mode? ${wxUSE_UNICODE:-no}"
|
echo " Should wxWindows be compiled in Unicode mode? ${wxUSE_UNICODE:-no}"
|
||||||
|
|
||||||
echo " What level of wxWindows compatibility should be enabled?"
|
echo " What level of wxWindows compatibility should be enabled?"
|
||||||
echo " wxWindows 2.0 ${WXWIN_COMPATIBILITY_2:-no}"
|
|
||||||
echo " wxWindows 2.2 ${WXWIN_COMPATIBILITY_2_2:-no}"
|
echo " wxWindows 2.2 ${WXWIN_COMPATIBILITY_2_2:-no}"
|
||||||
echo " wxWindows 2.4 ${WXWIN_COMPATIBILITY_2_4:-yes}"
|
echo " wxWindows 2.4 ${WXWIN_COMPATIBILITY_2_4:-yes}"
|
||||||
|
|
||||||
|
@@ -52,16 +52,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// WXWIN_COMPATIBILITY macros affect presence of virtual functions
|
// WXWIN_COMPATIBILITY macros affect presence of virtual functions
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
#define __WX_BO_WXWIN_COMPAT_1_68 ",compatible with 1.68"
|
|
||||||
#else
|
|
||||||
#define __WX_BO_WXWIN_COMPAT_1_68
|
|
||||||
#endif
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
#define __WX_BO_WXWIN_COMPAT_2_0 ",compatible with 2.0"
|
|
||||||
#else
|
|
||||||
#define __WX_BO_WXWIN_COMPAT_2_0
|
|
||||||
#endif
|
|
||||||
#if WXWIN_COMPATIBILITY_2_2
|
#if WXWIN_COMPATIBILITY_2_2
|
||||||
#define __WX_BO_WXWIN_COMPAT_2_2 ",compatible with 2.2"
|
#define __WX_BO_WXWIN_COMPAT_2_2 ",compatible with 2.2"
|
||||||
#else
|
#else
|
||||||
@@ -79,7 +69,6 @@
|
|||||||
__WX_BO_VERSION(wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER) \
|
__WX_BO_VERSION(wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER) \
|
||||||
" (" __WX_BO_DEBUG "," __WX_BO_UNICODE \
|
" (" __WX_BO_DEBUG "," __WX_BO_UNICODE \
|
||||||
__WX_BO_COMPILER \
|
__WX_BO_COMPILER \
|
||||||
__WX_BO_WXWIN_COMPAT_1_68 __WX_BO_WXWIN_COMPAT_2_0 \
|
|
||||||
__WX_BO_WXWIN_COMPAT_2_2 __WX_BO_WXWIN_COMPAT_2_4 \
|
__WX_BO_WXWIN_COMPAT_2_2 __WX_BO_WXWIN_COMPAT_2_4 \
|
||||||
")"
|
")"
|
||||||
|
|
||||||
|
@@ -59,35 +59,8 @@ public:
|
|||||||
// Calls the callback and appropriate event handlers
|
// Calls the callback and appropriate event handlers
|
||||||
bool ProcessCommand(wxCommandEvent& event);
|
bool ProcessCommand(wxCommandEvent& event);
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
virtual void SetButtonColour(const wxColour& WXUNUSED(col)) { }
|
|
||||||
wxColour* GetButtonColour() const { return NULL; }
|
|
||||||
|
|
||||||
inline virtual void SetLabelFont(const wxFont& font);
|
|
||||||
inline virtual void SetButtonFont(const wxFont& font);
|
|
||||||
inline wxFont& GetLabelFont() const;
|
|
||||||
inline wxFont& GetButtonFont() const;
|
|
||||||
|
|
||||||
// Adds callback
|
|
||||||
inline void Callback(const wxFunction function);
|
|
||||||
|
|
||||||
wxFunction GetCallback() { return m_callback; }
|
|
||||||
|
|
||||||
protected:
|
|
||||||
wxFunction m_callback; // Callback associated with the window
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual wxSize DoGetBestSize() const;
|
virtual wxSize DoGetBestSize() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
inline void wxControl::Callback(const wxFunction f) { m_callback = f; };
|
|
||||||
inline wxFont& wxControl::GetLabelFont() const { return GetFont(); }
|
|
||||||
inline wxFont& wxControl::GetButtonFont() const { return GetFont(); }
|
|
||||||
inline void wxControl::SetLabelFont(const wxFont& font) { SetFont(font); }
|
|
||||||
inline void wxControl::SetButtonFont(const wxFont& font) { SetFont(font); }
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
#endif // __WX_COCOA_CONTROL_H__
|
#endif // __WX_COCOA_CONTROL_H__
|
||||||
|
@@ -636,16 +636,6 @@ public:
|
|||||||
}
|
}
|
||||||
#endif // !Win16
|
#endif // !Win16
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
void GetTextExtent(const wxString& string, float *x, float *y,
|
|
||||||
float *descent = NULL, float *externalLeading = NULL,
|
|
||||||
wxFont *theFont = NULL, bool use16bit = FALSE) const ;
|
|
||||||
void GetSize(float* width, float* height) const { int w, h; GetSize(& w, & h); *width = w; *height = h; }
|
|
||||||
void GetSizeMM(float *width, float *height) const { int w, h; GetSizeMM(& w, & h); *width = (float) w; *height = (float) h; }
|
|
||||||
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// the pure virtual functions which should be implemented by wxDC
|
// the pure virtual functions which should be implemented by wxDC
|
||||||
virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
|
virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
|
||||||
|
@@ -1179,10 +1179,6 @@ enum wxBorder
|
|||||||
|
|
||||||
#define wxFRAME_NO_WINDOW_MENU 0x0100
|
#define wxFRAME_NO_WINDOW_MENU 0x0100
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
#define wxDEFAULT_FRAME wxDEFAULT_FRAME_STYLE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define wxDEFAULT_FRAME_STYLE \
|
#define wxDEFAULT_FRAME_STYLE \
|
||||||
(wxSYSTEM_MENU | wxRESIZE_BORDER | \
|
(wxSYSTEM_MENU | wxRESIZE_BORDER | \
|
||||||
wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxCLOSE_BOX | \
|
wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxCLOSE_BOX | \
|
||||||
|
@@ -202,11 +202,6 @@ public:
|
|||||||
// Override to do cleanup/veto close
|
// Override to do cleanup/veto close
|
||||||
virtual bool OnClose(bool deleteWindow);
|
virtual bool OnClose(bool deleteWindow);
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
// Defeat compiler warning
|
|
||||||
bool OnClose() { return wxEvtHandler::OnClose(); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Extend event processing to search the document's event table
|
// Extend event processing to search the document's event table
|
||||||
virtual bool ProcessEvent(wxEvent& event);
|
virtual bool ProcessEvent(wxEvent& event);
|
||||||
|
|
||||||
|
@@ -292,50 +292,6 @@ END_DECLARE_EVENT_TYPES()
|
|||||||
extern const wxEventType WXDLLIMPEXP_CORE wxEVT_COMMAND_TEXT_UPDATED;
|
extern const wxEventType WXDLLIMPEXP_CORE wxEVT_COMMAND_TEXT_UPDATED;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
#define wxEVENT_TYPE_BUTTON_COMMAND wxEVT_COMMAND_BUTTON_CLICKED
|
|
||||||
#define wxEVENT_TYPE_CHECKBOX_COMMAND wxEVT_COMMAND_CHECKBOX_CLICKED
|
|
||||||
#define wxEVENT_TYPE_CHOICE_COMMAND wxEVT_COMMAND_CHOICE_SELECTED
|
|
||||||
#define wxEVENT_TYPE_LISTBOX_COMMAND wxEVT_COMMAND_LISTBOX_SELECTED
|
|
||||||
#define wxEVENT_TYPE_LISTBOX_DCLICK_COMMAND wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
|
|
||||||
#define wxEVENT_TYPE_TEXT_COMMAND wxEVT_COMMAND_TEXT_UPDATED
|
|
||||||
#define wxEVENT_TYPE_MULTITEXT_COMMAND wxEVT_COMMAND_TEXT_UPDATED
|
|
||||||
#define wxEVENT_TYPE_MENU_COMMAND wxEVT_COMMAND_MENU_SELECTED
|
|
||||||
#define wxEVENT_TYPE_SLIDER_COMMAND wxEVT_COMMAND_SLIDER_UPDATED
|
|
||||||
#define wxEVENT_TYPE_RADIOBOX_COMMAND wxEVT_COMMAND_RADIOBOX_SELECTED
|
|
||||||
#define wxEVENT_TYPE_RADIOBUTTON_COMMAND wxEVT_COMMAND_RADIOBUTTON_SELECTED
|
|
||||||
#define wxEVENT_TYPE_TEXT_ENTER_COMMAND wxEVT_COMMAND_TEXT_ENTER
|
|
||||||
#define wxEVENT_TYPE_SET_FOCUS wxEVT_SET_FOCUS
|
|
||||||
#define wxEVENT_TYPE_KILL_FOCUS wxEVT_KILL_FOCUS
|
|
||||||
#define wxEVENT_TYPE_SCROLLBAR_COMMAND wxEVT_COMMAND_SCROLLBAR_UPDATED
|
|
||||||
#define wxEVENT_TYPE_VIRT_LISTBOX_COMMAND wxEVT_COMMAND_VLBOX_SELECTED
|
|
||||||
#define wxEVENT_TYPE_COMBOBOX_COMMAND wxEVT_COMMAND_COMBOBOX_SELECTED
|
|
||||||
|
|
||||||
#define wxEVENT_TYPE_LEFT_DOWN wxEVT_LEFT_DOWN
|
|
||||||
#define wxEVENT_TYPE_LEFT_UP wxEVT_LEFT_UP
|
|
||||||
#define wxEVENT_TYPE_MIDDLE_DOWN wxEVT_MIDDLE_DOWN
|
|
||||||
#define wxEVENT_TYPE_MIDDLE_UP wxEVT_MIDDLE_UP
|
|
||||||
#define wxEVENT_TYPE_RIGHT_DOWN wxEVT_RIGHT_DOWN
|
|
||||||
#define wxEVENT_TYPE_RIGHT_UP wxEVT_RIGHT_UP
|
|
||||||
#define wxEVENT_TYPE_MOTION wxEVT_MOTION
|
|
||||||
#define wxEVENT_TYPE_ENTER_WINDOW wxEVT_ENTER_WINDOW
|
|
||||||
#define wxEVENT_TYPE_LEAVE_WINDOW wxEVT_LEAVE_WINDOW
|
|
||||||
#define wxEVENT_TYPE_LEFT_DCLICK wxEVT_LEFT_DCLICK
|
|
||||||
#define wxEVENT_TYPE_MIDDLE_DCLICK wxEVT_MIDDLE_DCLICK
|
|
||||||
#define wxEVENT_TYPE_RIGHT_DCLICK wxEVT_RIGHT_DCLICK
|
|
||||||
#define wxEVENT_TYPE_CHAR wxEVT_CHAR
|
|
||||||
#define wxEVENT_TYPE_SCROLL_TOP wxEVT_SCROLL_TOP
|
|
||||||
#define wxEVENT_TYPE_SCROLL_BOTTOM wxEVT_SCROLL_BOTTOM
|
|
||||||
#define wxEVENT_TYPE_SCROLL_LINEUP wxEVT_SCROLL_LINEUP
|
|
||||||
#define wxEVENT_TYPE_SCROLL_LINEDOWN wxEVT_SCROLL_LINEDOWN
|
|
||||||
#define wxEVENT_TYPE_SCROLL_PAGEUP wxEVT_SCROLL_PAGEUP
|
|
||||||
#define wxEVENT_TYPE_SCROLL_PAGEDOWN wxEVT_SCROLL_PAGEDOWN
|
|
||||||
#define wxEVENT_TYPE_SCROLL_THUMBTRACK wxEVT_SCROLL_THUMBTRACK
|
|
||||||
#define wxEVENT_TYPE_SCROLL_ENDSCROLL wxEVT_SCROLL_ENDSCROLL
|
|
||||||
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
// the predefined constants for the number of times we propagate event
|
// the predefined constants for the number of times we propagate event
|
||||||
// upwards window child-parent chain
|
// upwards window child-parent chain
|
||||||
enum Propagation_state
|
enum Propagation_state
|
||||||
@@ -554,10 +510,6 @@ public:
|
|||||||
|
|
||||||
virtual wxEvent *Clone() const { return new wxCommandEvent(*this); }
|
virtual wxEvent *Clone() const { return new wxCommandEvent(*this); }
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
bool Checked() const { return IsChecked(); }
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxString m_commandString; // String event argument
|
wxString m_commandString; // String event argument
|
||||||
int m_commandInt;
|
int m_commandInt;
|
||||||
@@ -801,22 +753,6 @@ public:
|
|||||||
// Find the logical position of the event given the DC
|
// Find the logical position of the event given the DC
|
||||||
wxPoint GetLogicalPosition(const wxDC& dc) const;
|
wxPoint GetLogicalPosition(const wxDC& dc) const;
|
||||||
|
|
||||||
// Compatibility
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
void Position(long *xpos, long *ypos) const
|
|
||||||
{
|
|
||||||
if (xpos)
|
|
||||||
*xpos = (long)m_x;
|
|
||||||
if (ypos)
|
|
||||||
*ypos = (long)m_y;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Position(float *xpos, float *ypos) const
|
|
||||||
{
|
|
||||||
*xpos = (float) m_x; *ypos = (float) m_y;
|
|
||||||
}
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
// Get X position
|
// Get X position
|
||||||
wxCoord GetX() const { return m_x; }
|
wxCoord GetX() const { return m_x; }
|
||||||
|
|
||||||
@@ -1312,22 +1248,13 @@ public:
|
|||||||
: wxEvent(winid, type),
|
: wxEvent(winid, type),
|
||||||
m_loggingOff(TRUE),
|
m_loggingOff(TRUE),
|
||||||
m_veto(FALSE), // should be FALSE by default
|
m_veto(FALSE), // should be FALSE by default
|
||||||
m_canVeto(TRUE)
|
m_canVeto(TRUE) {}
|
||||||
{
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
m_force = FALSE;
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
}
|
|
||||||
wxCloseEvent(const wxCloseEvent & event)
|
wxCloseEvent(const wxCloseEvent & event)
|
||||||
: wxEvent(event),
|
: wxEvent(event),
|
||||||
m_loggingOff(event.m_loggingOff),
|
m_loggingOff(event.m_loggingOff),
|
||||||
m_veto(event.m_veto),
|
m_veto(event.m_veto),
|
||||||
m_canVeto(event.m_canVeto)
|
m_canVeto(event.m_canVeto) {}
|
||||||
{
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
m_force = event.m_force;
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetLoggingOff(bool logOff) { m_loggingOff = logOff; }
|
void SetLoggingOff(bool logOff) { m_loggingOff = logOff; }
|
||||||
bool GetLoggingOff() const { return m_loggingOff; }
|
bool GetLoggingOff() const { return m_loggingOff; }
|
||||||
@@ -1345,24 +1272,12 @@ public:
|
|||||||
bool CanVeto() const { return m_canVeto; }
|
bool CanVeto() const { return m_canVeto; }
|
||||||
bool GetVeto() const { return m_canVeto && m_veto; }
|
bool GetVeto() const { return m_canVeto && m_veto; }
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
// This is probably obsolete now, since we use CanVeto instead, in
|
|
||||||
// both OnCloseWindow and OnQueryEndSession.
|
|
||||||
// m_force == ! m_canVeto i.e., can't veto means we must force it to close.
|
|
||||||
void SetForce(bool force) { m_force = force; }
|
|
||||||
bool GetForce() const { return m_force; }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
virtual wxEvent *Clone() const { return new wxCloseEvent(*this); }
|
virtual wxEvent *Clone() const { return new wxCloseEvent(*this); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool m_loggingOff;
|
bool m_loggingOff;
|
||||||
bool m_veto, m_canVeto;
|
bool m_veto, m_canVeto;
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
bool m_force;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxCloseEvent)
|
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxCloseEvent)
|
||||||
|
|
||||||
@@ -2299,24 +2214,6 @@ public:
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// old stuff
|
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
virtual void OnCommand(wxWindow& WXUNUSED(win),
|
|
||||||
wxCommandEvent& WXUNUSED(event))
|
|
||||||
{
|
|
||||||
wxFAIL_MSG(wxT("shouldn't be called any more"));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Called if child control has no callback function
|
|
||||||
virtual long Default()
|
|
||||||
{ return GetNextHandler() ? GetNextHandler()->Default() : 0; };
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
virtual bool OnClose();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const wxEventTableEntry sm_eventTableEntries[];
|
static const wxEventTableEntry sm_eventTableEntries[];
|
||||||
|
|
||||||
|
@@ -271,16 +271,6 @@ WXDLLIMPEXP_BASE bool wxRmdir(const wxString& dir, int flags = 0);
|
|||||||
// compatibility defines, don't use in new code
|
// compatibility defines, don't use in new code
|
||||||
#define wxDirExists wxPathExists
|
#define wxDirExists wxPathExists
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
#define FileExists wxFileExists
|
|
||||||
#define DirExists wxDirExists
|
|
||||||
#define IsAbsolutePath wxIsAbsolutePath
|
|
||||||
#define FileNameFromPath wxFileNameFromPath
|
|
||||||
#define PathOnly wxPathOnly
|
|
||||||
#define Dos2UnixFilename wxDos2UnixFilename
|
|
||||||
#define Unix2DosFilename wxUnix2DosFilename
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// separators in file names
|
// separators in file names
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -275,11 +275,6 @@ public:
|
|||||||
wxPoint& operator-=(const wxPoint& p) { x -= p.x; y -= p.y; return *this; }
|
wxPoint& operator-=(const wxPoint& p) { x -= p.x; y -= p.y; return *this; }
|
||||||
};
|
};
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
#define wxIntPoint wxPoint
|
|
||||||
#define wxRectangle wxRect
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// wxRect
|
// wxRect
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
@@ -107,25 +107,6 @@ public:
|
|||||||
void OnOK(wxCommandEvent& event);
|
void OnOK(wxCommandEvent& event);
|
||||||
void OnListBoxDClick(wxCommandEvent& event);
|
void OnListBoxDClick(wxCommandEvent& event);
|
||||||
|
|
||||||
// old, deprecated methods
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
wxSingleChoiceDialog(wxWindow *parent,
|
|
||||||
const wxString& message,
|
|
||||||
const wxString& caption,
|
|
||||||
const wxStringList& choices,
|
|
||||||
char **clientData = (char **)NULL,
|
|
||||||
long style = wxCHOICEDLG_STYLE,
|
|
||||||
const wxPoint& pos = wxDefaultPosition);
|
|
||||||
|
|
||||||
bool Create(wxWindow *parent,
|
|
||||||
const wxString& message,
|
|
||||||
const wxString& caption,
|
|
||||||
const wxStringList& choices,
|
|
||||||
char **clientData = (char **)NULL,
|
|
||||||
long style = wxCHOICEDLG_STYLE,
|
|
||||||
const wxPoint& pos = wxDefaultPosition);
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int m_selection;
|
int m_selection;
|
||||||
wxString m_stringSelection;
|
wxString m_stringSelection;
|
||||||
@@ -269,45 +250,5 @@ WXDLLEXPORT size_t wxGetMultipleChoices(wxArrayInt& selections,
|
|||||||
int width = wxCHOICE_WIDTH,
|
int width = wxCHOICE_WIDTH,
|
||||||
int height = wxCHOICE_HEIGHT);
|
int height = wxCHOICE_HEIGHT);
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
// these methods are for backwards compatibility only, not documented and
|
|
||||||
// deprecated
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
|
|
||||||
WXDLLEXPORT wxString wxGetSingleChoice(const wxString& message,
|
|
||||||
const wxString& caption,
|
|
||||||
int n, wxChar *choices[],
|
|
||||||
wxWindow *parent = (wxWindow *) NULL,
|
|
||||||
int x = -1,
|
|
||||||
int y = -1,
|
|
||||||
bool centre = TRUE,
|
|
||||||
int width = wxCHOICE_WIDTH,
|
|
||||||
int height = wxCHOICE_HEIGHT);
|
|
||||||
|
|
||||||
WXDLLEXPORT int wxGetSingleChoiceIndex(const wxString& message,
|
|
||||||
const wxString& caption,
|
|
||||||
int n, wxChar *choices[],
|
|
||||||
wxWindow *parent = (wxWindow *) NULL,
|
|
||||||
int x = -1,
|
|
||||||
int y = -1,
|
|
||||||
bool centre = TRUE,
|
|
||||||
int width = wxCHOICE_WIDTH,
|
|
||||||
int height = wxCHOICE_HEIGHT);
|
|
||||||
|
|
||||||
WXDLLEXPORT void* wxGetSingleChoiceData(const wxString& message,
|
|
||||||
const wxString& caption,
|
|
||||||
int n, wxChar **choices,
|
|
||||||
void **client_data,
|
|
||||||
wxWindow *parent = (wxWindow *) NULL,
|
|
||||||
int x = -1, int y = -1,
|
|
||||||
bool centre = TRUE,
|
|
||||||
int width = wxCHOICE_WIDTH,
|
|
||||||
int height = wxCHOICE_HEIGHT);
|
|
||||||
|
|
||||||
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
|
|
||||||
#endif // __CHOICEDLGH_G__
|
#endif // __CHOICEDLGH_G__
|
||||||
|
|
||||||
|
@@ -71,17 +71,6 @@ public:
|
|||||||
|
|
||||||
virtual void DoSetVirtualSize(int x, int y);
|
virtual void DoSetVirtualSize(int x, int y);
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
virtual void GetScrollUnitsPerPage(int *x_page, int *y_page) const;
|
|
||||||
virtual void CalcUnscrolledPosition(int x, int y, float *xx, float *yy) const;
|
|
||||||
// Need to do this otherwise the compiler gets confuced
|
|
||||||
// between float and int calls to this function.
|
|
||||||
void CalcUnscrolledPosition(int x, int y, int *xx, int *yy) const
|
|
||||||
{ wxScrollHelper::CalcScrolledPosition(x, y, xx, yy); }
|
|
||||||
wxPoint CalcUnscrolledPosition(const wxPoint& pt) const
|
|
||||||
{ return wxScrollHelper::CalcScrolledPosition(pt); }
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// this is needed for wxEVT_PAINT processing hack described in
|
// this is needed for wxEVT_PAINT processing hack described in
|
||||||
// wxScrollHelperEvtHandler::ProcessEvent()
|
// wxScrollHelperEvtHandler::ProcessEvent()
|
||||||
|
@@ -126,32 +126,5 @@
|
|||||||
#define wxHTML_FONT_SIZE_7 32
|
#define wxHTML_FONT_SIZE_7 32
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
|
|
||||||
#define HTML_ALIGN_LEFT wxHTML_ALIGN_LEFT
|
|
||||||
#define HTML_ALIGN_RIGHT wxHTML_ALIGN_RIGHT
|
|
||||||
#define HTML_ALIGN_TOP wxHTML_ALIGN_TOP
|
|
||||||
#define HTML_ALIGN_BOTTOM wxHTML_ALIGN_BOTTOM
|
|
||||||
#define HTML_ALIGN_CENTER wxHTML_ALIGN_CENTER
|
|
||||||
#define HTML_CLR_FOREGROUND wxHTML_CLR_FOREGROUND
|
|
||||||
#define HTML_CLR_BACKGROUND wxHTML_CLR_BACKGROUND
|
|
||||||
#define HTML_UNITS_PIXELS wxHTML_UNITS_PIXELS
|
|
||||||
#define HTML_UNITS_PERCENT wxHTML_UNITS_PERCENT
|
|
||||||
#define HTML_INDENT_LEFT wxHTML_INDENT_LEFT
|
|
||||||
#define HTML_INDENT_RIGHT wxHTML_INDENT_RIGHT
|
|
||||||
#define HTML_INDENT_TOP wxHTML_INDENT_TOP
|
|
||||||
#define HTML_INDENT_BOTTOM wxHTML_INDENT_BOTTOM
|
|
||||||
#define HTML_INDENT_HORIZONTAL wxHTML_INDENT_HORIZONTAL
|
|
||||||
#define HTML_INDENT_VERTICAL wxHTML_INDENT_VERTICAL
|
|
||||||
#define HTML_INDENT_ALL wxHTML_INDENT_ALL
|
|
||||||
#define HTML_COND_ISANCHOR wxHTML_COND_ISANCHOR
|
|
||||||
#define HTML_COND_ISIMAGEMAP wxHTML_COND_ISIMAGEMAP
|
|
||||||
#define HTML_COND_USER wxHTML_COND_USER
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@@ -62,11 +62,6 @@ public:
|
|||||||
// accessors
|
// accessors
|
||||||
bool Ok() const {return m_isInit; }
|
bool Ok() const {return m_isInit; }
|
||||||
|
|
||||||
// Let's remove this inelegant function
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
void Get(unsigned char *r, unsigned char *g, unsigned char *b) const;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
unsigned char Red() const { return m_red; }
|
unsigned char Red() const { return m_red; }
|
||||||
unsigned char Green() const { return m_green; }
|
unsigned char Green() const { return m_green; }
|
||||||
unsigned char Blue() const { return m_blue; }
|
unsigned char Blue() const { return m_blue; }
|
||||||
|
@@ -84,16 +84,6 @@ public:
|
|||||||
virtual void Refresh(bool eraseBack = TRUE, const wxRect *rect = NULL) ;
|
virtual void Refresh(bool eraseBack = TRUE, const wxRect *rect = NULL) ;
|
||||||
WXWidget GetMacControl() { return m_macControl ;}
|
WXWidget GetMacControl() { return m_macControl ;}
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
virtual void SetButtonColour(const wxColour& WXUNUSED(col)) { }
|
|
||||||
wxColour* GetButtonColour() const { return NULL; }
|
|
||||||
|
|
||||||
inline virtual void SetLabelFont(const wxFont& font);
|
|
||||||
inline virtual void SetButtonFont(const wxFont& font);
|
|
||||||
inline wxFont& GetLabelFont() const;
|
|
||||||
inline wxFont& GetButtonFont() const;
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// For controls like radiobuttons which are really composite
|
// For controls like radiobuttons which are really composite
|
||||||
WXWidget m_macControl ;
|
WXWidget m_macControl ;
|
||||||
@@ -110,13 +100,6 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
inline wxFont& wxControl::GetLabelFont() const { return GetFont(); }
|
|
||||||
inline wxFont& wxControl::GetButtonFont() const { return GetFont(); }
|
|
||||||
inline void wxControl::SetLabelFont(const wxFont& font) { SetFont(font); }
|
|
||||||
inline void wxControl::SetButtonFont(const wxFont& font) { SetFont(font); }
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
wxControl *wxFindControlFromMacControl(WXWidget inControl ) ;
|
wxControl *wxFindControlFromMacControl(WXWidget inControl ) ;
|
||||||
void wxAssociateControlWithMacControl(WXWidget inControl, wxControl *control) ;
|
void wxAssociateControlWithMacControl(WXWidget inControl, wxControl *control) ;
|
||||||
void wxRemoveMacControlAssociation(wxControl *control) ;
|
void wxRemoveMacControlAssociation(wxControl *control) ;
|
||||||
|
@@ -79,10 +79,6 @@ public:
|
|||||||
// returns TRUE if we're in a modal loop
|
// returns TRUE if we're in a modal loop
|
||||||
bool IsModalShowing() const;
|
bool IsModalShowing() const;
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
bool Iconized() const { return IsIconized(); };
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// implementation
|
// implementation
|
||||||
// --------------
|
// --------------
|
||||||
|
|
||||||
|
@@ -123,15 +123,6 @@ public:
|
|||||||
virtual void SetLabelTop( size_t pos, const wxString& label );
|
virtual void SetLabelTop( size_t pos, const wxString& label );
|
||||||
virtual wxString GetLabelTop( size_t pos ) const;
|
virtual wxString GetLabelTop( size_t pos ) const;
|
||||||
|
|
||||||
// compatibility: these functions are deprecated
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
void SetEventHandler(wxEvtHandler *handler) { m_eventHandler = handler; }
|
|
||||||
wxEvtHandler *GetEventHandler() { return m_eventHandler; }
|
|
||||||
|
|
||||||
bool Enabled(int id) const { return IsEnabled(id); }
|
|
||||||
bool Checked(int id) const { return IsChecked(id); }
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
// implementation from now on
|
// implementation from now on
|
||||||
WXHMENU Create();
|
WXHMENU Create();
|
||||||
int FindMenu(const wxString& title);
|
int FindMenu(const wxString& title);
|
||||||
@@ -164,10 +155,6 @@ protected:
|
|||||||
void Init();
|
void Init();
|
||||||
wxWindow *m_invokingWindow;
|
wxWindow *m_invokingWindow;
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
wxEvtHandler *m_eventHandler;
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
wxArrayString m_titles;
|
wxArrayString m_titles;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -26,24 +26,6 @@
|
|||||||
// compatibility settings
|
// compatibility settings
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
// This setting determines the compatibility with 1.68 API:
|
|
||||||
// Level 0: no backward compatibility, all new features
|
|
||||||
// Level 1: some extra methods are defined for compatibility.
|
|
||||||
//
|
|
||||||
// Default is 0.
|
|
||||||
//
|
|
||||||
// Recommended setting: 0 (in fact the compatibility code is now very minimal
|
|
||||||
// so there is little advantage to setting it to 1.
|
|
||||||
#define WXWIN_COMPATIBILITY 0
|
|
||||||
|
|
||||||
// This setting determines the compatibility with 2.0 API: set it to 1 to
|
|
||||||
// enable it
|
|
||||||
//
|
|
||||||
// Default is 0.
|
|
||||||
//
|
|
||||||
// Recommended setting: 0 (please update your code instead!)
|
|
||||||
#define WXWIN_COMPATIBILITY_2 0
|
|
||||||
|
|
||||||
// This setting determines the compatibility with 2.0 API: set it to 1 to
|
// This setting determines the compatibility with 2.0 API: set it to 1 to
|
||||||
// enable it
|
// enable it
|
||||||
//
|
//
|
||||||
|
@@ -115,33 +115,6 @@ public:
|
|||||||
// Accept files for dragging
|
// Accept files for dragging
|
||||||
virtual void DragAcceptFiles(bool accept);
|
virtual void DragAcceptFiles(bool accept);
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
// Set/get scroll attributes
|
|
||||||
virtual void SetScrollRange(int orient, int range, bool refresh = TRUE);
|
|
||||||
virtual void SetScrollPage(int orient, int page, bool refresh = TRUE);
|
|
||||||
virtual int OldGetScrollRange(int orient) const;
|
|
||||||
virtual int GetScrollPage(int orient) const;
|
|
||||||
|
|
||||||
// event handlers
|
|
||||||
// Handle a control command
|
|
||||||
virtual void OnCommand(wxWindowMac& win, wxCommandEvent& event);
|
|
||||||
|
|
||||||
// Override to define new behaviour for default action (e.g. double
|
|
||||||
// clicking on a listbox)
|
|
||||||
virtual void OnDefaultAction(wxControl * WXUNUSED(initiatingItem)) { }
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
#if wxUSE_CARET && WXWIN_COMPATIBILITY
|
|
||||||
// caret manipulation (old MSW only functions, see wxCaret class for the
|
|
||||||
// new API)
|
|
||||||
void CreateCaret(int w, int h);
|
|
||||||
void CreateCaret(const wxBitmap *bitmap);
|
|
||||||
void DestroyCaret();
|
|
||||||
void ShowCaret(bool show);
|
|
||||||
void SetCaretPos(int x, int y);
|
|
||||||
void GetCaretPos(int *x, int *y) const;
|
|
||||||
#endif // wxUSE_CARET
|
|
||||||
|
|
||||||
// Native resource loading (implemented in src/msw/nativdlg.cpp)
|
// Native resource loading (implemented in src/msw/nativdlg.cpp)
|
||||||
// FIXME: should they really be all virtual?
|
// FIXME: should they really be all virtual?
|
||||||
wxWindowMac* GetWindowChild1(wxWindowID id);
|
wxWindowMac* GetWindowChild1(wxWindowID id);
|
||||||
@@ -197,20 +170,9 @@ public:
|
|||||||
// MSW only: TRUE if this control is part of the main control
|
// MSW only: TRUE if this control is part of the main control
|
||||||
virtual bool ContainsHWND(WXHWND WXUNUSED(hWnd)) const { return FALSE; };
|
virtual bool ContainsHWND(WXHWND WXUNUSED(hWnd)) const { return FALSE; };
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
wxObject *GetChild(int number) const;
|
|
||||||
virtual void MSWDeviceToLogical(float *x, float *y) const;
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
// Setup background and foreground colours correctly
|
// Setup background and foreground colours correctly
|
||||||
virtual void SetupColours();
|
virtual void SetupColours();
|
||||||
|
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
void SetShowing(bool show) { (void)Show(show); }
|
|
||||||
bool IsUserEnabled() const { return IsEnabled(); }
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static bool MacGetWindowFromPoint( const wxPoint &point , wxWindowMac** outWin ) ;
|
static bool MacGetWindowFromPoint( const wxPoint &point , wxWindowMac** outWin ) ;
|
||||||
virtual bool MacGetWindowFromPointSub( const wxPoint &point , wxWindowMac** outWin ) ;
|
virtual bool MacGetWindowFromPointSub( const wxPoint &point , wxWindowMac** outWin ) ;
|
||||||
|
@@ -330,16 +330,6 @@ public:
|
|||||||
Insert(0u, itemid, text, help, isCheckable);
|
Insert(0u, itemid, text, help, isCheckable);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
bool Enabled(int itemid) const { return IsEnabled(itemid); }
|
|
||||||
bool Checked(int itemid) const { return IsChecked(itemid); }
|
|
||||||
|
|
||||||
wxMenuItem* FindItemForId(int itemId, wxMenu **itemMenu) const
|
|
||||||
{ return FindItem(itemId, itemMenu); }
|
|
||||||
|
|
||||||
wxList& GetItems() const { return (wxList &)m_items; }
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// virtuals to override in derived classes
|
// virtuals to override in derived classes
|
||||||
// ---------------------------------------
|
// ---------------------------------------
|
||||||
@@ -482,18 +472,6 @@ public:
|
|||||||
// don't want menu bars to accept the focus by tabbing to them
|
// don't want menu bars to accept the focus by tabbing to them
|
||||||
virtual bool AcceptsFocusFromKeyboard() const { return FALSE; }
|
virtual bool AcceptsFocusFromKeyboard() const { return FALSE; }
|
||||||
|
|
||||||
// compatibility only: these functions are deprecated, use the new ones
|
|
||||||
// instead
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
bool Enabled(int itemid) const { return IsEnabled(itemid); }
|
|
||||||
bool Checked(int itemid) const { return IsChecked(itemid); }
|
|
||||||
|
|
||||||
wxMenuItem* FindMenuItemById(int itemid) const
|
|
||||||
{ return FindItem(itemid); }
|
|
||||||
wxMenuItem* FindItemForId(int itemid, wxMenu **menu = NULL) const
|
|
||||||
{ return FindItem(itemid, menu); }
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// the list of all our menus
|
// the list of all our menus
|
||||||
wxMenuList m_menus;
|
wxMenuList m_menus;
|
||||||
|
@@ -54,11 +54,6 @@ public:
|
|||||||
// accessors
|
// accessors
|
||||||
bool Ok() const { return m_isInit; }
|
bool Ok() const { return m_isInit; }
|
||||||
|
|
||||||
// Let's remove this inelegant function
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
void Get(unsigned char *r, unsigned char *g, unsigned char *b) const;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
unsigned char Red() const { return m_red; }
|
unsigned char Red() const { return m_red; }
|
||||||
unsigned char Green() const { return m_green; }
|
unsigned char Green() const { return m_green; }
|
||||||
unsigned char Blue() const { return m_blue; }
|
unsigned char Blue() const { return m_blue; }
|
||||||
|
@@ -89,16 +89,6 @@ public:
|
|||||||
// Accept files for dragging
|
// Accept files for dragging
|
||||||
virtual void DragAcceptFiles(bool accept);
|
virtual void DragAcceptFiles(bool accept);
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
// event handlers
|
|
||||||
// Handle a control command
|
|
||||||
virtual void OnCommand(wxWindow& win, wxCommandEvent& event);
|
|
||||||
|
|
||||||
// Override to define new behaviour for default action (e.g. double
|
|
||||||
// clicking on a listbox)
|
|
||||||
virtual void OnDefaultAction(wxControl * WXUNUSED(initiatingItem)) { }
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
virtual WXWidget GetHandle() const { return m_wnd; }
|
virtual WXWidget GetHandle() const { return m_wnd; }
|
||||||
|
|
||||||
void SetMGLwindow_t(struct window_t *wnd);
|
void SetMGLwindow_t(struct window_t *wnd);
|
||||||
|
@@ -26,19 +26,6 @@ class WXDLLEXPORT wxDialog : public wxDialogBase
|
|||||||
public:
|
public:
|
||||||
wxDialog();
|
wxDialog();
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
// Constructor with a modal flag, but no window id - the old convention
|
|
||||||
wxDialog(wxWindow *parent,
|
|
||||||
const wxString& title, bool modal,
|
|
||||||
int x = -1, int y= -1, int width = 500, int height = 500,
|
|
||||||
long style = wxDEFAULT_DIALOG_STYLE,
|
|
||||||
const wxString& name = wxDialogNameStr)
|
|
||||||
{
|
|
||||||
long modalStyle = modal ? wxDIALOG_MODAL : wxDIALOG_MODELESS ;
|
|
||||||
Create(parent, -1, title, wxPoint(x, y), wxSize(width, height), style|modalStyle, name);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Constructor with no modal flag - the new convention.
|
// Constructor with no modal flag - the new convention.
|
||||||
wxDialog(wxWindow *parent, wxWindowID id,
|
wxDialog(wxWindow *parent, wxWindowID id,
|
||||||
const wxString& title,
|
const wxString& title,
|
||||||
|
@@ -162,17 +162,6 @@ public:
|
|||||||
wxDEPRECATED( void SetQuality(int quality) );
|
wxDEPRECATED( void SetQuality(int quality) );
|
||||||
#endif // WXWIN_COMPATIBILITY_2_4
|
#endif // WXWIN_COMPATIBILITY_2_4
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
void SetOk(bool isOk);
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
#if wxUSE_PALETTE
|
|
||||||
wxPalette *GetColourMap() const { return GetPalette(); }
|
|
||||||
void SetColourMap(wxPalette *cmap) { SetPalette(*cmap); };
|
|
||||||
#endif // wxUSE_PALETTE
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
// implementation only from now on
|
// implementation only from now on
|
||||||
// -------------------------------
|
// -------------------------------
|
||||||
|
|
||||||
|
@@ -47,10 +47,6 @@ public:
|
|||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxButtonNameStr);
|
const wxString& name = wxButtonNameStr);
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
wxBitmap *GetBitmap() const { return (wxBitmap *) &GetBitmapLabel(); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Implementation
|
// Implementation
|
||||||
virtual void SetDefault();
|
virtual void SetDefault();
|
||||||
virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
|
virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
|
||||||
|
@@ -58,11 +58,6 @@ public:
|
|||||||
// accessors
|
// accessors
|
||||||
bool Ok() const {return m_isInit; }
|
bool Ok() const {return m_isInit; }
|
||||||
|
|
||||||
// Let's remove this inelegant function
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
void Get(unsigned char *r, unsigned char *g, unsigned char *b) const;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
unsigned char Red() const { return m_red; }
|
unsigned char Red() const { return m_red; }
|
||||||
unsigned char Green() const { return m_green; }
|
unsigned char Green() const { return m_green; }
|
||||||
unsigned char Blue() const { return m_blue; }
|
unsigned char Blue() const { return m_blue; }
|
||||||
|
@@ -65,16 +65,6 @@ public:
|
|||||||
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
||||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
virtual void SetButtonColour(const wxColour& WXUNUSED(col)) { }
|
|
||||||
wxColour* GetButtonColour() const { return NULL; }
|
|
||||||
|
|
||||||
virtual void SetLabelFont(const wxFont& font);
|
|
||||||
virtual void SetButtonFont(const wxFont& font);
|
|
||||||
wxFont& GetLabelFont() const;
|
|
||||||
wxFont& GetButtonFont() const;
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// choose the default border for this window
|
// choose the default border for this window
|
||||||
virtual wxBorder GetDefaultBorder() const;
|
virtual wxBorder GetDefaultBorder() const;
|
||||||
@@ -123,13 +113,5 @@ private:
|
|||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
inline wxFont& wxControl::GetLabelFont() const { return (wxFont &)GetFont(); }
|
|
||||||
inline wxFont& wxControl::GetButtonFont() const { return (wxFont &)GetFont(); }
|
|
||||||
inline void wxControl::SetLabelFont(const wxFont& font) { SetFont(font); }
|
|
||||||
inline void wxControl::SetButtonFont(const wxFont& font) { SetFont(font); }
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// _WX_CONTROL_H_
|
// _WX_CONTROL_H_
|
||||||
|
@@ -63,11 +63,6 @@ public:
|
|||||||
// overriden base class virtuals
|
// overriden base class virtuals
|
||||||
virtual bool AcceptsFocus() const { return FALSE; }
|
virtual bool AcceptsFocus() const { return FALSE; }
|
||||||
|
|
||||||
// Backward compatibility
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
void SetButtonColour(const wxColour& col) { SetForegroundColour(col); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
|
virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@@ -42,10 +42,6 @@ public:
|
|||||||
m_width = m_height = m_depth = 0;
|
m_width = m_height = m_depth = 0;
|
||||||
|
|
||||||
m_handle = 0;
|
m_handle = 0;
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
m_ok = FALSE;
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// accessors
|
// accessors
|
||||||
@@ -72,14 +68,6 @@ public:
|
|||||||
WXHICON m_hIcon;
|
WXHICON m_hIcon;
|
||||||
WXHCURSOR m_hCursor;
|
WXHCURSOR m_hCursor;
|
||||||
};
|
};
|
||||||
|
|
||||||
// this filed is redundant and using it is error prone but keep it for
|
|
||||||
// backwards compatibility
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
void SetOk() { m_ok = m_handle != 0; }
|
|
||||||
|
|
||||||
bool m_ok;
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -145,15 +145,6 @@ public:
|
|||||||
virtual void SetLabelTop( size_t pos, const wxString& label );
|
virtual void SetLabelTop( size_t pos, const wxString& label );
|
||||||
virtual wxString GetLabelTop( size_t pos ) const;
|
virtual wxString GetLabelTop( size_t pos ) const;
|
||||||
|
|
||||||
// compatibility: these functions are deprecated
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
void SetEventHandler(wxEvtHandler *handler) { m_eventHandler = handler; }
|
|
||||||
wxEvtHandler *GetEventHandler() { return m_eventHandler; }
|
|
||||||
|
|
||||||
bool Enabled(int id) const { return IsEnabled(id); }
|
|
||||||
bool Checked(int id) const { return IsChecked(id); }
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
// implementation from now on
|
// implementation from now on
|
||||||
WXHMENU Create();
|
WXHMENU Create();
|
||||||
virtual void Detach();
|
virtual void Detach();
|
||||||
@@ -188,10 +179,6 @@ protected:
|
|||||||
// common part of all ctors
|
// common part of all ctors
|
||||||
void Init();
|
void Init();
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
wxEvtHandler *m_eventHandler;
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
wxArrayString m_titles;
|
wxArrayString m_titles;
|
||||||
|
|
||||||
WXHMENU m_hMenu;
|
WXHMENU m_hMenu;
|
||||||
|
@@ -48,37 +48,17 @@ public:
|
|||||||
virtual void SetScrollbar(int position, int thumbSize, int range, int pageSize,
|
virtual void SetScrollbar(int position, int thumbSize, int range, int pageSize,
|
||||||
bool refresh = TRUE);
|
bool refresh = TRUE);
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
// Backward compatibility
|
|
||||||
int GetValue() const { return GetThumbPosition(); }
|
|
||||||
void SetValue(int viewStart) { SetThumbPosition(viewStart); }
|
|
||||||
void GetValues(int *viewStart, int *viewLength, int *objectLength,
|
|
||||||
int *pageLength) const ;
|
|
||||||
int GetViewLength() const { return m_viewSize; }
|
|
||||||
int GetObjectLength() const { return m_objectSize; }
|
|
||||||
|
|
||||||
void SetPageSize(int pageLength);
|
|
||||||
void SetObjectLength(int objectLength);
|
|
||||||
void SetViewLength(int viewLength);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void Command(wxCommandEvent& event);
|
void Command(wxCommandEvent& event);
|
||||||
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
||||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||||
virtual bool MSWOnScroll(int orientation, WXWORD wParam,
|
virtual bool MSWOnScroll(int orientation, WXWORD wParam,
|
||||||
WXWORD pos, WXHWND control);
|
WXWORD pos, WXHWND control);
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
// Backward compatibility: generate an old-style scroll command
|
|
||||||
void OnScroll(wxScrollEvent& event);
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int m_pageSize;
|
int m_pageSize;
|
||||||
int m_viewSize;
|
int m_viewSize;
|
||||||
int m_objectSize;
|
int m_objectSize;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxScrollBar)
|
DECLARE_DYNAMIC_CLASS_NO_COPY(wxScrollBar)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -26,24 +26,6 @@
|
|||||||
// compatibility settings
|
// compatibility settings
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
// This setting determines the compatibility with 1.68 API:
|
|
||||||
// Level 0: no backward compatibility, all new features
|
|
||||||
// Level 1: some extra methods are defined for compatibility.
|
|
||||||
//
|
|
||||||
// Default is 0.
|
|
||||||
//
|
|
||||||
// Recommended setting: 0 (in fact the compatibility code is now very minimal
|
|
||||||
// so there is little advantage to setting it to 1.
|
|
||||||
#define WXWIN_COMPATIBILITY 0
|
|
||||||
|
|
||||||
// This setting determines the compatibility with 2.0 API: set it to 1 to
|
|
||||||
// enable it
|
|
||||||
//
|
|
||||||
// Default is 0.
|
|
||||||
//
|
|
||||||
// Recommended setting: 0 (please update your code instead!)
|
|
||||||
#define WXWIN_COMPATIBILITY_2 0
|
|
||||||
|
|
||||||
// This setting determines the compatibility with 2.2 API: set it to 1 to
|
// This setting determines the compatibility with 2.2 API: set it to 1 to
|
||||||
// enable it but please consider updating your code instead.
|
// enable it but please consider updating your code instead.
|
||||||
//
|
//
|
||||||
|
@@ -28,24 +28,6 @@
|
|||||||
// compatibility settings
|
// compatibility settings
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
// This setting determines the compatibility with 1.68 API:
|
|
||||||
// Level 0: no backward compatibility, all new features
|
|
||||||
// Level 1: some extra methods are defined for compatibility.
|
|
||||||
//
|
|
||||||
// Default is 0.
|
|
||||||
//
|
|
||||||
// Recommended setting: 0 (in fact the compatibility code is now very minimal
|
|
||||||
// so there is little advantage to setting it to 1.
|
|
||||||
#define WXWIN_COMPATIBILITY 0
|
|
||||||
|
|
||||||
// This setting determines the compatibility with 2.0 API: set it to 1 to
|
|
||||||
// enable it
|
|
||||||
//
|
|
||||||
// Default is 0.
|
|
||||||
//
|
|
||||||
// Recommended setting: 0 (please update your code instead!)
|
|
||||||
#define WXWIN_COMPATIBILITY_2 0
|
|
||||||
|
|
||||||
// This setting determines the compatibility with 2.0 API: set it to 1 to
|
// This setting determines the compatibility with 2.0 API: set it to 1 to
|
||||||
// enable it
|
// enable it
|
||||||
//
|
//
|
||||||
|
@@ -26,24 +26,6 @@
|
|||||||
// compatibility settings
|
// compatibility settings
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
// This setting determines the compatibility with 1.68 API:
|
|
||||||
// Level 0: no backward compatibility, all new features
|
|
||||||
// Level 1: some extra methods are defined for compatibility.
|
|
||||||
//
|
|
||||||
// Default is 0.
|
|
||||||
//
|
|
||||||
// Recommended setting: 0 (in fact the compatibility code is now very minimal
|
|
||||||
// so there is little advantage to setting it to 1.
|
|
||||||
#define WXWIN_COMPATIBILITY 0
|
|
||||||
|
|
||||||
// This setting determines the compatibility with 2.0 API: set it to 1 to
|
|
||||||
// enable it
|
|
||||||
//
|
|
||||||
// Default is 0.
|
|
||||||
//
|
|
||||||
// Recommended setting: 0 (please update your code instead!)
|
|
||||||
#define WXWIN_COMPATIBILITY_2 0
|
|
||||||
|
|
||||||
// This setting determines the compatibility with 2.2 API: set it to 1 to
|
// This setting determines the compatibility with 2.2 API: set it to 1 to
|
||||||
// enable it but please consider updating your code instead.
|
// enable it but please consider updating your code instead.
|
||||||
//
|
//
|
||||||
|
@@ -140,33 +140,6 @@ public:
|
|||||||
wxDEPRECATED( void SetTransparent(bool t = TRUE) );
|
wxDEPRECATED( void SetTransparent(bool t = TRUE) );
|
||||||
#endif // WXWIN_COMPATIBILITY_2_4
|
#endif // WXWIN_COMPATIBILITY_2_4
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
// Set/get scroll attributes
|
|
||||||
virtual void SetScrollRange(int orient, int range, bool refresh = TRUE);
|
|
||||||
virtual void SetScrollPage(int orient, int page, bool refresh = TRUE);
|
|
||||||
virtual int OldGetScrollRange(int orient) const;
|
|
||||||
virtual int GetScrollPage(int orient) const;
|
|
||||||
|
|
||||||
// event handlers
|
|
||||||
// Handle a control command
|
|
||||||
virtual void OnCommand(wxWindow& win, wxCommandEvent& event);
|
|
||||||
|
|
||||||
// Override to define new behaviour for default action (e.g. double
|
|
||||||
// clicking on a listbox)
|
|
||||||
virtual void OnDefaultAction(wxControl * WXUNUSED(initiatingItem)) { }
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
#if wxUSE_CARET && WXWIN_COMPATIBILITY
|
|
||||||
// caret manipulation (old MSW only functions, see wxCaret class for the
|
|
||||||
// new API)
|
|
||||||
void CreateCaret(int w, int h);
|
|
||||||
void CreateCaret(const wxBitmap *bitmap);
|
|
||||||
void DestroyCaret();
|
|
||||||
void ShowCaret(bool show);
|
|
||||||
void SetCaretPos(int x, int y);
|
|
||||||
void GetCaretPos(int *x, int *y) const;
|
|
||||||
#endif // wxUSE_CARET
|
|
||||||
|
|
||||||
#ifndef __WXUNIVERSAL__
|
#ifndef __WXUNIVERSAL__
|
||||||
// Native resource loading (implemented in src/msw/nativdlg.cpp)
|
// Native resource loading (implemented in src/msw/nativdlg.cpp)
|
||||||
// FIXME: should they really be all virtual?
|
// FIXME: should they really be all virtual?
|
||||||
@@ -260,11 +233,6 @@ public:
|
|||||||
|
|
||||||
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
wxObject *GetChild(int number) const;
|
|
||||||
virtual void MSWDeviceToLogical(float *x, float *y) const;
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
#ifndef __WXUNIVERSAL__
|
#ifndef __WXUNIVERSAL__
|
||||||
// Create an appropriate wxWindow from a HWND
|
// Create an appropriate wxWindow from a HWND
|
||||||
virtual wxWindow* CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd);
|
virtual wxWindow* CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd);
|
||||||
@@ -408,11 +376,6 @@ public:
|
|||||||
WXWPARAM wParam,
|
WXWPARAM wParam,
|
||||||
WXLPARAM lParam);
|
WXLPARAM lParam);
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
void SetShowing(bool show) { (void)Show(show); }
|
|
||||||
bool IsUserEnabled() const { return IsEnabled(); }
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
// Responds to colour changes: passes event on to children.
|
// Responds to colour changes: passes event on to children.
|
||||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
||||||
|
|
||||||
|
@@ -194,19 +194,6 @@ public:
|
|||||||
inline bool operator!=(const wxBitmap& rBitmap) const
|
inline bool operator!=(const wxBitmap& rBitmap) const
|
||||||
{ return m_refData != rBitmap.m_refData; }
|
{ return m_refData != rBitmap.m_refData; }
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
void SetOk(bool bIsOk);
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
inline wxPalette* GetColourMap() const
|
|
||||||
{ return GetPalette(); }
|
|
||||||
|
|
||||||
inline void SetColourMap(wxPalette* pCmap)
|
|
||||||
{ SetPalette(*pCmap); };
|
|
||||||
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
// Implementation
|
// Implementation
|
||||||
public:
|
public:
|
||||||
inline void SetHBITMAP(WXHBITMAP hBmp)
|
inline void SetHBITMAP(WXHBITMAP hBmp)
|
||||||
|
@@ -62,13 +62,6 @@ public:
|
|||||||
SetBitmapLabel(rBitmap);
|
SetBitmapLabel(rBitmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
wxBitmap* GetBitmap(void) const
|
|
||||||
{
|
|
||||||
return (wxBitmap *)&m_buttonBitmap;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Implementation
|
// Implementation
|
||||||
//
|
//
|
||||||
|
@@ -83,16 +83,6 @@ public:
|
|||||||
//
|
//
|
||||||
bool Ok(void) const {return m_bIsInit; }
|
bool Ok(void) const {return m_bIsInit; }
|
||||||
|
|
||||||
//
|
|
||||||
// Let's remove this inelegant function
|
|
||||||
//
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
void Get( unsigned char* pRed
|
|
||||||
,unsigned char* pGreen
|
|
||||||
,unsigned char* pBlue
|
|
||||||
) const;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
unsigned char Red(void) const { return m_cRed; }
|
unsigned char Red(void) const { return m_cRed; }
|
||||||
unsigned char Green(void) const { return m_cGreen; }
|
unsigned char Green(void) const { return m_cGreen; }
|
||||||
unsigned char Blue(void) const { return m_cBlue; }
|
unsigned char Blue(void) const { return m_cBlue; }
|
||||||
|
@@ -81,16 +81,6 @@ public:
|
|||||||
,WXLPARAM lParam
|
,WXLPARAM lParam
|
||||||
);
|
);
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
virtual void SetButtonColour(const wxColour& WXUNUSED(rCol)) { }
|
|
||||||
wxColour* GetButtonColour(void) const { return NULL; }
|
|
||||||
|
|
||||||
inline virtual void SetLabelFont(const wxFont& rFont);
|
|
||||||
inline virtual void SetButtonFont(const wxFont& rFont);
|
|
||||||
inline wxFont& GetLabelFont(void) const;
|
|
||||||
inline wxFont& GetButtonFont(void) const;
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
//
|
//
|
||||||
// For controls like radiobuttons which are really composite
|
// For controls like radiobuttons which are really composite
|
||||||
@@ -138,12 +128,5 @@ private:
|
|||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
}; // end of wxControl
|
}; // end of wxControl
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
inline wxFont& wxControl::GetLabelFont(void) const { return GetFont(); }
|
|
||||||
inline wxFont& wxControl::GetButtonFont(void) const { return GetFont(); }
|
|
||||||
inline void wxControl::SetLabelFont(const wxFont& rFont) { SetFont(rFont); }
|
|
||||||
inline void wxControl::SetButtonFont(const wxFont& rFont) { SetFont(rFont); }
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
#endif // _WX_CONTROL_H_
|
#endif // _WX_CONTROL_H_
|
||||||
|
|
||||||
|
@@ -40,10 +40,6 @@ public:
|
|||||||
m_nWidth = m_nHeight = m_nDepth = 0;
|
m_nWidth = m_nHeight = m_nDepth = 0;
|
||||||
|
|
||||||
m_hHandle = 0;
|
m_hHandle = 0;
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
m_bOk = FALSE;
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// accessors
|
// accessors
|
||||||
@@ -80,13 +76,6 @@ public:
|
|||||||
WXHCURSOR m_hCursor;
|
WXHCURSOR m_hCursor;
|
||||||
};
|
};
|
||||||
|
|
||||||
// this filed is redundant and using it is error prone but keep it for
|
|
||||||
// backwards compatibility
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
void SetOk() { m_bOk = m_hHandle != 0; }
|
|
||||||
|
|
||||||
bool m_bOk;
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
UINT m_uId;
|
UINT m_uId;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -230,16 +230,6 @@ public:
|
|||||||
);
|
);
|
||||||
virtual wxString GetLabelTop(size_t nPos) const;
|
virtual wxString GetLabelTop(size_t nPos) const;
|
||||||
|
|
||||||
//
|
|
||||||
// Compatibility: these functions are deprecated
|
|
||||||
//
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
void SetEventHandler(wxEvtHandler* pHandler) { m_pEventHandler = pHandler; }
|
|
||||||
wxEvtHandler* GetEventHandler(void) { return m_pEventHandler; }
|
|
||||||
bool Enabled(int nId) const { return IsEnabled(nId); }
|
|
||||||
bool Checked(int nId) const { return IsChecked(nId); }
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Implementation from now on
|
// Implementation from now on
|
||||||
//
|
//
|
||||||
@@ -275,10 +265,6 @@ protected:
|
|||||||
//
|
//
|
||||||
void Init(void);
|
void Init(void);
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
wxEvtHandler* m_pEventHandler;
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
wxArrayString m_titles;
|
wxArrayString m_titles;
|
||||||
|
|
||||||
WXHMENU m_hMenu;
|
WXHMENU m_hMenu;
|
||||||
|
@@ -152,47 +152,6 @@ public:
|
|||||||
// Accept files for dragging
|
// Accept files for dragging
|
||||||
virtual void DragAcceptFiles(bool bAccept);
|
virtual void DragAcceptFiles(bool bAccept);
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
// Set/get scroll attributes
|
|
||||||
virtual void SetScrollRange( int nOrient
|
|
||||||
,int nRange
|
|
||||||
,bool bRefresh = TRUE
|
|
||||||
);
|
|
||||||
virtual void SetScrollPage( int nOrient
|
|
||||||
,int nPage
|
|
||||||
,bool bRefresh = TRUE
|
|
||||||
);
|
|
||||||
virtual int OldGetScrollRange(int nOrient) const;
|
|
||||||
virtual int GetScrollPage(int nOrient) const;
|
|
||||||
|
|
||||||
//
|
|
||||||
// event handlers
|
|
||||||
//
|
|
||||||
// Handle a control command
|
|
||||||
virtual void OnCommand( wxWindow& rWin
|
|
||||||
,wxCommandEvent& rEvent
|
|
||||||
);
|
|
||||||
|
|
||||||
// Override to define new behaviour for default action (e.g. double
|
|
||||||
// clicking on a listbox)
|
|
||||||
virtual void OnDefaultAction(wxControl* WXUNUSED(pInitiatingItem)) { }
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
#if wxUSE_CARET && WXWIN_COMPATIBILITY
|
|
||||||
void CreateCaret( int nWidth
|
|
||||||
,int nHeight
|
|
||||||
);
|
|
||||||
void CreateCaret(const wxBitmap* pBitmap);
|
|
||||||
void DestroyCaret(void);
|
|
||||||
void ShowCaret(bool bShow);
|
|
||||||
void SetCaretPos( int nX
|
|
||||||
,int nY
|
|
||||||
);
|
|
||||||
void GetCaretPos( int* pX
|
|
||||||
,int* pY
|
|
||||||
) const;
|
|
||||||
#endif // wxUSE_CARET
|
|
||||||
|
|
||||||
#ifndef __WXUNIVERSAL__
|
#ifndef __WXUNIVERSAL__
|
||||||
// Native resource loading (implemented in src/os2/nativdlg.cpp)
|
// Native resource loading (implemented in src/os2/nativdlg.cpp)
|
||||||
// FIXME: should they really be all virtual?
|
// FIXME: should they really be all virtual?
|
||||||
@@ -293,13 +252,6 @@ public:
|
|||||||
,WXWORD nId
|
,WXWORD nId
|
||||||
);
|
);
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
wxObject* GetChild(int nNumber) const;
|
|
||||||
virtual void OS2DeviceToLogical( float* pfX
|
|
||||||
,float* pfY
|
|
||||||
) const;
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
#ifndef __WXUNIVERSAL__
|
#ifndef __WXUNIVERSAL__
|
||||||
// Create an appropriate wxWindow from a HWND
|
// Create an appropriate wxWindow from a HWND
|
||||||
virtual wxWindow* CreateWindowFromHWND( wxWindow* pParent
|
virtual wxWindow* CreateWindowFromHWND( wxWindow* pParent
|
||||||
@@ -469,11 +421,6 @@ public:
|
|||||||
,WXLPARAM lParam
|
,WXLPARAM lParam
|
||||||
);
|
);
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
void SetShowing(bool bShow) { (void)Show(show); }
|
|
||||||
bool IsUserEnabled(void) const { return IsEnabled(); }
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
// Responds to colour changes: passes event on to children.
|
// Responds to colour changes: passes event on to children.
|
||||||
void OnSysColourChanged(wxSysColourChangedEvent& rEvent);
|
void OnSysColourChanged(wxSysColourChangedEvent& rEvent);
|
||||||
|
|
||||||
|
@@ -120,11 +120,6 @@ public:
|
|||||||
const wxString& wildcard = wxEmptyString,
|
const wxString& wildcard = wxEmptyString,
|
||||||
bool details = FALSE);
|
bool details = FALSE);
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
// deprecated
|
|
||||||
wxList *GetList(const wxString& wildcard, bool details = FALSE);
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// this executes a simple ftp command with the given argument and returns
|
// this executes a simple ftp command with the given argument and returns
|
||||||
// TRUE if it its return code starts with '2'
|
// TRUE if it its return code starts with '2'
|
||||||
|
@@ -95,11 +95,6 @@ enum wxSocketType
|
|||||||
typedef int wxSocketFlags;
|
typedef int wxSocketFlags;
|
||||||
|
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
typedef wxSocketType wxSockType;
|
|
||||||
typedef wxSocketFlags wxSockFlags;
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
// wxSocketBase
|
// wxSocketBase
|
||||||
@@ -109,29 +104,6 @@ class WXDLLIMPEXP_NET wxSocketBase : public wxObject
|
|||||||
{
|
{
|
||||||
DECLARE_CLASS(wxSocketBase)
|
DECLARE_CLASS(wxSocketBase)
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
NONE = wxSOCKET_NONE,
|
|
||||||
NOWAIT = wxSOCKET_NOWAIT,
|
|
||||||
WAITALL = wxSOCKET_WAITALL,
|
|
||||||
SPEED = wxSOCKET_BLOCK
|
|
||||||
};
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
SOCK_UNINIT = wxSOCKET_UNINIT,
|
|
||||||
SOCK_CLIENT = wxSOCKET_CLIENT,
|
|
||||||
SOCK_SERVER = wxSOCKET_SERVER,
|
|
||||||
SOCK_INTERNAL = wxSOCKET_BASE,
|
|
||||||
SOCK_DATAGRAM = wxSOCKET_DATAGRAM
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef void (*wxSockCbk)(wxSocketBase& sock, wxSocketNotify evt, char *cdata);
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Public interface
|
// Public interface
|
||||||
@@ -191,12 +163,6 @@ public:
|
|||||||
static bool Initialize();
|
static bool Initialize();
|
||||||
static void Shutdown();
|
static void Shutdown();
|
||||||
|
|
||||||
// callbacks are deprecated, use events instead
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
wxSockCbk Callback(wxSockCbk cbk_);
|
|
||||||
char *CallbackData(char *data);
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
|
|
||||||
// Implementation from now on
|
// Implementation from now on
|
||||||
// --------------------------
|
// --------------------------
|
||||||
@@ -256,12 +222,6 @@ private:
|
|||||||
// the initialization count, GSocket is initialized if > 0
|
// the initialization count, GSocket is initialized if > 0
|
||||||
static size_t m_countInit;
|
static size_t m_countInit;
|
||||||
|
|
||||||
// callbacks are deprecated, use events instead
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
wxSockCbk m_cbk; // callback
|
|
||||||
char *m_cdata; // callback data
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
DECLARE_NO_COPY_CLASS(wxSocketBase)
|
DECLARE_NO_COPY_CLASS(wxSocketBase)
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -349,12 +309,6 @@ public:
|
|||||||
wxSocketBase *GetSocket() const { return (wxSocketBase *) GetEventObject(); }
|
wxSocketBase *GetSocket() const { return (wxSocketBase *) GetEventObject(); }
|
||||||
void *GetClientData() const { return m_clientData; }
|
void *GetClientData() const { return m_clientData; }
|
||||||
|
|
||||||
// backwards compatibility
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
wxSocketNotify SocketEvent() const { return m_event; }
|
|
||||||
wxSocketBase *Socket() const { return (wxSocketBase *) GetEventObject(); }
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
|
|
||||||
virtual wxEvent *Clone() const { return new wxSocketEvent(*this); }
|
virtual wxEvent *Clone() const { return new wxSocketEvent(*this); }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@@ -506,17 +506,6 @@ public:
|
|||||||
// more deprecated functions
|
// more deprecated functions
|
||||||
// -------------------------
|
// -------------------------
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
void SetDefaultSize(int w, int h) { SetDefaultSize(wxSize(w, h)); }
|
|
||||||
long GetDefaultWidth() const { return m_defaultWidth; }
|
|
||||||
long GetDefaultHeight() const { return m_defaultHeight; }
|
|
||||||
int GetDefaultButtonWidth() const { return (int) GetDefaultButtonSize().x; };
|
|
||||||
int GetDefaultButtonHeight() const { return (int) GetDefaultButtonSize().y; };
|
|
||||||
virtual void SetDefaultSize(const wxSize& size) { SetToolBitmapSize(size); }
|
|
||||||
virtual wxSize GetDefaultSize() const { return GetToolBitmapSize(); }
|
|
||||||
virtual wxSize GetDefaultButtonSize() const { return GetToolSize(); }
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
// use GetToolMargins() instead
|
// use GetToolMargins() instead
|
||||||
wxSize GetMargins() const { return GetToolMargins(); }
|
wxSize GetMargins() const { return GetToolMargins(); }
|
||||||
|
|
||||||
|
@@ -337,11 +337,6 @@ public:
|
|||||||
// do the window-specific processing after processing the update event
|
// do the window-specific processing after processing the update event
|
||||||
virtual void DoUpdateWindowUI(wxUpdateUIEvent& event) ;
|
virtual void DoUpdateWindowUI(wxUpdateUIEvent& event) ;
|
||||||
|
|
||||||
// obsolete functions
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
bool Modified() const { return IsModified(); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// the name of the last file loaded with LoadFile() which will be used by
|
// the name of the last file loaded with LoadFile() which will be used by
|
||||||
// SaveFile() by default
|
// SaveFile() by default
|
||||||
|
@@ -90,12 +90,6 @@ public:
|
|||||||
// return TRUE if the timer is one shot
|
// return TRUE if the timer is one shot
|
||||||
bool IsOneShot() const { return m_oneShot; }
|
bool IsOneShot() const { return m_oneShot; }
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
// deprecated functions
|
|
||||||
int Interval() const { return GetInterval(); };
|
|
||||||
bool OneShot() const { return IsOneShot(); }
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// common part of all ctors
|
// common part of all ctors
|
||||||
void Init() { m_oneShot = FALSE; m_milli = 0; }
|
void Init() { m_oneShot = FALSE; m_milli = 0; }
|
||||||
|
@@ -113,11 +113,6 @@ public:
|
|||||||
// operation is successful.)
|
// operation is successful.)
|
||||||
virtual bool SetShape(const wxRegion& WXUNUSED(region)) { return FALSE; }
|
virtual bool SetShape(const wxRegion& WXUNUSED(region)) { return FALSE; }
|
||||||
|
|
||||||
// old functions, use the new ones instead!
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
bool Iconized() const { return IsIconized(); }
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
|
|
||||||
// implementation only from now on
|
// implementation only from now on
|
||||||
// -------------------------------
|
// -------------------------------
|
||||||
|
|
||||||
|
@@ -26,24 +26,6 @@
|
|||||||
// compatibility settings
|
// compatibility settings
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
// This setting determines the compatibility with 1.68 API:
|
|
||||||
// Level 0: no backward compatibility, all new features
|
|
||||||
// Level 1: some extra methods are defined for compatibility.
|
|
||||||
//
|
|
||||||
// Default is 0.
|
|
||||||
//
|
|
||||||
// Recommended setting: 0 (in fact the compatibility code is now very minimal
|
|
||||||
// so there is little advantage to setting it to 1.
|
|
||||||
#define WXWIN_COMPATIBILITY 0
|
|
||||||
|
|
||||||
// This setting determines the compatibility with 2.0 API: set it to 1 to
|
|
||||||
// enable it
|
|
||||||
//
|
|
||||||
// Default is 0.
|
|
||||||
//
|
|
||||||
// Recommended setting: 0 (please update your code instead!)
|
|
||||||
#define WXWIN_COMPATIBILITY_2 0
|
|
||||||
|
|
||||||
// This setting determines the compatibility with 2.0 API: set it to 1 to
|
// This setting determines the compatibility with 2.0 API: set it to 1 to
|
||||||
// enable it
|
// enable it
|
||||||
//
|
//
|
||||||
|
@@ -63,11 +63,6 @@ class WXDLLIMPEXP_BASE wxPoint;
|
|||||||
WXDLLIMPEXP_BASE wxChar* copystring(const wxChar *s);
|
WXDLLIMPEXP_BASE wxChar* copystring(const wxChar *s);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
// Matches string one within string two regardless of case
|
|
||||||
WXDLLIMPEXP_BASE bool StringMatch(const wxChar *one, const wxChar *two, bool subString = TRUE, bool exact = FALSE);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// A shorter way of using strcmp
|
// A shorter way of using strcmp
|
||||||
#define wxStringEq(s1, s2) (s1 && s2 && (wxStrcmp(s1, s2) == 0))
|
#define wxStringEq(s1, s2) (s1 && s2 && (wxStrcmp(s1, s2) == 0))
|
||||||
|
|
||||||
@@ -106,15 +101,9 @@ WXDLLEXPORT bool wxSetDetectableAutoRepeat( bool flag );
|
|||||||
|
|
||||||
// Generate a unique ID
|
// Generate a unique ID
|
||||||
WXDLLEXPORT long wxNewId();
|
WXDLLEXPORT long wxNewId();
|
||||||
#if !defined(NewId) && defined(WXWIN_COMPATIBILITY)
|
|
||||||
#define NewId wxNewId
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Ensure subsequent IDs don't clash with this one
|
// Ensure subsequent IDs don't clash with this one
|
||||||
WXDLLEXPORT void wxRegisterId(long id);
|
WXDLLEXPORT void wxRegisterId(long id);
|
||||||
#if !defined(RegisterId) && defined(WXWIN_COMPATIBILITY)
|
|
||||||
#define RegisterId wxRegisterId
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Return the current ID
|
// Return the current ID
|
||||||
WXDLLEXPORT long wxGetCurrentId();
|
WXDLLEXPORT long wxGetCurrentId();
|
||||||
|
@@ -862,17 +862,6 @@ public:
|
|||||||
wxAccessible* GetOrCreateAccessible() ;
|
wxAccessible* GetOrCreateAccessible() ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// backward compatibility
|
|
||||||
// ----------------------
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
bool Enabled() const { return IsEnabled(); }
|
|
||||||
|
|
||||||
void SetButtonFont(const wxFont& font) { SetFont(font); }
|
|
||||||
void SetLabelFont(const wxFont& font) { SetFont(font); }
|
|
||||||
wxFont& GetLabelFont() { return GetFont(); };
|
|
||||||
wxFont& GetButtonFont() { return GetFont(); };
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
// implementation
|
// implementation
|
||||||
// --------------
|
// --------------
|
||||||
|
|
||||||
|
@@ -786,10 +786,6 @@
|
|||||||
* Use Apple Ieee-double converter
|
* Use Apple Ieee-double converter
|
||||||
*/
|
*/
|
||||||
#define wxUSE_APPLE_IEEE 0
|
#define wxUSE_APPLE_IEEE 0
|
||||||
/*
|
|
||||||
* Compatibility with 2.0 API.
|
|
||||||
*/
|
|
||||||
#define WXWIN_COMPATIBILITY_2 0
|
|
||||||
/*
|
/*
|
||||||
* Compatibility with 2.2 API
|
* Compatibility with 2.2 API
|
||||||
*/
|
*/
|
||||||
|
@@ -68,16 +68,6 @@ wxSize wxControl::DoGetBestSize() const
|
|||||||
|
|
||||||
bool wxControl::ProcessCommand(wxCommandEvent& event)
|
bool wxControl::ProcessCommand(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
if ( m_callback )
|
|
||||||
{
|
|
||||||
(void)(*m_callback)(*this, event);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
return GetEventHandler()->ProcessEvent(event);
|
return GetEventHandler()->ProcessEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -304,16 +304,6 @@ int wxNewEventType()
|
|||||||
// MT-FIXME
|
// MT-FIXME
|
||||||
static int s_lastUsedEventType = wxEVT_FIRST;
|
static int s_lastUsedEventType = wxEVT_FIRST;
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
// check that we don't overlap with the user-defined types: if it does
|
|
||||||
// happen, the best solution is probably to update the existing code to
|
|
||||||
// use wxNewEventType() instead of wxEVT_USER_FIRST
|
|
||||||
//
|
|
||||||
// due to the uncertainty
|
|
||||||
wxASSERT_MSG( s_lastUsedEventType < wxEVT_USER_FIRST - 1,
|
|
||||||
_T("possible event type conflict") );
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
|
|
||||||
return s_lastUsedEventType++;
|
return s_lastUsedEventType++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1321,17 +1311,6 @@ void *wxEvtHandler::DoGetClientData() const
|
|||||||
return m_clientData;
|
return m_clientData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
bool wxEvtHandler::OnClose()
|
|
||||||
{
|
|
||||||
if (GetNextHandler())
|
|
||||||
return GetNextHandler()->OnClose();
|
|
||||||
else
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
#endif // wxUSE_BASE
|
#endif // wxUSE_BASE
|
||||||
|
|
||||||
#if wxUSE_GUI
|
#if wxUSE_GUI
|
||||||
|
@@ -887,47 +887,5 @@ int wxFTP::GetFileSize(const wxString& fileName)
|
|||||||
return filesize;
|
return filesize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
// deprecated
|
|
||||||
wxList *wxFTP::GetList(const wxString& wildcard, bool details)
|
|
||||||
{
|
|
||||||
wxSocketBase *sock = GetPort();
|
|
||||||
if (!sock)
|
|
||||||
return NULL;
|
|
||||||
wxList *file_list = new wxList;
|
|
||||||
wxString line;
|
|
||||||
// NLST : List of Filenames (including Directory's !)
|
|
||||||
// LIST : depending on BS of FTP-Server
|
|
||||||
// - Unix : result like "ls" command
|
|
||||||
// - Windows : like "dir" command
|
|
||||||
// - others : ?
|
|
||||||
if (!details)
|
|
||||||
line = _T("NLST"); // Default
|
|
||||||
else
|
|
||||||
line = _T("LIST");
|
|
||||||
if (!wildcard.IsNull())
|
|
||||||
line += wildcard;
|
|
||||||
if (!CheckCommand(line, '1'))
|
|
||||||
{
|
|
||||||
delete sock;
|
|
||||||
delete file_list;
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
while (GetLine(sock, line) == wxPROTO_NOERR)
|
|
||||||
{
|
|
||||||
file_list->Append((wxObject *)(new wxString(line)));
|
|
||||||
}
|
|
||||||
if (!CheckResult('2'))
|
|
||||||
{
|
|
||||||
delete sock;
|
|
||||||
file_list->DeleteContents(TRUE);
|
|
||||||
delete file_list;
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
return file_list;
|
|
||||||
}
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
|
|
||||||
#endif // wxUSE_PROTOCOL_FTP
|
#endif // wxUSE_PROTOCOL_FTP
|
||||||
|
|
||||||
|
@@ -1013,134 +1013,4 @@ bool wxLayoutConstraints::SatisfyConstraints(wxWindowBase *win, int *nChanges)
|
|||||||
return AreSatisfied();
|
return AreSatisfied();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Main constrained layout algorithm. Look at all the child
|
|
||||||
* windows, and their constraints (if any).
|
|
||||||
* The idea is to keep iterating through the constraints
|
|
||||||
* until all left, right, bottom and top edges, and widths and heights,
|
|
||||||
* are known (or no change occurs and we've failed to resolve all
|
|
||||||
* constraints).
|
|
||||||
*
|
|
||||||
* If the user has not specified a dimension or edge, it will be
|
|
||||||
* be calculated from the other known values. E.g. If we know
|
|
||||||
* the right hand edge and the left hand edge, we now know the width.
|
|
||||||
* The snag here is that this means we must specify absolute dimensions
|
|
||||||
* twice (in constructor and in constraint), if we wish to use the
|
|
||||||
* constraint notation to just set the position, for example.
|
|
||||||
* Otherwise, if we only set ONE edge and no dimension, it would never
|
|
||||||
* find the other edge.
|
|
||||||
*
|
|
||||||
* Algorithm:
|
|
||||||
|
|
||||||
Mark all constraints as not done.
|
|
||||||
|
|
||||||
iterations = 0;
|
|
||||||
until no change or iterations >= max iterations
|
|
||||||
For each child:
|
|
||||||
{
|
|
||||||
Calculate all constraints
|
|
||||||
}
|
|
||||||
iterations ++;
|
|
||||||
|
|
||||||
For each child
|
|
||||||
Set each calculated position and size
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
bool wxOldDoLayout(wxWindowBase *win)
|
|
||||||
{
|
|
||||||
// Make sure this isn't called recursively from below
|
|
||||||
static wxList doneSoFar;
|
|
||||||
|
|
||||||
if (doneSoFar.Member(win))
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
doneSoFar.Append(win);
|
|
||||||
|
|
||||||
wxNode *node = win->GetChildren().First();
|
|
||||||
while (node)
|
|
||||||
{
|
|
||||||
wxWindowBase *child = (wxWindowBase *)node->Data();
|
|
||||||
wxLayoutConstraints *constr = child->GetConstraints();
|
|
||||||
if (constr)
|
|
||||||
{
|
|
||||||
constr->left.SetDone(FALSE);
|
|
||||||
constr->top.SetDone(FALSE);
|
|
||||||
constr->right.SetDone(FALSE);
|
|
||||||
constr->bottom.SetDone(FALSE);
|
|
||||||
constr->width.SetDone(FALSE);
|
|
||||||
constr->height.SetDone(FALSE);
|
|
||||||
constr->centreX.SetDone(FALSE);
|
|
||||||
constr->centreY.SetDone(FALSE);
|
|
||||||
}
|
|
||||||
node = node->Next();
|
|
||||||
}
|
|
||||||
int noIterations = 0;
|
|
||||||
int maxIterations = 500;
|
|
||||||
int noChanges = 1;
|
|
||||||
|
|
||||||
while ((noChanges > 0) && (noIterations < maxIterations))
|
|
||||||
{
|
|
||||||
noChanges = 0;
|
|
||||||
wxNode *node = win->GetChildren().First();
|
|
||||||
while (node)
|
|
||||||
{
|
|
||||||
wxWindowBase *child = (wxWindowBase *)node->Data();
|
|
||||||
wxLayoutConstraints *constr = child->GetConstraints();
|
|
||||||
if (constr)
|
|
||||||
{
|
|
||||||
int tempNoChanges = 0;
|
|
||||||
(void)constr->SatisfyConstraints(child, &tempNoChanges);
|
|
||||||
noChanges += tempNoChanges;
|
|
||||||
}
|
|
||||||
node = node->Next();
|
|
||||||
}
|
|
||||||
noIterations ++;
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
// Would be nice to have a test here to see _which_ constraint(s)
|
|
||||||
// failed, so we can print a specific diagnostic message.
|
|
||||||
if (noFailures > 0)
|
|
||||||
{
|
|
||||||
wxDebugMsg(_("wxWindowBase::Layout() failed.\n"));
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
// Now set the sizes and positions of the children, and
|
|
||||||
// recursively call Layout().
|
|
||||||
node = win->GetChildren().First();
|
|
||||||
while (node)
|
|
||||||
{
|
|
||||||
wxWindowBase *child = (wxWindowBase *)node->Data();
|
|
||||||
wxLayoutConstraints *constr = child->GetConstraints();
|
|
||||||
if (constr && constr->left.GetDone() && constr->right.GetDone() &&
|
|
||||||
constr->width.GetDone() && constr->height.GetDone())
|
|
||||||
{
|
|
||||||
int x = constr->left.GetValue();
|
|
||||||
int y = constr->top.GetValue();
|
|
||||||
int w = constr->width.GetValue();
|
|
||||||
int h = constr->height.GetValue();
|
|
||||||
|
|
||||||
// If we don't want to resize this window, just move it...
|
|
||||||
if ((constr->width.GetRelationship() != wxAsIs) ||
|
|
||||||
(constr->height.GetRelationship() != wxAsIs))
|
|
||||||
{
|
|
||||||
// _Should_ call Layout() recursively.
|
|
||||||
child->SetSize(x, y, w, h);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
child->Move(x, y);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
child->Layout();
|
|
||||||
node = node->Next();
|
|
||||||
}
|
|
||||||
doneSoFar.DeleteObject(win);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
#endif // wxUSE_CONSTRAINTS
|
#endif // wxUSE_CONSTRAINTS
|
||||||
|
@@ -94,10 +94,6 @@ public:
|
|||||||
wxSocketEventFlags m_eventmask;
|
wxSocketEventFlags m_eventmask;
|
||||||
bool m_notify;
|
bool m_notify;
|
||||||
void *m_clientData;
|
void *m_clientData;
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
wxSocketBase::wxSockCbk m_cbk;
|
|
||||||
char *m_cdata;
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxSocketState() : wxObject() {}
|
wxSocketState() : wxObject() {}
|
||||||
@@ -184,10 +180,6 @@ void wxSocketBase::Init()
|
|||||||
m_clientData = NULL;
|
m_clientData = NULL;
|
||||||
m_notify = FALSE;
|
m_notify = FALSE;
|
||||||
m_eventmask = 0;
|
m_eventmask = 0;
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
m_cbk = NULL;
|
|
||||||
m_cdata = NULL;
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
if ( !IsInitialized() )
|
if ( !IsInitialized() )
|
||||||
{
|
{
|
||||||
@@ -824,10 +816,6 @@ void wxSocketBase::SaveState()
|
|||||||
state->m_notify = m_notify;
|
state->m_notify = m_notify;
|
||||||
state->m_eventmask = m_eventmask;
|
state->m_eventmask = m_eventmask;
|
||||||
state->m_clientData = m_clientData;
|
state->m_clientData = m_clientData;
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
state->m_cbk = m_cbk;
|
|
||||||
state->m_cdata = m_cdata;
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
m_states.Append(state);
|
m_states.Append(state);
|
||||||
}
|
}
|
||||||
@@ -847,11 +835,7 @@ void wxSocketBase::RestoreState()
|
|||||||
m_notify = state->m_notify;
|
m_notify = state->m_notify;
|
||||||
m_eventmask = state->m_eventmask;
|
m_eventmask = state->m_eventmask;
|
||||||
m_clientData = state->m_clientData;
|
m_clientData = state->m_clientData;
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
m_cbk = state->m_cbk;
|
|
||||||
m_cdata = state->m_cdata;
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
m_states.Erase(node);
|
m_states.Erase(node);
|
||||||
delete state;
|
delete state;
|
||||||
}
|
}
|
||||||
@@ -874,30 +858,6 @@ void wxSocketBase::SetFlags(wxSocketFlags flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------------
|
|
||||||
// Callbacks (now obsolete - use events instead)
|
|
||||||
// --------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
wxSocketBase::wxSockCbk wxSocketBase::Callback(wxSockCbk cbk_)
|
|
||||||
{
|
|
||||||
wxSockCbk old_cbk = cbk_;
|
|
||||||
|
|
||||||
m_cbk = cbk_;
|
|
||||||
return old_cbk;
|
|
||||||
}
|
|
||||||
|
|
||||||
char *wxSocketBase::CallbackData(char *data)
|
|
||||||
{
|
|
||||||
char *old_data = m_cdata;
|
|
||||||
|
|
||||||
m_cdata = data;
|
|
||||||
return old_data;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
// Event handling
|
// Event handling
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
@@ -992,11 +952,6 @@ void wxSocketBase::OnRequest(wxSocketNotify notification)
|
|||||||
|
|
||||||
m_handler->AddPendingEvent(event);
|
m_handler->AddPendingEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
if (m_cbk)
|
|
||||||
m_cbk(*this, notification, m_cdata);
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -331,9 +331,6 @@ bool wxWindowBase::Close(bool force)
|
|||||||
{
|
{
|
||||||
wxCloseEvent event(wxEVT_CLOSE_WINDOW, m_windowId);
|
wxCloseEvent event(wxEVT_CLOSE_WINDOW, m_windowId);
|
||||||
event.SetEventObject(this);
|
event.SetEventObject(this);
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
event.SetForce(force);
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
event.SetCanVeto(!force);
|
event.SetCanVeto(!force);
|
||||||
|
|
||||||
// return FALSE if window wasn't closed because the application vetoed the
|
// return FALSE if window wasn't closed because the application vetoed the
|
||||||
|
@@ -119,28 +119,6 @@ wxString wxGetSingleChoice( const wxString& message,
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
// Overloaded for backward compatibility
|
|
||||||
wxString wxGetSingleChoice( const wxString& message,
|
|
||||||
const wxString& caption,
|
|
||||||
int n, wxChar *choices[],
|
|
||||||
wxWindow *parent,
|
|
||||||
int x, int y, bool centre,
|
|
||||||
int width, int height )
|
|
||||||
{
|
|
||||||
wxString *strings = new wxString[n];
|
|
||||||
int i;
|
|
||||||
for ( i = 0; i < n; i++)
|
|
||||||
{
|
|
||||||
strings[i] = choices[i];
|
|
||||||
}
|
|
||||||
wxString ans(wxGetSingleChoice(message, caption, n, (const wxString *)strings, parent,
|
|
||||||
x, y, centre, width, height));
|
|
||||||
delete[] strings;
|
|
||||||
return ans;
|
|
||||||
}
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
|
|
||||||
int wxGetSingleChoiceIndex( const wxString& message,
|
int wxGetSingleChoiceIndex( const wxString& message,
|
||||||
const wxString& caption,
|
const wxString& caption,
|
||||||
int n, const wxString *choices,
|
int n, const wxString *choices,
|
||||||
@@ -176,25 +154,6 @@ int wxGetSingleChoiceIndex( const wxString& message,
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
// Overloaded for backward compatibility
|
|
||||||
int wxGetSingleChoiceIndex( const wxString& message,
|
|
||||||
const wxString& caption,
|
|
||||||
int n, wxChar *choices[],
|
|
||||||
wxWindow *parent,
|
|
||||||
int x, int y, bool centre,
|
|
||||||
int width, int height )
|
|
||||||
{
|
|
||||||
wxString *strings = new wxString[n];
|
|
||||||
for ( int i = 0; i < n; i++)
|
|
||||||
strings[i] = choices[i];
|
|
||||||
int ans = wxGetSingleChoiceIndex(message, caption, n, (const wxString *)strings, parent,
|
|
||||||
x, y, centre, width, height);
|
|
||||||
delete[] strings;
|
|
||||||
return ans;
|
|
||||||
}
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
|
|
||||||
void *wxGetSingleChoiceData( const wxString& message,
|
void *wxGetSingleChoiceData( const wxString& message,
|
||||||
const wxString& caption,
|
const wxString& caption,
|
||||||
int n, const wxString *choices,
|
int n, const wxString *choices,
|
||||||
@@ -234,30 +193,6 @@ void *wxGetSingleChoiceData( const wxString& message,
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
// Overloaded for backward compatibility
|
|
||||||
void *wxGetSingleChoiceData( const wxString& message,
|
|
||||||
const wxString& caption,
|
|
||||||
int n, wxChar *choices[],
|
|
||||||
void **client_data,
|
|
||||||
wxWindow *parent,
|
|
||||||
int x, int y, bool centre, int width, int height )
|
|
||||||
{
|
|
||||||
wxString *strings = new wxString[n];
|
|
||||||
int i;
|
|
||||||
for ( i = 0; i < n; i++)
|
|
||||||
{
|
|
||||||
strings[i] = choices[i];
|
|
||||||
}
|
|
||||||
void *data = wxGetSingleChoiceData(message, caption,
|
|
||||||
n, (const wxString *)strings,
|
|
||||||
client_data, parent,
|
|
||||||
x, y, centre, width, height);
|
|
||||||
delete[] strings;
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
|
|
||||||
size_t wxGetMultipleChoices(wxArrayInt& selections,
|
size_t wxGetMultipleChoices(wxArrayInt& selections,
|
||||||
const wxString& message,
|
const wxString& message,
|
||||||
const wxString& caption,
|
const wxString& caption,
|
||||||
@@ -373,40 +308,6 @@ wxSingleChoiceDialog::wxSingleChoiceDialog(wxWindow *parent,
|
|||||||
Create(parent, message, caption, n, choices, clientData, style);
|
Create(parent, message, caption, n, choices, clientData, style);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
|
|
||||||
wxSingleChoiceDialog::wxSingleChoiceDialog(wxWindow *parent,
|
|
||||||
const wxString& message,
|
|
||||||
const wxString& caption,
|
|
||||||
const wxStringList& choices,
|
|
||||||
char **clientData,
|
|
||||||
long style,
|
|
||||||
const wxPoint& WXUNUSED(pos))
|
|
||||||
{
|
|
||||||
Create(parent, message, caption, choices, clientData, style);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxSingleChoiceDialog::Create(wxWindow *parent,
|
|
||||||
const wxString& message,
|
|
||||||
const wxString& caption,
|
|
||||||
const wxStringList& choices,
|
|
||||||
char **clientData,
|
|
||||||
long style,
|
|
||||||
const wxPoint& pos)
|
|
||||||
{
|
|
||||||
wxString *strings = new wxString[choices.Number()];
|
|
||||||
int i;
|
|
||||||
for ( i = 0; i < choices.Number(); i++)
|
|
||||||
{
|
|
||||||
strings[i] = (char *)choices.Nth(i)->Data();
|
|
||||||
}
|
|
||||||
bool ans = Create(parent, message, caption, choices.Number(), strings, clientData, style, pos);
|
|
||||||
delete[] strings;
|
|
||||||
return ans;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
|
|
||||||
bool wxSingleChoiceDialog::Create( wxWindow *parent,
|
bool wxSingleChoiceDialog::Create( wxWindow *parent,
|
||||||
const wxString& message,
|
const wxString& message,
|
||||||
const wxString& caption,
|
const wxString& caption,
|
||||||
|
@@ -1303,24 +1303,6 @@ wxGenericScrolledWindow::MSWWindowProc(WXUINT nMsg,
|
|||||||
|
|
||||||
#endif // __WXMSW__
|
#endif // __WXMSW__
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
void wxGenericScrolledWindow::GetScrollUnitsPerPage (int *x_page, int *y_page) const
|
|
||||||
{
|
|
||||||
*x_page = GetScrollPageSize(wxHORIZONTAL);
|
|
||||||
*y_page = GetScrollPageSize(wxVERTICAL);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxGenericScrolledWindow::CalcUnscrolledPosition(int x, int y, float *xx, float *yy) const
|
|
||||||
{
|
|
||||||
if ( xx )
|
|
||||||
*xx = (float)(x + m_xScrollPosition * m_xScrollPixelsPerLine);
|
|
||||||
if ( yy )
|
|
||||||
*yy = (float)(y + m_yScrollPosition * m_yScrollPixelsPerLine);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
#endif // !wxGTK
|
#endif // !wxGTK
|
||||||
|
|
||||||
// vi:sts=4:sw=4:et
|
// vi:sts=4:sw=4:et
|
||||||
|
@@ -147,9 +147,6 @@ wxControl::wxControl()
|
|||||||
m_macVerticalBorder = 0 ;
|
m_macVerticalBorder = 0 ;
|
||||||
m_backgroundColour = *wxWHITE;
|
m_backgroundColour = *wxWHITE;
|
||||||
m_foregroundColour = *wxBLACK;
|
m_foregroundColour = *wxBLACK;
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
m_callback = 0;
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
if ( wxMacLiveScrollbarActionUPP == NULL )
|
if ( wxMacLiveScrollbarActionUPP == NULL )
|
||||||
{
|
{
|
||||||
@@ -265,22 +262,10 @@ wxSize wxControl::DoGetBestSize() const
|
|||||||
|
|
||||||
bool wxControl::ProcessCommand (wxCommandEvent & event)
|
bool wxControl::ProcessCommand (wxCommandEvent & event)
|
||||||
{
|
{
|
||||||
// Tries:
|
// Tries:
|
||||||
// 1) A callback function (to become obsolete)
|
// 1) OnCommand, starting at this window and working up parent hierarchy
|
||||||
// 2) OnCommand, starting at this window and working up parent hierarchy
|
// 2) OnCommand then calls ProcessEvent to search the event tables.
|
||||||
// 3) OnCommand then calls ProcessEvent to search the event tables.
|
return GetEventHandler()->ProcessEvent(event);
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
if ( m_callback )
|
|
||||||
{
|
|
||||||
(void)(*m_callback)(this, event);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
{
|
|
||||||
return GetEventHandler()->ProcessEvent(event);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------
|
// ------------------------
|
||||||
|
@@ -276,15 +276,6 @@ bool wxMenu::ProcessCommand(wxCommandEvent & event)
|
|||||||
{
|
{
|
||||||
bool processed = FALSE;
|
bool processed = FALSE;
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
// Try a callback
|
|
||||||
if (m_callback)
|
|
||||||
{
|
|
||||||
(void)(*(m_callback))(*this, event);
|
|
||||||
processed = TRUE;
|
|
||||||
}
|
|
||||||
#endif WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
// Try the menu's event handler
|
// Try the menu's event handler
|
||||||
if ( !processed && GetEventHandler())
|
if ( !processed && GetEventHandler())
|
||||||
{
|
{
|
||||||
|
@@ -922,48 +922,6 @@ void wxWindowMac::Refresh(bool eraseBack, const wxRect *rect)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_CARET && WXWIN_COMPATIBILITY
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// Caret manipulation
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
void wxWindowMac::CreateCaret(int w, int h)
|
|
||||||
{
|
|
||||||
SetCaret(new wxCaret(this, w, h));
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxWindowMac::CreateCaret(const wxBitmap *WXUNUSED(bitmap))
|
|
||||||
{
|
|
||||||
wxFAIL_MSG("not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxWindowMac::ShowCaret(bool show)
|
|
||||||
{
|
|
||||||
wxCHECK_RET( m_caret, "no caret to show" );
|
|
||||||
|
|
||||||
m_caret->Show(show);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxWindowMac::DestroyCaret()
|
|
||||||
{
|
|
||||||
SetCaret(NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxWindowMac::SetCaretPos(int x, int y)
|
|
||||||
{
|
|
||||||
wxCHECK_RET( m_caret, "no caret to move" );
|
|
||||||
|
|
||||||
m_caret->Move(x, y);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxWindowMac::GetCaretPos(int *x, int *y) const
|
|
||||||
{
|
|
||||||
wxCHECK_RET( m_caret, "no caret to get position of" );
|
|
||||||
|
|
||||||
m_caret->GetPosition(x, y);
|
|
||||||
}
|
|
||||||
#endif // wxUSE_CARET
|
|
||||||
|
|
||||||
wxWindowMac *wxGetActiveWindow()
|
wxWindowMac *wxGetActiveWindow()
|
||||||
{
|
{
|
||||||
// actually this is a windows-only concept
|
// actually this is a windows-only concept
|
||||||
@@ -1304,37 +1262,6 @@ wxWindowMac *wxWindowBase::FindFocus()
|
|||||||
return gFocusWindow ;
|
return gFocusWindow ;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
// If nothing defined for this, try the parent.
|
|
||||||
// E.g. we may be a button loaded from a resource, with no callback function
|
|
||||||
// defined.
|
|
||||||
void wxWindowMac::OnCommand(wxWindowMac& win, wxCommandEvent& event)
|
|
||||||
{
|
|
||||||
if ( GetEventHandler()->ProcessEvent(event) )
|
|
||||||
return;
|
|
||||||
if ( m_parent )
|
|
||||||
m_parent->GetEventHandler()->OnCommand(win, event);
|
|
||||||
}
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
wxObject* wxWindowMac::GetChild(int number) const
|
|
||||||
{
|
|
||||||
// Return a pointer to the Nth object in the Panel
|
|
||||||
wxNode *node = GetChildren().GetFirst();
|
|
||||||
int n = number;
|
|
||||||
while (node && n--)
|
|
||||||
node = node->GetNext();
|
|
||||||
if ( node )
|
|
||||||
{
|
|
||||||
wxObject *obj = (wxObject *)node->GetData();
|
|
||||||
return(obj);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
void wxWindowMac::OnSetFocus(wxFocusEvent& event)
|
void wxWindowMac::OnSetFocus(wxFocusEvent& event)
|
||||||
{
|
{
|
||||||
// panel wants to track the window which was the last to have focus in it,
|
// panel wants to track the window which was the last to have focus in it,
|
||||||
|
@@ -147,9 +147,6 @@ wxControl::wxControl()
|
|||||||
m_macVerticalBorder = 0 ;
|
m_macVerticalBorder = 0 ;
|
||||||
m_backgroundColour = *wxWHITE;
|
m_backgroundColour = *wxWHITE;
|
||||||
m_foregroundColour = *wxBLACK;
|
m_foregroundColour = *wxBLACK;
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
m_callback = 0;
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
if ( wxMacLiveScrollbarActionUPP == NULL )
|
if ( wxMacLiveScrollbarActionUPP == NULL )
|
||||||
{
|
{
|
||||||
@@ -265,22 +262,10 @@ wxSize wxControl::DoGetBestSize() const
|
|||||||
|
|
||||||
bool wxControl::ProcessCommand (wxCommandEvent & event)
|
bool wxControl::ProcessCommand (wxCommandEvent & event)
|
||||||
{
|
{
|
||||||
// Tries:
|
// Tries:
|
||||||
// 1) A callback function (to become obsolete)
|
// 1) OnCommand, starting at this window and working up parent hierarchy
|
||||||
// 2) OnCommand, starting at this window and working up parent hierarchy
|
// 2) OnCommand then calls ProcessEvent to search the event tables.
|
||||||
// 3) OnCommand then calls ProcessEvent to search the event tables.
|
return GetEventHandler()->ProcessEvent(event);
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
if ( m_callback )
|
|
||||||
{
|
|
||||||
(void)(*m_callback)(this, event);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
{
|
|
||||||
return GetEventHandler()->ProcessEvent(event);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------
|
// ------------------------
|
||||||
|
@@ -276,15 +276,6 @@ bool wxMenu::ProcessCommand(wxCommandEvent & event)
|
|||||||
{
|
{
|
||||||
bool processed = FALSE;
|
bool processed = FALSE;
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
// Try a callback
|
|
||||||
if (m_callback)
|
|
||||||
{
|
|
||||||
(void)(*(m_callback))(*this, event);
|
|
||||||
processed = TRUE;
|
|
||||||
}
|
|
||||||
#endif WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
// Try the menu's event handler
|
// Try the menu's event handler
|
||||||
if ( !processed && GetEventHandler())
|
if ( !processed && GetEventHandler())
|
||||||
{
|
{
|
||||||
|
@@ -922,48 +922,6 @@ void wxWindowMac::Refresh(bool eraseBack, const wxRect *rect)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_CARET && WXWIN_COMPATIBILITY
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// Caret manipulation
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
void wxWindowMac::CreateCaret(int w, int h)
|
|
||||||
{
|
|
||||||
SetCaret(new wxCaret(this, w, h));
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxWindowMac::CreateCaret(const wxBitmap *WXUNUSED(bitmap))
|
|
||||||
{
|
|
||||||
wxFAIL_MSG("not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxWindowMac::ShowCaret(bool show)
|
|
||||||
{
|
|
||||||
wxCHECK_RET( m_caret, "no caret to show" );
|
|
||||||
|
|
||||||
m_caret->Show(show);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxWindowMac::DestroyCaret()
|
|
||||||
{
|
|
||||||
SetCaret(NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxWindowMac::SetCaretPos(int x, int y)
|
|
||||||
{
|
|
||||||
wxCHECK_RET( m_caret, "no caret to move" );
|
|
||||||
|
|
||||||
m_caret->Move(x, y);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxWindowMac::GetCaretPos(int *x, int *y) const
|
|
||||||
{
|
|
||||||
wxCHECK_RET( m_caret, "no caret to get position of" );
|
|
||||||
|
|
||||||
m_caret->GetPosition(x, y);
|
|
||||||
}
|
|
||||||
#endif // wxUSE_CARET
|
|
||||||
|
|
||||||
wxWindowMac *wxGetActiveWindow()
|
wxWindowMac *wxGetActiveWindow()
|
||||||
{
|
{
|
||||||
// actually this is a windows-only concept
|
// actually this is a windows-only concept
|
||||||
@@ -1304,37 +1262,6 @@ wxWindowMac *wxWindowBase::FindFocus()
|
|||||||
return gFocusWindow ;
|
return gFocusWindow ;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
// If nothing defined for this, try the parent.
|
|
||||||
// E.g. we may be a button loaded from a resource, with no callback function
|
|
||||||
// defined.
|
|
||||||
void wxWindowMac::OnCommand(wxWindowMac& win, wxCommandEvent& event)
|
|
||||||
{
|
|
||||||
if ( GetEventHandler()->ProcessEvent(event) )
|
|
||||||
return;
|
|
||||||
if ( m_parent )
|
|
||||||
m_parent->GetEventHandler()->OnCommand(win, event);
|
|
||||||
}
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
wxObject* wxWindowMac::GetChild(int number) const
|
|
||||||
{
|
|
||||||
// Return a pointer to the Nth object in the Panel
|
|
||||||
wxNode *node = GetChildren().GetFirst();
|
|
||||||
int n = number;
|
|
||||||
while (node && n--)
|
|
||||||
node = node->GetNext();
|
|
||||||
if ( node )
|
|
||||||
{
|
|
||||||
wxObject *obj = (wxObject *)node->GetData();
|
|
||||||
return(obj);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
void wxWindowMac::OnSetFocus(wxFocusEvent& event)
|
void wxWindowMac::OnSetFocus(wxFocusEvent& event)
|
||||||
{
|
{
|
||||||
// panel wants to track the window which was the last to have focus in it,
|
// panel wants to track the window which was the last to have focus in it,
|
||||||
|
@@ -88,14 +88,3 @@ void wxColour::Set(unsigned char r, unsigned char g, unsigned char b)
|
|||||||
m_blue = b;
|
m_blue = b;
|
||||||
m_isInit = TRUE;
|
m_isInit = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Obsolete
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
void wxColour::Get(unsigned char *r, unsigned char *g, unsigned char *b) const
|
|
||||||
{
|
|
||||||
*r = m_red;
|
|
||||||
*g = m_green;
|
|
||||||
*b = m_blue;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
@@ -855,37 +855,6 @@ void wxWindowMGL::WarpPointer(int x, int y)
|
|||||||
EVT_setMousePos(x, y);
|
EVT_setMousePos(x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
// If nothing defined for this, try the parent.
|
|
||||||
// E.g. we may be a button loaded from a resource, with no callback function
|
|
||||||
// defined.
|
|
||||||
void wxWindowMGL::OnCommand(wxWindow& win, wxCommandEvent& event)
|
|
||||||
{
|
|
||||||
if ( GetEventHandler()->ProcessEvent(event) )
|
|
||||||
return;
|
|
||||||
if ( m_parent )
|
|
||||||
m_parent->GetEventHandler()->OnCommand(win, event);
|
|
||||||
}
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
wxObject* wxWindowMGL::GetChild(int number) const
|
|
||||||
{
|
|
||||||
// Return a pointer to the Nth object in the Panel
|
|
||||||
wxNode *node = GetChildren().First();
|
|
||||||
int n = number;
|
|
||||||
while (node && n--)
|
|
||||||
node = node->Next();
|
|
||||||
if ( node )
|
|
||||||
{
|
|
||||||
wxObject *obj = (wxObject *)node->Data();
|
|
||||||
return(obj);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
// Set this window to be the child of 'parent'.
|
// Set this window to be the child of 'parent'.
|
||||||
bool wxWindowMGL::Reparent(wxWindowBase *parent)
|
bool wxWindowMGL::Reparent(wxWindowBase *parent)
|
||||||
{
|
{
|
||||||
@@ -1103,48 +1072,6 @@ void wxWindowMGL::GetTextExtent(const wxString& string,
|
|||||||
dc.GetTextExtent(string, x, y, descent, externalLeading, (wxFont*)theFont);
|
dc.GetTextExtent(string, x, y, descent, externalLeading, (wxFont*)theFont);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_CARET && WXWIN_COMPATIBILITY
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// Caret manipulation
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
void wxWindowMGL::CreateCaret(int w, int h)
|
|
||||||
{
|
|
||||||
SetCaret(new wxCaret(this, w, h));
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxWindowMGL::CreateCaret(const wxBitmap *WXUNUSED(bitmap))
|
|
||||||
{
|
|
||||||
wxFAIL_MSG("not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxWindowMGL::ShowCaret(bool show)
|
|
||||||
{
|
|
||||||
wxCHECK_RET( m_caret, "no caret to show" );
|
|
||||||
|
|
||||||
m_caret->Show(show);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxWindowMGL::DestroyCaret()
|
|
||||||
{
|
|
||||||
SetCaret(NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxWindowMGL::SetCaretPos(int x, int y)
|
|
||||||
{
|
|
||||||
wxCHECK_RET( m_caret, "no caret to move" );
|
|
||||||
|
|
||||||
m_caret->Move(x, y);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxWindowMGL::GetCaretPos(int *x, int *y) const
|
|
||||||
{
|
|
||||||
wxCHECK_RET( m_caret, "no caret to get position of" );
|
|
||||||
|
|
||||||
m_caret->GetPosition(x, y);
|
|
||||||
}
|
|
||||||
#endif // wxUSE_CARET
|
|
||||||
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// painting
|
// painting
|
||||||
|
@@ -40,10 +40,6 @@ wxControl::wxControl()
|
|||||||
m_backgroundColour = *wxWHITE;
|
m_backgroundColour = *wxWHITE;
|
||||||
m_foregroundColour = *wxBLACK;
|
m_foregroundColour = *wxBLACK;
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
m_callback = 0;
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
m_inSetValue = FALSE;
|
m_inSetValue = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -113,15 +109,5 @@ wxString wxControl::GetLabel() const
|
|||||||
|
|
||||||
bool wxControl::ProcessCommand(wxCommandEvent & event)
|
bool wxControl::ProcessCommand(wxCommandEvent & event)
|
||||||
{
|
{
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
if ( m_callback )
|
|
||||||
{
|
|
||||||
(void)(*m_callback)(this, event);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
return GetEventHandler()->ProcessEvent(event);
|
return GetEventHandler()->ProcessEvent(event);
|
||||||
}
|
}
|
||||||
|
@@ -260,10 +260,6 @@ bool wxBitmap::CopyFromIconOrCursor(const wxGDIImage& icon)
|
|||||||
// delete the old one now as we don't need it any more
|
// delete the old one now as we don't need it any more
|
||||||
::DeleteObject(iconInfo.hbmMask);
|
::DeleteObject(iconInfo.hbmMask);
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
refData->m_ok = TRUE;
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
#else
|
#else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -322,10 +318,6 @@ bool wxBitmap::CopyFromIcon(const wxIcon& icon)
|
|||||||
|
|
||||||
refData->m_hBitmap = (WXHBITMAP)hbitmap;
|
refData->m_hBitmap = (WXHBITMAP)hbitmap;
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
refData->m_ok = TRUE;
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
#else // Win32
|
#else // Win32
|
||||||
return CopyFromIconOrCursor(icon);
|
return CopyFromIconOrCursor(icon);
|
||||||
@@ -558,10 +550,6 @@ bool wxBitmap::DoCreate(int w, int h, int d, WXHDC hdc)
|
|||||||
|
|
||||||
SetHBITMAP((WXHBITMAP)hbmp);
|
SetHBITMAP((WXHBITMAP)hbmp);
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
GetBitmapData()->m_ok = hbmp != 0;
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
|
|
||||||
return Ok();
|
return Ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -686,11 +674,6 @@ bool wxBitmap::CreateFromImage(const wxImage& image, int depth, const wxDC& dc)
|
|||||||
SetPalette(image.GetPalette());
|
SetPalette(image.GetPalette());
|
||||||
#endif // wxUSE_PALETTE
|
#endif // wxUSE_PALETTE
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
// check the wxBitmap object
|
|
||||||
GetBitmapData()->SetOk();
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -825,10 +808,6 @@ bool wxBitmap::CreateFromImage(const wxImage& image, int depth, WXHDC hdc )
|
|||||||
// validate this object
|
// validate this object
|
||||||
SetHBITMAP((WXHBITMAP)hbitmap);
|
SetHBITMAP((WXHBITMAP)hbitmap);
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
m_refData->m_ok = TRUE;
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
|
|
||||||
// finally also set the mask if we have one
|
// finally also set the mask if we have one
|
||||||
if ( image.HasMask() )
|
if ( image.HasMask() )
|
||||||
{
|
{
|
||||||
@@ -1397,17 +1376,6 @@ void wxBitmap::SetMask(wxMask *mask)
|
|||||||
GetBitmapData()->SetMask(mask);
|
GetBitmapData()->SetMask(mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
|
|
||||||
void wxBitmap::SetOk(bool isOk)
|
|
||||||
{
|
|
||||||
EnsureHasData();
|
|
||||||
|
|
||||||
GetBitmapData()->m_ok = isOk;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2_4
|
#if WXWIN_COMPATIBILITY_2_4
|
||||||
|
|
||||||
void wxBitmap::SetQuality(int WXUNUSED(quality))
|
void wxBitmap::SetQuality(int WXUNUSED(quality))
|
||||||
|
@@ -430,9 +430,6 @@ void *wxGetClipboardData(wxDataFormat dataFormat, long *len)
|
|||||||
wxBM->SetWidth(bm.bmWidth);
|
wxBM->SetWidth(bm.bmWidth);
|
||||||
wxBM->SetHeight(bm.bmHeight);
|
wxBM->SetHeight(bm.bmHeight);
|
||||||
wxBM->SetDepth(bm.bmPlanes);
|
wxBM->SetDepth(bm.bmPlanes);
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
wxBM->SetOk(TRUE);
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
retval = wxBM;
|
retval = wxBM;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -111,14 +111,3 @@ void wxColour::Set (unsigned char r, unsigned char g, unsigned char b)
|
|||||||
m_isInit = TRUE;
|
m_isInit = TRUE;
|
||||||
m_pixel = PALETTERGB (m_red, m_green, m_blue);
|
m_pixel = PALETTERGB (m_red, m_green, m_blue);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Obsolete
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
void wxColour::Get (unsigned char *r, unsigned char *g, unsigned char *b) const
|
|
||||||
{
|
|
||||||
*r = m_red;
|
|
||||||
*g = m_green;
|
|
||||||
*b = m_blue;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
@@ -46,9 +46,6 @@ END_EVENT_TABLE()
|
|||||||
// Item members
|
// Item members
|
||||||
wxControl::wxControl()
|
wxControl::wxControl()
|
||||||
{
|
{
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
m_callback = 0;
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxControl::~wxControl()
|
wxControl::~wxControl()
|
||||||
@@ -173,16 +170,6 @@ wxSize wxControl::DoGetBestSize() const
|
|||||||
|
|
||||||
bool wxControl::ProcessCommand(wxCommandEvent& event)
|
bool wxControl::ProcessCommand(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
if ( m_callback )
|
|
||||||
{
|
|
||||||
(void)(*m_callback)(*this, event);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
return GetEventHandler()->ProcessEvent(event);
|
return GetEventHandler()->ProcessEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -270,10 +270,6 @@ wxCursor::wxCursor(const wxString& filename,
|
|||||||
if ( hcursor )
|
if ( hcursor )
|
||||||
{
|
{
|
||||||
m_refData = new wxCursorRefData(hcursor, true /* delete it later */);
|
m_refData = new wxCursorRefData(hcursor, true /* delete it later */);
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
((wxCursorRefData *)m_refData)->SetOk();
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -39,12 +39,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxScrollBar, wxControl)
|
|||||||
pagesize( long , 1)
|
pagesize( long , 1)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxScrollBar, wxControl)
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
EVT_SCROLL(wxScrollBar::OnScroll)
|
|
||||||
#endif
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
|
|
||||||
// Scrollbar
|
// Scrollbar
|
||||||
bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
|
bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
|
||||||
@@ -324,76 +318,6 @@ void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageS
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* From the WIN32 documentation:
|
|
||||||
In version 4.0 or later, the maximum value that a scroll bar can report
|
|
||||||
(that is, the maximum scrolling position) depends on the page size.
|
|
||||||
If the scroll bar has a page size greater than one, the maximum scrolling position
|
|
||||||
is less than the maximum range value. You can use the following formula to calculate
|
|
||||||
the maximum scrolling position:
|
|
||||||
|
|
||||||
MaxScrollPos = MaxRangeValue - (PageSize - 1)
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
void wxScrollBar::SetPageSize(int pageLength)
|
|
||||||
{
|
|
||||||
m_pageSize = pageLength;
|
|
||||||
|
|
||||||
#if defined(__WIN95__)
|
|
||||||
SCROLLINFO info;
|
|
||||||
info.cbSize = sizeof(SCROLLINFO);
|
|
||||||
info.nPage = pageLength;
|
|
||||||
info.fMask = SIF_PAGE ;
|
|
||||||
|
|
||||||
::SetScrollInfo((HWND) GetHWND(), SB_CTL, &info, TRUE);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxScrollBar::SetObjectLength(int objectLength)
|
|
||||||
{
|
|
||||||
m_objectSize = objectLength;
|
|
||||||
|
|
||||||
// The range (number of scroll steps) is the
|
|
||||||
// object length minus the view size.
|
|
||||||
int range = wxMax((objectLength - m_viewSize), 0) ;
|
|
||||||
|
|
||||||
#if defined(__WIN95__)
|
|
||||||
// Try to adjust the range to cope with page size > 1
|
|
||||||
// (see comment for SetPageLength)
|
|
||||||
if ( m_pageSize > 1 )
|
|
||||||
{
|
|
||||||
range += (m_pageSize - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
SCROLLINFO info;
|
|
||||||
info.cbSize = sizeof(SCROLLINFO);
|
|
||||||
info.nPage = 0;
|
|
||||||
info.nMin = 0;
|
|
||||||
info.nMax = range;
|
|
||||||
info.nPos = 0;
|
|
||||||
info.fMask = SIF_RANGE ;
|
|
||||||
|
|
||||||
::SetScrollInfo((HWND) GetHWND(), SB_CTL, &info, TRUE);
|
|
||||||
#else
|
|
||||||
::SetScrollRange((HWND)m_hWnd, SB_CTL, 0, range, TRUE);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxScrollBar::SetViewLength(int viewLength)
|
|
||||||
{
|
|
||||||
m_viewSize = viewLength;
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxScrollBar::GetValues(int *viewStart, int *viewLength, int *objectLength,
|
|
||||||
int *pageLength) const
|
|
||||||
{
|
|
||||||
*viewStart = ::GetScrollPos((HWND)m_hWnd, SB_CTL);
|
|
||||||
*viewLength = m_viewSize;
|
|
||||||
*objectLength = m_objectSize;
|
|
||||||
*pageLength = m_pageSize;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
WXHBRUSH wxScrollBar::OnCtlColor(WXHDC WXUNUSED(pDC), WXHWND WXUNUSED(pWnd), WXUINT WXUNUSED(nCtlColor),
|
WXHBRUSH wxScrollBar::OnCtlColor(WXHDC WXUNUSED(pDC), WXHWND WXUNUSED(pWnd), WXUINT WXUNUSED(nCtlColor),
|
||||||
WXUINT WXUNUSED(message), WXWPARAM WXUNUSED(wParam), WXLPARAM WXUNUSED(lParam))
|
WXUINT WXUNUSED(message), WXWPARAM WXUNUSED(wParam), WXLPARAM WXUNUSED(lParam))
|
||||||
{
|
{
|
||||||
@@ -406,19 +330,4 @@ void wxScrollBar::Command(wxCommandEvent& event)
|
|||||||
ProcessCommand(event);
|
ProcessCommand(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
// Backward compatibility
|
|
||||||
void wxScrollBar::OnScroll(wxScrollEvent& event)
|
|
||||||
{
|
|
||||||
wxEventType oldEvent = event.GetEventType();
|
|
||||||
event.SetEventType( wxEVT_COMMAND_SCROLLBAR_UPDATED );
|
|
||||||
if ( !GetEventHandler()->ProcessEvent(event) )
|
|
||||||
{
|
|
||||||
event.SetEventType( oldEvent );
|
|
||||||
if (!GetParent()->GetEventHandler()->ProcessEvent(event))
|
|
||||||
event.Skip();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // wxUSE_SCROLLBAR
|
#endif // wxUSE_SCROLLBAR
|
||||||
|
@@ -728,12 +728,6 @@ void wxWindowMSW::WarpPointer (int x, int y)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
void wxWindowMSW::MSWDeviceToLogical (float *x, float *y) const
|
|
||||||
{
|
|
||||||
}
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// scrolling stuff
|
// scrolling stuff
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
@@ -744,48 +738,6 @@ static inline int wxDirToWinStyle(int orient)
|
|||||||
return orient == wxHORIZONTAL ? SB_HORZ : SB_VERT;
|
return orient == wxHORIZONTAL ? SB_HORZ : SB_VERT;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
void wxWindowMSW::SetScrollRange(int orient, int range, bool refresh)
|
|
||||||
{
|
|
||||||
int range1 = range;
|
|
||||||
|
|
||||||
// Try to adjust the range to cope with page size > 1
|
|
||||||
// - a Windows API quirk
|
|
||||||
int pageSize = GetScrollPage(orient);
|
|
||||||
if ( pageSize > 1 && range > 0)
|
|
||||||
{
|
|
||||||
range1 += (pageSize - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
WinStruct<SCROLLINFO> info;
|
|
||||||
info.nPage = pageSize; // Have to set this, or scrollbar goes awry
|
|
||||||
info.nMin = 0;
|
|
||||||
info.nMax = range1;
|
|
||||||
info.fMask = SIF_RANGE | SIF_PAGE;
|
|
||||||
|
|
||||||
HWND hWnd = GetHwnd();
|
|
||||||
if ( hWnd )
|
|
||||||
::SetScrollInfo(hWnd, wxDirToWinStyle(orient), &info, refresh);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxWindowMSW::SetScrollPage(int orient, int page, bool refresh)
|
|
||||||
{
|
|
||||||
WinStruct<SCROLLINFO> info;
|
|
||||||
info.nPage = page;
|
|
||||||
info.fMask = SIF_PAGE;
|
|
||||||
|
|
||||||
HWND hWnd = GetHwnd();
|
|
||||||
if ( hWnd )
|
|
||||||
::SetScrollInfo(hWnd, wxDirToWinStyle(orient), &info, refresh);
|
|
||||||
}
|
|
||||||
|
|
||||||
int wxWindowMSW::GetScrollPage(int orient) const
|
|
||||||
{
|
|
||||||
return orient == wxHORIZONTAL ? m_xThumbSize : m_yThumbSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
inline int GetScrollPosition(HWND hWnd, int wOrient)
|
inline int GetScrollPosition(HWND hWnd, int wOrient)
|
||||||
{
|
{
|
||||||
#ifdef __WXMICROWIN__
|
#ifdef __WXMICROWIN__
|
||||||
@@ -1192,37 +1144,6 @@ WXDWORD wxWindowMSW::MSWGetStyle(long flags, WXDWORD *exstyle) const
|
|||||||
return style;
|
return style;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
// If nothing defined for this, try the parent.
|
|
||||||
// E.g. we may be a button loaded from a resource, with no callback function
|
|
||||||
// defined.
|
|
||||||
void wxWindowMSW::OnCommand(wxWindow& win, wxCommandEvent& event)
|
|
||||||
{
|
|
||||||
if ( GetEventHandler()->ProcessEvent(event) )
|
|
||||||
return;
|
|
||||||
if ( m_parent )
|
|
||||||
m_parent->GetEventHandler()->OnCommand(win, event);
|
|
||||||
}
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
wxObject* wxWindowMSW::GetChild(int number) const
|
|
||||||
{
|
|
||||||
// Return a pointer to the Nth object in the Panel
|
|
||||||
wxNode *node = GetChildren().First();
|
|
||||||
int n = number;
|
|
||||||
while (node && n--)
|
|
||||||
node = node->Next();
|
|
||||||
if ( node )
|
|
||||||
{
|
|
||||||
wxObject *obj = (wxObject *)node->Data();
|
|
||||||
return(obj);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
// Setup background and foreground colours correctly
|
// Setup background and foreground colours correctly
|
||||||
void wxWindowMSW::SetupColours()
|
void wxWindowMSW::SetupColours()
|
||||||
{
|
{
|
||||||
@@ -1714,48 +1635,6 @@ void wxWindowMSW::GetTextExtent(const wxString& string,
|
|||||||
*externalLeading = tm.tmExternalLeading;
|
*externalLeading = tm.tmExternalLeading;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_CARET && WXWIN_COMPATIBILITY
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// Caret manipulation
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
void wxWindowMSW::CreateCaret(int w, int h)
|
|
||||||
{
|
|
||||||
SetCaret(new wxCaret(this, w, h));
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxWindowMSW::CreateCaret(const wxBitmap *WXUNUSED(bitmap))
|
|
||||||
{
|
|
||||||
wxFAIL_MSG("not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxWindowMSW::ShowCaret(bool show)
|
|
||||||
{
|
|
||||||
wxCHECK_RET( m_caret, "no caret to show" );
|
|
||||||
|
|
||||||
m_caret->Show(show);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxWindowMSW::DestroyCaret()
|
|
||||||
{
|
|
||||||
SetCaret(NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxWindowMSW::SetCaretPos(int x, int y)
|
|
||||||
{
|
|
||||||
wxCHECK_RET( m_caret, "no caret to move" );
|
|
||||||
|
|
||||||
m_caret->Move(x, y);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxWindowMSW::GetCaretPos(int *x, int *y) const
|
|
||||||
{
|
|
||||||
wxCHECK_RET( m_caret, "no caret to get position of" );
|
|
||||||
|
|
||||||
m_caret->GetPosition(x, y);
|
|
||||||
}
|
|
||||||
#endif // wxUSE_CARET
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// popup menu
|
// popup menu
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
@@ -383,10 +383,6 @@ bool wxBitmap::Create(
|
|||||||
}
|
}
|
||||||
SetHBITMAP((WXHBITMAP)hBmp);
|
SetHBITMAP((WXHBITMAP)hBmp);
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
GetBitmapData()->m_bOk = hBmp != 0;
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
|
|
||||||
return Ok();
|
return Ok();
|
||||||
} // end of wxBitmap::Create
|
} // end of wxBitmap::Create
|
||||||
|
|
||||||
@@ -1171,17 +1167,6 @@ void wxBitmap::SetQuality(
|
|||||||
GetBitmapData()->m_nQuality = nQ;
|
GetBitmapData()->m_nQuality = nQ;
|
||||||
} // end of wxBitmap::SetQuality
|
} // end of wxBitmap::SetQuality
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
|
||||||
void wxBitmap::SetOk(
|
|
||||||
bool bOk
|
|
||||||
)
|
|
||||||
{
|
|
||||||
EnsureHasData();
|
|
||||||
|
|
||||||
GetBitmapData()->m_bOk = bOk;
|
|
||||||
} // end of wxBitmap::SetOk
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2
|
|
||||||
|
|
||||||
void wxBitmap::SetPalette(
|
void wxBitmap::SetPalette(
|
||||||
const wxPalette& rPalette
|
const wxPalette& rPalette
|
||||||
)
|
)
|
||||||
|
@@ -103,20 +103,3 @@ void wxColour::Set (
|
|||||||
m_bIsInit = TRUE;
|
m_bIsInit = TRUE;
|
||||||
m_vPixel = OS2RGB (m_cRed, m_cGreen, m_cBlue);
|
m_vPixel = OS2RGB (m_cRed, m_cGreen, m_cBlue);
|
||||||
} // end of wxColour::Set
|
} // end of wxColour::Set
|
||||||
|
|
||||||
//
|
|
||||||
// Obsolete
|
|
||||||
//
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
void wxColour::Get (
|
|
||||||
unsigned char* pRed
|
|
||||||
, unsigned char* pGreen
|
|
||||||
, unsigned char* pBlue
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
*Red = m_cRed;
|
|
||||||
*Green = m_cGreen;
|
|
||||||
*Blue = m_cBlue;
|
|
||||||
} // end of wxColour::Get
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
@@ -35,10 +35,6 @@ END_EVENT_TABLE()
|
|||||||
// Item members
|
// Item members
|
||||||
wxControl::wxControl()
|
wxControl::wxControl()
|
||||||
{
|
{
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
m_callback = 0;
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
} // end of wxControl::wxControl
|
} // end of wxControl::wxControl
|
||||||
|
|
||||||
bool wxControl::Create(
|
bool wxControl::Create(
|
||||||
@@ -186,16 +182,6 @@ wxSize wxControl::DoGetBestSize() const
|
|||||||
|
|
||||||
bool wxControl::ProcessCommand(wxCommandEvent& event)
|
bool wxControl::ProcessCommand(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
if ( m_callback )
|
|
||||||
{
|
|
||||||
(void)(*m_callback)(this, event);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
return GetEventHandler()->ProcessEvent(event);
|
return GetEventHandler()->ProcessEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -691,81 +691,11 @@ void wxWindowOS2::WarpPointer(
|
|||||||
::WinSetPointerPos(HWND_DESKTOP, (LONG)nX, (LONG)(nY));
|
::WinSetPointerPos(HWND_DESKTOP, (LONG)nX, (LONG)(nY));
|
||||||
} // end of wxWindowOS2::WarpPointer
|
} // end of wxWindowOS2::WarpPointer
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
void wxWindowOS2::OS2DeviceToLogical (float *x, float *y) const
|
|
||||||
{
|
|
||||||
}
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// scrolling stuff
|
// scrolling stuff
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
void wxWindowOS2::SetScrollRange(
|
|
||||||
int nOrient
|
|
||||||
, int nRange
|
|
||||||
, bool bRefresh
|
|
||||||
)
|
|
||||||
{
|
|
||||||
int nRange1 = nRange;
|
|
||||||
int nPageSize = GetScrollPage(nOrient);
|
|
||||||
|
|
||||||
if (nPpageSize > 1 && nRange > 0)
|
|
||||||
{
|
|
||||||
nRange1 += (nPageSize - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (nOrient == wxHORIZONTAL)
|
|
||||||
{
|
|
||||||
::WinSendMsg(m_hWndScrollBarHorz, SBM_SETSCROLLBAR, (MPARAM)0, MPFROM2SHORT(0, (SHORT)nRange1));
|
|
||||||
::WinSendMsg(m_hWndScrollBarHorz, SBM_SETTHUMBSIZE, MPFROM2SHORT((SHORT)nThumbVisible, (SHORT)nRange1), (MPARAM)0);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
::WinSendMsg(m_hWndScrollBarVert, SBM_SETSCROLLBAR, (MPARAM)0, MPFROM2SHORT(0, (SHORT)nRange1));
|
|
||||||
::WinSendMsg(m_hWndScrollBarVert, SBM_SETTHUMBSIZE, MPFROM2SHORT((SHORT)nThumbVisible, (SHORT)nRange1), (MPARAM)0);
|
|
||||||
}
|
|
||||||
} // end of wxWindowOS2::SetScrollRange
|
|
||||||
|
|
||||||
void wxWindowOS2::SetScrollPage(
|
|
||||||
int nOrient
|
|
||||||
, int nPage
|
|
||||||
, bool bRefresh
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if (nOrient == wxHORIZONTAL )
|
|
||||||
m_nXThumbSize = nPage;
|
|
||||||
else
|
|
||||||
m_nYThumbSize = nPage;
|
|
||||||
} // end of wxWindowOS2::SetScrollPage
|
|
||||||
|
|
||||||
int wxWindowOS2::OldGetScrollRange(
|
|
||||||
int nOrient
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
MRESULT mRc;
|
|
||||||
HWND hWnd = GetHwnd();
|
|
||||||
|
|
||||||
if (hWnd)
|
|
||||||
{
|
|
||||||
mRc = WinSendMsg(hWnd, SBM_QUERYRANGE, (MPARAM)0L, (MPARAM)0L);
|
|
||||||
return(SHORT2FROMMR(mRc));
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
} // end of wxWindowOS2::OldGetScrollRange
|
|
||||||
|
|
||||||
int wxWindowOS2::GetScrollPage(
|
|
||||||
int nOrient
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
if (nOrient == wxHORIZONTAL)
|
|
||||||
return m_nXThumbSize;
|
|
||||||
else
|
|
||||||
return m_nYThumbSize;
|
|
||||||
} // end of wxWindowOS2::GetScrollPage
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
int wxWindowOS2::GetScrollPos(
|
int wxWindowOS2::GetScrollPos(
|
||||||
int nOrient
|
int nOrient
|
||||||
) const
|
) const
|
||||||
@@ -1277,43 +1207,6 @@ WXDWORD wxWindowOS2::Determine3DEffects(
|
|||||||
return dwStyle;
|
return dwStyle;
|
||||||
} // end of wxWindowOS2::Determine3DEffects
|
} // end of wxWindowOS2::Determine3DEffects
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
|
||||||
void wxWindowOS2::OnCommand(
|
|
||||||
wxWindow& rWin
|
|
||||||
, wxCommandEvent& rEvent
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if (GetEventHandler()->ProcessEvent(rEvent))
|
|
||||||
return;
|
|
||||||
if (m_parent)
|
|
||||||
m_parent->GetEventHandler()->OnCommand( rWin
|
|
||||||
,rEvent
|
|
||||||
);
|
|
||||||
} // end of wxWindowOS2::OnCommand
|
|
||||||
|
|
||||||
wxObject* wxWindowOS2::GetChild(
|
|
||||||
int nNumber
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
//
|
|
||||||
// Return a pointer to the Nth object in the Panel
|
|
||||||
//
|
|
||||||
wxNode* pNode = GetChildren().First();
|
|
||||||
int n = nNumber;
|
|
||||||
|
|
||||||
while (pNode && n--)
|
|
||||||
pNode = pNode->Next();
|
|
||||||
if (pNode)
|
|
||||||
{
|
|
||||||
wxObject* pObj = (wxObject*)pNode->Data();
|
|
||||||
return(pObj);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return NULL;
|
|
||||||
} // end of wxWindowOS2::GetChild
|
|
||||||
|
|
||||||
#endif // WXWIN_COMPATIBILITY
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Setup background and foreground colours correctly
|
// Setup background and foreground colours correctly
|
||||||
//
|
//
|
||||||
@@ -2137,67 +2030,6 @@ bool wxWindowOS2::IsMouseInWindow() const
|
|||||||
return hWnd != NULL;
|
return hWnd != NULL;
|
||||||
} // end of wxWindowOS2::IsMouseInWindow
|
} // end of wxWindowOS2::IsMouseInWindow
|
||||||
|
|
||||||
#if wxUSE_CARET && WXWIN_COMPATIBILITY
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// Caret manipulation
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
void wxWindowOS2::CreateCaret(
|
|
||||||
int nWidth
|
|
||||||
, int nHeight
|
|
||||||
)
|
|
||||||
{
|
|
||||||
SetCaret(new wxCaret( this
|
|
||||||
,nWidth
|
|
||||||
,nHeight
|
|
||||||
));
|
|
||||||
} // end of wxWindowOS2::CreateCaret
|
|
||||||
|
|
||||||
void wxWindowOS2::CreateCaret(
|
|
||||||
const wxBitmap* pBitmap
|
|
||||||
)
|
|
||||||
{
|
|
||||||
wxFAIL_MSG("not implemented");
|
|
||||||
} // end of wxWindowOS2::CreateCaret
|
|
||||||
|
|
||||||
void wxWindowOS2::ShowCaret(
|
|
||||||
bool bShow
|
|
||||||
)
|
|
||||||
{
|
|
||||||
wxCHECK_RET( m_caret, "no caret to show" );
|
|
||||||
|
|
||||||
m_caret->Show(bShow);
|
|
||||||
} // end of wxWindowOS2::ShowCaret
|
|
||||||
|
|
||||||
void wxWindowOS2::DestroyCaret()
|
|
||||||
{
|
|
||||||
SetCaret(NULL);
|
|
||||||
} // end of wxWindowOS2::DestroyCaret
|
|
||||||
|
|
||||||
void wxWindowOS2::SetCaretPos(
|
|
||||||
int nX
|
|
||||||
, int nY)
|
|
||||||
{
|
|
||||||
wxCHECK_RET( m_caret, "no caret to move" );
|
|
||||||
|
|
||||||
m_caret->Move( nX
|
|
||||||
,nY
|
|
||||||
);
|
|
||||||
} // end of wxWindowOS2::SetCaretPos
|
|
||||||
|
|
||||||
void wxWindowOS2::GetCaretPos(
|
|
||||||
int* pX
|
|
||||||
, int* pY
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
wxCHECK_RET( m_caret, "no caret to get position of" );
|
|
||||||
|
|
||||||
m_caret->GetPosition( pX
|
|
||||||
,pY
|
|
||||||
);
|
|
||||||
} // end of wxWindowOS2::GetCaretPos
|
|
||||||
|
|
||||||
#endif //wxUSE_CARET
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// popup menu
|
// popup menu
|
||||||
|
Reference in New Issue
Block a user