Allow headers to be compiled in Objective-C++ mode

Changed id to one of:
winid   Window IDs and event system
itemid  Menu items
toolid  Toolbar items


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19647 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Elliott 2003-03-21 02:58:55 +00:00
parent 6f87d5542d
commit d9e2e4c242
12 changed files with 249 additions and 249 deletions

View File

@ -68,8 +68,8 @@ typedef int wxEventType;
#if WXWIN_COMPATIBILITY_EVENT_TYPES
#define DECLARE_EVENT_TABLE_ENTRY(type, id, idLast, fn, obj) \
{ type, id, idLast, fn, obj }
#define DECLARE_EVENT_TABLE_ENTRY(type, winid, idLast, fn, obj) \
{ type, winid, idLast, fn, obj }
#define BEGIN_DECLARE_EVENT_TYPES() enum {
#define END_DECLARE_EVENT_TYPES() };
@ -81,8 +81,8 @@ typedef int wxEventType;
#else // !WXWIN_COMPATIBILITY_EVENT_TYPES
#define DECLARE_EVENT_TABLE_ENTRY(type, id, idLast, fn, obj) \
wxEventTableEntry(type, id, idLast, fn, obj)
#define DECLARE_EVENT_TABLE_ENTRY(type, winid, idLast, fn, obj) \
wxEventTableEntry(type, winid, idLast, fn, obj)
#define BEGIN_DECLARE_EVENT_TYPES()
#define END_DECLARE_EVENT_TYPES()
@ -344,7 +344,7 @@ protected:
wxEvent(const wxEvent&); // for implementing Clone()
public:
wxEvent(int id = 0, wxEventType commandType = wxEVT_NULL );
wxEvent(int winid = 0, wxEventType commandType = wxEVT_NULL );
void SetEventType(wxEventType typ) { m_eventType = typ; }
wxEventType GetEventType() const { return m_eventType; }
@ -411,7 +411,7 @@ private:
wxCommandEvent& operator=(const wxCommandEvent& event);
public:
wxCommandEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
wxCommandEvent(wxEventType commandType = wxEVT_NULL, int winid = 0);
wxCommandEvent(const wxCommandEvent& event)
: wxEvent(event),
@ -471,8 +471,8 @@ private:
class WXDLLEXPORT wxNotifyEvent : public wxCommandEvent
{
public:
wxNotifyEvent(wxEventType commandType = wxEVT_NULL, int id = 0)
: wxCommandEvent(commandType, id)
wxNotifyEvent(wxEventType commandType = wxEVT_NULL, int winid = 0)
: wxCommandEvent(commandType, winid)
{ m_bAllow = TRUE; }
wxNotifyEvent(const wxNotifyEvent& event)
@ -515,7 +515,7 @@ class WXDLLEXPORT wxScrollEvent : public wxCommandEvent
{
public:
wxScrollEvent(wxEventType commandType = wxEVT_NULL,
int id = 0, int pos = 0, int orient = 0);
int winid = 0, int pos = 0, int orient = 0);
int GetOrientation() const { return (int) m_extraLong ; }
int GetPosition() const { return m_commandInt ; }
@ -926,8 +926,8 @@ class WXDLLEXPORT wxSizeEvent : public wxEvent
public:
wxSizeEvent() : wxEvent(0, wxEVT_SIZE)
{ }
wxSizeEvent(const wxSize& sz, int id = 0)
: wxEvent(id, wxEVT_SIZE),
wxSizeEvent(const wxSize& sz, int winid = 0)
: wxEvent(winid, wxEVT_SIZE),
m_size(sz)
{ }
wxSizeEvent(const wxSizeEvent & event)
@ -958,8 +958,8 @@ public:
wxMoveEvent()
: wxEvent(0, wxEVT_MOVE)
{ }
wxMoveEvent(const wxPoint& pos, int id = 0)
: wxEvent(id, wxEVT_MOVE),
wxMoveEvent(const wxPoint& pos, int winid = 0)
: wxEvent(winid, wxEVT_MOVE),
m_pos(pos)
{ }
wxMoveEvent(const wxMoveEvent& event)
@ -1017,8 +1017,8 @@ private:
class WXDLLEXPORT wxNcPaintEvent : public wxEvent
{
public:
wxNcPaintEvent(int id = 0)
: wxEvent(id, wxEVT_NC_PAINT)
wxNcPaintEvent(int winid = 0)
: wxEvent(winid, wxEVT_NC_PAINT)
{ }
virtual wxEvent *Clone() const { return new wxNcPaintEvent(*this); }
@ -1070,8 +1070,8 @@ private:
wxFocusEvent& operator=(const wxFocusEvent& event);
public:
wxFocusEvent(wxEventType type = wxEVT_NULL, int id = 0)
: wxEvent(id, type)
wxFocusEvent(wxEventType type = wxEVT_NULL, int winid = 0)
: wxEvent(winid, type)
{ m_win = NULL; }
wxFocusEvent(const wxFocusEvent& event)
@ -1163,9 +1163,9 @@ private:
class WXDLLEXPORT wxMenuEvent : public wxEvent
{
public:
wxMenuEvent(wxEventType type = wxEVT_NULL, int id = 0)
: wxEvent(id, type)
{ m_menuId = id; }
wxMenuEvent(wxEventType type = wxEVT_NULL, int winid = 0)
: wxEvent(winid, type)
{ m_menuId = winid; }
wxMenuEvent(const wxMenuEvent & event)
: wxEvent(event)
{ m_menuId = event.m_menuId; }
@ -1194,8 +1194,8 @@ private:
class WXDLLEXPORT wxCloseEvent : public wxEvent
{
public:
wxCloseEvent(wxEventType type = wxEVT_NULL, int id = 0)
: wxEvent(id, type),
wxCloseEvent(wxEventType type = wxEVT_NULL, int winid = 0)
: wxEvent(winid, type),
m_loggingOff(TRUE),
m_veto(FALSE), // should be FALSE by default
m_canVeto(TRUE)
@ -1261,8 +1261,8 @@ private:
class WXDLLEXPORT wxShowEvent : public wxEvent
{
public:
wxShowEvent(int id = 0, bool show = FALSE)
: wxEvent(id, wxEVT_SHOW)
wxShowEvent(int winid = 0, bool show = FALSE)
: wxEvent(winid, wxEVT_SHOW)
{ m_show = show; }
wxShowEvent(const wxShowEvent & event)
: wxEvent(event)
@ -1287,8 +1287,8 @@ private:
class WXDLLEXPORT wxIconizeEvent : public wxEvent
{
public:
wxIconizeEvent(int id = 0, bool iconized = TRUE)
: wxEvent(id, wxEVT_ICONIZE)
wxIconizeEvent(int winid = 0, bool iconized = TRUE)
: wxEvent(winid, wxEVT_ICONIZE)
{ m_iconized = iconized; }
wxIconizeEvent(const wxIconizeEvent & event)
: wxEvent(event)
@ -1312,8 +1312,8 @@ private:
class WXDLLEXPORT wxMaximizeEvent : public wxEvent
{
public:
wxMaximizeEvent(int id = 0)
: wxEvent(id, wxEVT_MAXIMIZE)
wxMaximizeEvent(int winid = 0)
: wxEvent(winid, wxEVT_MAXIMIZE)
{ }
virtual wxEvent *Clone() const { return new wxMaximizeEvent(*this); }
@ -1555,8 +1555,8 @@ private:
wxMouseCaptureChangedEvent operator=(const wxMouseCaptureChangedEvent& event);
public:
wxMouseCaptureChangedEvent(wxWindowID id = 0, wxWindow* gainedCapture = NULL)
: wxEvent(id, wxEVT_MOUSE_CAPTURE_CHANGED),
wxMouseCaptureChangedEvent(wxWindowID winid = 0, wxWindow* gainedCapture = NULL)
: wxEvent(winid, wxEVT_MOUSE_CAPTURE_CHANGED),
m_gainedCapture(gainedCapture)
{ }
@ -1600,8 +1600,8 @@ private:
wxPaletteChangedEvent& operator=(const wxPaletteChangedEvent& event);
public:
wxPaletteChangedEvent(wxWindowID id = 0)
: wxEvent(id, wxEVT_PALETTE_CHANGED),
wxPaletteChangedEvent(wxWindowID winid = 0)
: wxEvent(winid, wxEVT_PALETTE_CHANGED),
m_changedWindow((wxWindow *) NULL)
{ }
@ -1630,8 +1630,8 @@ private:
class WXDLLEXPORT wxQueryNewPaletteEvent : public wxEvent
{
public:
wxQueryNewPaletteEvent(wxWindowID id = 0)
: wxEvent(id, wxEVT_QUERY_NEW_PALETTE),
wxQueryNewPaletteEvent(wxWindowID winid = 0)
: wxEvent(winid, wxEVT_QUERY_NEW_PALETTE),
m_paletteRealized(FALSE)
{ }
wxQueryNewPaletteEvent(const wxQueryNewPaletteEvent & event)
@ -1764,9 +1764,9 @@ class WXDLLEXPORT wxHelpEvent : public wxCommandEvent
{
public:
wxHelpEvent(wxEventType type = wxEVT_NULL,
wxWindowID id = 0,
wxWindowID winid = 0,
const wxPoint& pt = wxDefaultPosition)
: wxCommandEvent(type, id),
: wxCommandEvent(type, winid),
m_pos(pt), m_target(), m_link()
{ }
wxHelpEvent(const wxHelpEvent & event)
@ -1811,9 +1811,9 @@ class WXDLLEXPORT wxContextMenuEvent : public wxCommandEvent
{
public:
wxContextMenuEvent(wxEventType type = wxEVT_NULL,
wxWindowID id = 0,
wxWindowID winid = 0,
const wxPoint& pt = wxDefaultPosition)
: wxCommandEvent(type, id),
: wxCommandEvent(type, winid),
m_pos(pt)
{ }
wxContextMenuEvent(const wxContextMenuEvent & event)
@ -1910,9 +1910,9 @@ private:
wxEventTableEntryBase& operator=(const wxEventTableEntryBase& event);
public:
wxEventTableEntryBase(int id, int idLast,
wxEventTableEntryBase(int winid, int idLast,
wxObjectEventFunction fn, wxObject *data)
: m_id(id),
: m_id(winid),
m_lastId(idLast),
m_fn(fn),
m_callbackUserData(data)
@ -1940,9 +1940,9 @@ public:
// an entry from a static event table
struct WXDLLEXPORT wxEventTableEntry : public wxEventTableEntryBase
{
wxEventTableEntry(const int& evType, int id, int idLast,
wxEventTableEntry(const int& evType, int winid, int idLast,
wxObjectEventFunction fn, wxObject *data)
: wxEventTableEntryBase(id, idLast, fn, data),
: wxEventTableEntryBase(winid, idLast, fn, data),
m_eventType(evType)
{ }
@ -1958,9 +1958,9 @@ struct WXDLLEXPORT wxEventTableEntry : public wxEventTableEntryBase
// an entry used in dynamic event table managed by wxEvtHandler::Connect()
struct WXDLLEXPORT wxDynamicEventTableEntry : public wxEventTableEntryBase
{
wxDynamicEventTableEntry(int evType, int id, int idLast,
wxDynamicEventTableEntry(int evType, int winid, int idLast,
wxObjectEventFunction fn, wxObject *data)
: wxEventTableEntryBase(id, idLast, fn, data),
: wxEventTableEntryBase(winid, idLast, fn, data),
m_eventType(evType)
{ }
@ -2014,26 +2014,26 @@ public:
#endif
// Dynamic association of a member function handler with the event handler,
// id and event type
void Connect( int id, int lastId, int eventType,
// winid and event type
void Connect( int winid, int lastId, int eventType,
wxObjectEventFunction func,
wxObject *userData = (wxObject *) NULL );
// Convenience function: take just one id
void Connect( int id, int eventType,
void Connect( int winid, int eventType,
wxObjectEventFunction func,
wxObject *userData = (wxObject *) NULL )
{ Connect(id, wxID_ANY, eventType, func, userData); }
{ Connect(winid, wxID_ANY, eventType, func, userData); }
bool Disconnect( int id, int lastId, wxEventType eventType,
bool Disconnect( int winid, int lastId, wxEventType eventType,
wxObjectEventFunction func = NULL,
wxObject *userData = (wxObject *) NULL );
// Convenience function: take just one id
bool Disconnect( int id, wxEventType eventType = wxEVT_NULL,
bool Disconnect( int winid, wxEventType eventType = wxEVT_NULL,
wxObjectEventFunction func = NULL,
wxObject *userData = (wxObject *) NULL )
{ return Disconnect(id, wxID_ANY, eventType, func, userData); }
{ return Disconnect(winid, wxID_ANY, eventType, func, userData); }
// User data can be associated with each wxEvtHandler
@ -2193,7 +2193,7 @@ typedef void (wxEvtHandler::*wxMouseCaptureChangedEventFunction)(wxMouseCaptureC
*/
// Generic events
#define EVT_CUSTOM(event, id, func) DECLARE_EVENT_TABLE_ENTRY( event, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) & func, (wxObject *) NULL ),
#define EVT_CUSTOM(event, winid, func) DECLARE_EVENT_TABLE_ENTRY( event, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) & func, (wxObject *) NULL ),
#define EVT_CUSTOM_RANGE(event, id1, id2, func) DECLARE_EVENT_TABLE_ENTRY( event, id1, id2, (wxObjectEventFunction) (wxEventFunction) & func, (wxObject *) NULL ),
// Miscellaneous
@ -2211,7 +2211,7 @@ typedef void (wxEvtHandler::*wxMouseCaptureChangedEventFunction)(wxMouseCaptureC
#define EVT_CHAR_HOOK(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_CHAR_HOOK, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCharEventFunction) & func, NULL ),
#define EVT_MENU_OPEN(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MENU_OPEN, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxMenuEventFunction) & func, (wxObject *) NULL ),
#define EVT_MENU_CLOSE(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MENU_CLOSE, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxMenuEventFunction) & func, (wxObject *) NULL ),
#define EVT_MENU_HIGHLIGHT(id, func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MENU_HIGHLIGHT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxMenuEventFunction) & func, (wxObject *) NULL ),
#define EVT_MENU_HIGHLIGHT(winid, func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MENU_HIGHLIGHT, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxMenuEventFunction) & func, (wxObject *) NULL ),
#define EVT_MENU_HIGHLIGHT_ALL(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MENU_HIGHLIGHT, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxMenuEventFunction) & func, (wxObject *) NULL ),
#define EVT_SET_FOCUS(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SET_FOCUS, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxFocusEventFunction) & func, (wxObject *) NULL ),
#define EVT_KILL_FOCUS(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_KILL_FOCUS, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxFocusEventFunction) & func, (wxObject *) NULL ),
@ -2267,7 +2267,7 @@ typedef void (wxEvtHandler::*wxMouseCaptureChangedEventFunction)(wxMouseCaptureC
DECLARE_EVENT_TABLE_ENTRY( wxEVT_MOUSEWHEEL, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL ),
// EVT_COMMAND
#define EVT_COMMAND(id, event, fn) DECLARE_EVENT_TABLE_ENTRY( event, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_COMMAND(winid, event, fn) DECLARE_EVENT_TABLE_ENTRY( event, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_COMMAND_RANGE(id1, id2, event, fn) DECLARE_EVENT_TABLE_ENTRY( event, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
// Scrolling from wxWindow (sent to wxScrolledWindow)
@ -2313,57 +2313,57 @@ typedef void (wxEvtHandler::*wxMouseCaptureChangedEventFunction)(wxMouseCaptureC
#define EVT_SCROLL_ENDSCROLL(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_ENDSCROLL, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
// Scrolling from wxSlider and wxScrollBar, with an id
#define EVT_COMMAND_SCROLL(id, func) \
DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_TOP, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\
DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_BOTTOM, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\
DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_LINEUP, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\
DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_LINEDOWN, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\
DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_PAGEUP, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\
DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_PAGEDOWN, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\
DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_THUMBTRACK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\
DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_THUMBRELEASE, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ), \
DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_ENDSCROLL, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_COMMAND_SCROLL(winid, func) \
DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_TOP, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\
DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_BOTTOM, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\
DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_LINEUP, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\
DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_LINEDOWN, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\
DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_PAGEUP, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\
DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_PAGEDOWN, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\
DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_THUMBTRACK, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),\
DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_THUMBRELEASE, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ), \
DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_ENDSCROLL, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_COMMAND_SCROLL_TOP(id, func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_TOP, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_COMMAND_SCROLL_BOTTOM(id, func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_BOTTOM, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_COMMAND_SCROLL_LINEUP(id, func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_LINEUP, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_COMMAND_SCROLL_LINEDOWN(id, func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_LINEDOWN, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_COMMAND_SCROLL_PAGEUP(id, func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_PAGEUP, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_COMMAND_SCROLL_PAGEDOWN(id, func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_PAGEDOWN, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_COMMAND_SCROLL_THUMBTRACK(id, func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_THUMBTRACK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_COMMAND_SCROLL_THUMBRELEASE(id, func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_THUMBRELEASE, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_COMMAND_SCROLL_ENDSCROLL(id, func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_ENDSCROLL, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_COMMAND_SCROLL_TOP(winid, func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_TOP, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_COMMAND_SCROLL_BOTTOM(winid, func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_BOTTOM, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_COMMAND_SCROLL_LINEUP(winid, func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_LINEUP, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_COMMAND_SCROLL_LINEDOWN(winid, func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_LINEDOWN, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_COMMAND_SCROLL_PAGEUP(winid, func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_PAGEUP, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_COMMAND_SCROLL_PAGEDOWN(winid, func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_PAGEDOWN, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_COMMAND_SCROLL_THUMBTRACK(winid, func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_THUMBTRACK, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_COMMAND_SCROLL_THUMBRELEASE(winid, func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_THUMBRELEASE, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
#define EVT_COMMAND_SCROLL_ENDSCROLL(winid, func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_ENDSCROLL, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL ),
// Convenience macros for commonly-used commands
#define EVT_BUTTON(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_BUTTON_CLICKED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_CHECKBOX(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_CHECKBOX_CLICKED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_CHOICE(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_CHOICE_SELECTED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_LISTBOX(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LISTBOX_SELECTED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_LISTBOX_DCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_MENU(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_MENU_SELECTED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_BUTTON(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_BUTTON_CLICKED, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_CHECKBOX(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_CHECKBOX_CLICKED, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_CHOICE(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_CHOICE_SELECTED, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_LISTBOX(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LISTBOX_SELECTED, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_LISTBOX_DCLICK(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_MENU(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_MENU_SELECTED, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_MENU_RANGE(id1, id2, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_MENU_SELECTED, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_SLIDER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_SLIDER_UPDATED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_RADIOBOX(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RADIOBOX_SELECTED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_RADIOBUTTON(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RADIOBUTTON_SELECTED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_SLIDER(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_SLIDER_UPDATED, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_RADIOBOX(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RADIOBOX_SELECTED, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_RADIOBUTTON(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RADIOBUTTON_SELECTED, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
// EVT_SCROLLBAR is now obsolete since we use EVT_COMMAND_SCROLL... events
#define EVT_SCROLLBAR(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_SCROLLBAR_UPDATED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_VLBOX(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_VLBOX_SELECTED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_COMBOBOX(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_COMBOBOX_SELECTED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_TOOL(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TOOL_CLICKED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_SCROLLBAR(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_SCROLLBAR_UPDATED, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_VLBOX(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_VLBOX_SELECTED, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_COMBOBOX(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_COMBOBOX_SELECTED, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_TOOL(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TOOL_CLICKED, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_TOOL_RANGE(id1, id2, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TOOL_CLICKED, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_TOOL_RCLICKED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TOOL_RCLICKED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_TOOL_RCLICKED(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TOOL_RCLICKED, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_TOOL_RCLICKED_RANGE(id1, id2, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TOOL_RCLICKED, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_TOOL_ENTER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TOOL_ENTER, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_CHECKLISTBOX(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_TOOL_ENTER(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TOOL_ENTER, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_CHECKLISTBOX(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
// Generic command events
#define EVT_COMMAND_LEFT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LEFT_CLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_COMMAND_LEFT_DCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LEFT_DCLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_COMMAND_RIGHT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RIGHT_CLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_COMMAND_RIGHT_DCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RIGHT_DCLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_COMMAND_SET_FOCUS(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_SET_FOCUS, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_COMMAND_KILL_FOCUS(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_KILL_FOCUS, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_COMMAND_ENTER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_ENTER, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_COMMAND_LEFT_CLICK(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LEFT_CLICK, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_COMMAND_LEFT_DCLICK(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LEFT_DCLICK, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_COMMAND_RIGHT_CLICK(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RIGHT_CLICK, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_COMMAND_RIGHT_DCLICK(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RIGHT_DCLICK, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_COMMAND_SET_FOCUS(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_SET_FOCUS, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_COMMAND_KILL_FOCUS(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_KILL_FOCUS, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
#define EVT_COMMAND_ENTER(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_ENTER, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
// Joystick events
@ -2394,20 +2394,20 @@ typedef void (wxEvtHandler::*wxMouseCaptureChangedEventFunction)(wxMouseCaptureC
DECLARE_EVENT_TABLE_ENTRY( wxEVT_IDLE, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxIdleEventFunction) & func, (wxObject *) NULL ),
// Update UI event
#define EVT_UPDATE_UI(id, func) \
DECLARE_EVENT_TABLE_ENTRY( wxEVT_UPDATE_UI, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxUpdateUIEventFunction) & func, (wxObject *) NULL ),
#define EVT_UPDATE_UI(winid, func) \
DECLARE_EVENT_TABLE_ENTRY( wxEVT_UPDATE_UI, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxUpdateUIEventFunction) & func, (wxObject *) NULL ),
#define EVT_UPDATE_UI_RANGE(id1, id2, func) \
DECLARE_EVENT_TABLE_ENTRY( wxEVT_UPDATE_UI, id1, id2, (wxObjectEventFunction)(wxEventFunction)(wxUpdateUIEventFunction)&func, (wxObject *) NULL ),
// Help events
#define EVT_HELP(id, func) \
DECLARE_EVENT_TABLE_ENTRY( wxEVT_HELP, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxHelpEventFunction) & func, (wxObject *) NULL ),
#define EVT_HELP(winid, func) \
DECLARE_EVENT_TABLE_ENTRY( wxEVT_HELP, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxHelpEventFunction) & func, (wxObject *) NULL ),
#define EVT_HELP_RANGE(id1, id2, func) \
DECLARE_EVENT_TABLE_ENTRY( wxEVT_HELP, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxHelpEventFunction) & func, (wxObject *) NULL ),
#define EVT_DETAILED_HELP(id, func) \
DECLARE_EVENT_TABLE_ENTRY( wxEVT_DETAILED_HELP, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxHelpEventFunction) & func, (wxObject *) NULL ),
#define EVT_DETAILED_HELP(winid, func) \
DECLARE_EVENT_TABLE_ENTRY( wxEVT_DETAILED_HELP, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxHelpEventFunction) & func, (wxObject *) NULL ),
#define EVT_DETAILED_HELP_RANGE(id1, id2, func) \
DECLARE_EVENT_TABLE_ENTRY( wxEVT_DETAILED_HELP, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxHelpEventFunction) & func, (wxObject *) NULL ),

View File

@ -52,7 +52,7 @@ public:
virtual ~wxFrameBase();
wxFrame *New(wxWindow *parent,
wxWindowID id,
wxWindowID winid,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
@ -83,11 +83,11 @@ public:
#ifdef WXWIN_COMPATIBILITY_2_2
// call this to simulate a menu command
bool Command(int id) { return ProcessCommand(id); }
bool Command(int winid) { return ProcessCommand(winid); }
#endif // WXWIN_COMPATIBILITY_2_2
// process menu command: returns TRUE if processed
bool ProcessCommand(int id);
bool ProcessCommand(int winid);
// status bar functions
// --------------------
@ -95,13 +95,13 @@ public:
// create the main status bar by calling OnCreateStatusBar()
virtual wxStatusBar* CreateStatusBar(int number = 1,
long style = wxST_SIZEGRIP,
wxWindowID id = 0,
wxWindowID winid = 0,
const wxString& name =
wxStatusLineNameStr);
// return a new status bar
virtual wxStatusBar *OnCreateStatusBar(int number,
long style,
wxWindowID id,
wxWindowID winid,
const wxString& name);
// get the main status bar
virtual wxStatusBar *GetStatusBar() const { return m_frameStatusBar; }
@ -125,11 +125,11 @@ public:
#if wxUSE_TOOLBAR
// create main toolbar bycalling OnCreateToolBar()
virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER|wxTB_HORIZONTAL,
wxWindowID id = -1,
wxWindowID winid = -1,
const wxString& name = wxToolBarNameStr);
// return a new toolbar
virtual wxToolBar *OnCreateToolBar(long style,
wxWindowID id,
wxWindowID winid,
const wxString& name );
// get/set the main toolbar
@ -198,7 +198,7 @@ protected:
// show the help string for this menu item in the given status bar: the
// status bar pointer can be NULL; return TRUE if help was shown
bool ShowMenuHelp(wxStatusBar *statbar, int id);
bool ShowMenuHelp(wxStatusBar *statbar, int helpid);
wxStatusBar *m_frameStatusBar;
#endif // wxUSE_STATUSBAR

View File

@ -50,7 +50,7 @@ public:
// Constructor
wxPanel(wxWindow *parent,
wxWindowID id = -1,
wxWindowID winid = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
@ -58,11 +58,11 @@ public:
{
Init();
Create(parent, id, pos, size, style, name);
Create(parent, winid, pos, size, style, name);
}
// Pseudo ctor
bool Create(wxWindow *parent, wxWindowID id,
bool Create(wxWindow *parent, wxWindowID winid,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTAB_TRAVERSAL | wxNO_BORDER,

View File

@ -27,7 +27,7 @@ class WXDLLEXPORT wxStatusBarGeneric : public wxStatusBarBase
public:
wxStatusBarGeneric() { Init(); }
wxStatusBarGeneric(wxWindow *parent,
wxWindowID id,
wxWindowID winid,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
@ -35,30 +35,30 @@ public:
{
Init();
Create(parent, id, pos, size, style, name);
Create(parent, winid, pos, size, style, name);
}
wxStatusBarGeneric(wxWindow *parent,
wxWindowID id,
wxWindowID winid,
long style,
const wxString& name = wxPanelNameStr)
{
Init();
Create(parent, id, style, name);
Create(parent, winid, style, name);
}
virtual ~wxStatusBarGeneric();
bool Create(wxWindow *parent, wxWindowID id,
bool Create(wxWindow *parent, wxWindowID winid,
const wxPoint& WXUNUSED(pos) = wxDefaultPosition,
const wxSize& WXUNUSED(size) = wxDefaultSize,
long style = 0,
const wxString& name = wxPanelNameStr)
{
return Create(parent, id, style, name);
return Create(parent, winid, style, name);
}
bool Create(wxWindow *parent, wxWindowID id,
bool Create(wxWindow *parent, wxWindowID winid,
long style,
const wxString& name = wxPanelNameStr);

View File

@ -76,40 +76,40 @@ public:
// -----------------
// append any kind of item (normal/check/radio/separator)
void Append(int id,
void Append(int itemid,
const wxString& text,
const wxString& help = wxEmptyString,
wxItemKind kind = wxITEM_NORMAL)
{
DoAppend(wxMenuItem::New((wxMenu *)this, id, text, help, kind));
DoAppend(wxMenuItem::New((wxMenu *)this, itemid, text, help, kind));
}
// append a separator to the menu
void AppendSeparator() { Append(wxID_SEPARATOR, wxEmptyString); }
// append a check item
void AppendCheckItem(int id,
void AppendCheckItem(int itemid,
const wxString& text,
const wxString& help = wxEmptyString)
{
Append(id, text, help, wxITEM_CHECK);
Append(itemid, text, help, wxITEM_CHECK);
}
// append a radio item
void AppendRadioItem(int id,
void AppendRadioItem(int itemid,
const wxString& text,
const wxString& help = wxEmptyString)
{
Append(id, text, help, wxITEM_RADIO);
Append(itemid, text, help, wxITEM_RADIO);
}
// append a submenu
void Append(int id,
void Append(int itemid,
const wxString& text,
wxMenu *submenu,
const wxString& help = wxEmptyString)
{
DoAppend(wxMenuItem::New((wxMenu *)this, id, text, help,
DoAppend(wxMenuItem::New((wxMenu *)this, itemid, text, help,
wxITEM_NORMAL, submenu));
}
@ -125,12 +125,12 @@ public:
// insert an item before given position
void Insert(size_t pos,
int id,
int itemid,
const wxString& text,
const wxString& help = wxEmptyString,
wxItemKind kind = wxITEM_NORMAL)
{
Insert(pos, wxMenuItem::New((wxMenu *)this, id, text, help, kind));
Insert(pos, wxMenuItem::New((wxMenu *)this, itemid, text, help, kind));
}
// insert a separator
@ -141,30 +141,30 @@ public:
// insert a check item
void InsertCheckItem(size_t pos,
int id,
int itemid,
const wxString& text,
const wxString& help = wxEmptyString)
{
Insert(pos, id, text, help, wxITEM_CHECK);
Insert(pos, itemid, text, help, wxITEM_CHECK);
}
// insert a radio item
void InsertRadioItem(size_t pos,
int id,
int itemid,
const wxString& text,
const wxString& help = wxEmptyString)
{
Insert(pos, id, text, help, wxITEM_RADIO);
Insert(pos, itemid, text, help, wxITEM_RADIO);
}
// insert a submenu
void Insert(size_t pos,
int id,
int itemid,
const wxString& text,
wxMenu *submenu,
const wxString& help = wxEmptyString)
{
Insert(pos, wxMenuItem::New((wxMenu *)this, id, text, help,
Insert(pos, wxMenuItem::New((wxMenu *)this, itemid, text, help,
wxITEM_NORMAL, submenu));
}
@ -175,12 +175,12 @@ public:
}
// prepend any item to the menu
void Prepend(int id,
void Prepend(int itemid,
const wxString& text,
const wxString& help = wxEmptyString,
wxItemKind kind = wxITEM_NORMAL)
{
Insert(0u, id, text, help, kind);
Insert(0u, itemid, text, help, kind);
}
// prepend a separator
@ -190,43 +190,43 @@ public:
}
// prepend a check item
void PrependCheckItem(int id,
void PrependCheckItem(int itemid,
const wxString& text,
const wxString& help = wxEmptyString)
{
InsertCheckItem(0u, id, text, help);
InsertCheckItem(0u, itemid, text, help);
}
// prepend a radio item
void PrependRadioItem(int id,
void PrependRadioItem(int itemid,
const wxString& text,
const wxString& help = wxEmptyString)
{
InsertRadioItem(0u, id, text, help);
InsertRadioItem(0u, itemid, text, help);
}
// prepend a submenu
void Prepend(int id,
void Prepend(int itemid,
const wxString& text,
wxMenu *submenu,
const wxString& help = wxEmptyString)
{
Insert(0u, id, text, submenu, help);
Insert(0u, itemid, text, submenu, help);
}
// detach an item from the menu, but don't delete it so that it can be
// added back later (but if it's not, the caller is responsible for
// deleting it!)
wxMenuItem *Remove(int id) { return Remove(FindChildItem(id)); }
wxMenuItem *Remove(int itemid) { return Remove(FindChildItem(itemid)); }
wxMenuItem *Remove(wxMenuItem *item);
// delete an item from the menu (submenus are not destroyed by this
// function, see Destroy)
bool Delete(int id) { return Delete(FindChildItem(id)); }
bool Delete(int itemid) { return Delete(FindChildItem(itemid)); }
bool Delete(wxMenuItem *item);
// delete the item from menu and destroy it (if it's a submenu)
bool Destroy(int id) { return Destroy(FindChildItem(id)); }
bool Destroy(int itemid) { return Destroy(FindChildItem(itemid)); }
bool Destroy(wxMenuItem *item);
// menu items access
@ -240,20 +240,20 @@ public:
// search
virtual int FindItem(const wxString& item) const;
wxMenuItem* FindItem(int id, wxMenu **menu = NULL) const;
wxMenuItem* FindItem(int itemid, wxMenu **menu = NULL) const;
// get/set items attributes
void Enable(int id, bool enable);
bool IsEnabled(int id) const;
void Enable(int itemid, bool enable);
bool IsEnabled(int itemid) const;
void Check(int id, bool check);
bool IsChecked(int id) const;
void Check(int itemid, bool check);
bool IsChecked(int itemid) const;
void SetLabel(int id, const wxString& label);
wxString GetLabel(int id) const;
void SetLabel(int itemid, const wxString& label);
wxString GetLabel(int itemid) const;
virtual void SetHelpString(int id, const wxString& helpString);
virtual wxString GetHelpString(int id) const;
virtual void SetHelpString(int itemid, const wxString& helpString);
virtual wxString GetHelpString(int itemid) const;
// misc accessors
// --------------
@ -302,47 +302,47 @@ public:
// unlike FindItem(), this function doesn't recurse but only looks through
// our direct children and also may return the index of the found child if
// pos != NULL
wxMenuItem *FindChildItem(int id, size_t *pos = NULL) const;
wxMenuItem *FindChildItem(int itemid, size_t *pos = NULL) const;
// called to generate a wxCommandEvent, return TRUE if it was processed,
// FALSE otherwise
//
// the checked parameter may have boolean value or -1 for uncheckable items
bool SendEvent(int id, int checked = -1);
bool SendEvent(int itemid, int checked = -1);
// compatibility: these functions are deprecated, use the new ones instead
// -----------------------------------------------------------------------
// use the versions taking wxItem_XXX now instead, they're more readable
// and allow adding the radio items as well
void Append(int id,
void Append(int itemid,
const wxString& text,
const wxString& help,
bool isCheckable)
{
Append(id, text, help, isCheckable ? wxITEM_CHECK : wxITEM_NORMAL);
Append(itemid, text, help, isCheckable ? wxITEM_CHECK : wxITEM_NORMAL);
}
void Insert(size_t pos,
int id,
int itemid,
const wxString& text,
const wxString& help,
bool isCheckable)
{
Insert(pos, id, text, help, isCheckable ? wxITEM_CHECK : wxITEM_NORMAL);
Insert(pos, itemid, text, help, isCheckable ? wxITEM_CHECK : wxITEM_NORMAL);
}
void Prepend(int id,
void Prepend(int itemid,
const wxString& text,
const wxString& help,
bool isCheckable)
{
Insert(0u, id, text, help, isCheckable);
Insert(0u, itemid, text, help, isCheckable);
}
#if WXWIN_COMPATIBILITY
bool Enabled(int id) const { return IsEnabled(id); }
bool Checked(int id) const { return IsChecked(id); }
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); }
@ -453,7 +453,7 @@ public:
// find item by id (in any menu), returns NULL if not found
//
// if menu is !NULL, it will be filled with wxMenu this item belongs to
virtual wxMenuItem* FindItem(int id, wxMenu **menu = NULL) const;
virtual wxMenuItem* FindItem(int itemid, wxMenu **menu = NULL) const;
// find menu by its caption, return wxNOT_FOUND on failure
int FindMenu(const wxString& title) const;
@ -467,16 +467,16 @@ public:
// NB: under MSW, these methods can only be used after the menubar had
// been attached to the frame
void Enable(int id, bool enable);
void Check(int id, bool check);
bool IsChecked(int id) const;
bool IsEnabled(int id) const;
void Enable(int itemid, bool enable);
void Check(int itemid, bool check);
bool IsChecked(int itemid) const;
bool IsEnabled(int itemid) const;
void SetLabel(int id, const wxString &label);
wxString GetLabel(int id) const;
void SetLabel(int itemid, const wxString &label);
wxString GetLabel(int itemid) const;
void SetHelpString(int id, const wxString& helpString);
wxString GetHelpString(int id) const;
void SetHelpString(int itemid, const wxString& helpString);
wxString GetHelpString(int itemid) const;
// implementation helpers
@ -503,13 +503,13 @@ public:
// compatibility only: these functions are deprecated, use the new ones
// instead
#if WXWIN_COMPATIBILITY
bool Enabled(int id) const { return IsEnabled(id); }
bool Checked(int id) const { return IsChecked(id); }
bool Enabled(int itemid) const { return IsEnabled(itemid); }
bool Checked(int itemid) const { return IsChecked(itemid); }
wxMenuItem* FindMenuItemById(int id) const
{ return FindItem(id); }
wxMenuItem* FindItemForId(int id, wxMenu **menu = NULL) const
{ return FindItem(id, menu); }
wxMenuItem* FindMenuItemById(int itemid) const
{ return FindItem(itemid); }
wxMenuItem* FindItemForId(int itemid, wxMenu **menu = NULL) const
{ return FindItem(itemid, menu); }
#endif // WXWIN_COMPATIBILITY
protected:

View File

@ -38,7 +38,7 @@ class WXDLLEXPORT wxMenuItemBase : public wxObject
public:
// creation
static wxMenuItem *New(wxMenu *parentMenu = (wxMenu *)NULL,
int id = wxID_SEPARATOR,
int itemid = wxID_SEPARATOR,
const wxString& text = wxEmptyString,
const wxString& help = wxEmptyString,
wxItemKind kind = wxITEM_NORMAL,
@ -51,7 +51,7 @@ public:
wxMenu *GetMenu() const { return m_parentMenu; }
// get/set id
void SetId(int id) { m_id = id; }
void SetId(int itemid) { m_id = itemid; }
int GetId() const { return m_id; }
bool IsSeparator() const { return m_id == wxID_SEPARATOR; }
@ -109,13 +109,13 @@ public:
const wxString& GetName() const { return GetText(); }
static wxMenuItem *New(wxMenu *parentMenu,
int id,
int itemid,
const wxString& text,
const wxString& help,
bool isCheckable,
wxMenu *subMenu = (wxMenu *)NULL)
{
return New(parentMenu, id, text, help,
return New(parentMenu, itemid, text, help,
isCheckable ? wxITEM_CHECK : wxITEM_NORMAL, subMenu);
}
@ -131,7 +131,7 @@ protected:
// this ctor is for the derived classes only, we're never created directly
wxMenuItemBase(wxMenu *parentMenu = (wxMenu *)NULL,
int id = wxID_SEPARATOR,
int itemid = wxID_SEPARATOR,
const wxString& text = wxEmptyString,
const wxString& help = wxEmptyString,
wxItemKind kind = wxITEM_NORMAL,

View File

@ -65,7 +65,7 @@ public:
// ------------
wxToolBarToolBase(wxToolBarBase *tbar = (wxToolBarBase *)NULL,
int id = wxID_SEPARATOR,
int toolid = wxID_SEPARATOR,
const wxString& label = wxEmptyString,
const wxBitmap& bmpNormal = wxNullBitmap,
const wxBitmap& bmpDisabled = wxNullBitmap,
@ -78,7 +78,7 @@ public:
m_longHelpString(longHelpString)
{
m_tbar = tbar;
m_id = id;
m_id = toolid;
m_clientData = clientData;
m_bmpNormal = bmpNormal;
@ -89,7 +89,7 @@ public:
m_enabled = TRUE;
m_toggled = FALSE;
m_toolStyle = id == wxID_SEPARATOR ? wxTOOL_STYLE_SEPARATOR
m_toolStyle = toolid == wxID_SEPARATOR ? wxTOOL_STYLE_SEPARATOR
: wxTOOL_STYLE_BUTTON;
}
@ -258,7 +258,7 @@ public:
//
// If bmpDisabled is wxNullBitmap, a shadowed version of the normal bitmap
// is created and used as the disabled image.
wxToolBarToolBase *AddTool(int id,
wxToolBarToolBase *AddTool(int toolid,
const wxString& label,
const wxBitmap& bitmap,
const wxBitmap& bmpDisabled,
@ -267,22 +267,22 @@ public:
const wxString& longHelp = wxEmptyString,
wxObject *data = NULL)
{
return DoAddTool(id, label, bitmap, bmpDisabled, kind,
return DoAddTool(toolid, label, bitmap, bmpDisabled, kind,
shortHelp, longHelp, data);
}
// the most common AddTool() version
wxToolBarToolBase *AddTool(int id,
wxToolBarToolBase *AddTool(int toolid,
const wxString& label,
const wxBitmap& bitmap,
const wxString& shortHelp = wxEmptyString,
wxItemKind kind = wxITEM_NORMAL)
{
return AddTool(id, label, bitmap, wxNullBitmap, kind, shortHelp);
return AddTool(toolid, label, bitmap, wxNullBitmap, kind, shortHelp);
}
// add a check tool, i.e. a tool which can be toggled
wxToolBarToolBase *AddCheckTool(int id,
wxToolBarToolBase *AddCheckTool(int toolid,
const wxString& label,
const wxBitmap& bitmap,
const wxBitmap& bmpDisabled = wxNullBitmap,
@ -290,13 +290,13 @@ public:
const wxString& longHelp = wxEmptyString,
wxObject *data = NULL)
{
return AddTool(id, label, bitmap, bmpDisabled, wxITEM_CHECK,
return AddTool(toolid, label, bitmap, bmpDisabled, wxITEM_CHECK,
shortHelp, longHelp, data);
}
// add a radio tool, i.e. a tool which can be toggled and releases any
// other toggled radio tools in the same group when it happens
wxToolBarToolBase *AddRadioTool(int id,
wxToolBarToolBase *AddRadioTool(int toolid,
const wxString& label,
const wxBitmap& bitmap,
const wxBitmap& bmpDisabled = wxNullBitmap,
@ -304,7 +304,7 @@ public:
const wxString& longHelp = wxEmptyString,
wxObject *data = NULL)
{
return AddTool(id, label, bitmap, bmpDisabled, wxITEM_RADIO,
return AddTool(toolid, label, bitmap, bmpDisabled, wxITEM_RADIO,
shortHelp, longHelp, data);
}
@ -314,7 +314,7 @@ public:
virtual wxToolBarToolBase *InsertTool
(
size_t pos,
int id,
int toolid,
const wxString& label,
const wxBitmap& bitmap,
const wxBitmap& bmpDisabled = wxNullBitmap,
@ -336,7 +336,7 @@ public:
virtual wxToolBarToolBase *InsertControl(size_t pos, wxControl *control);
// get the control with the given id or return NULL
virtual wxControl *FindControl( int id );
virtual wxControl *FindControl( int toolid );
// add a separator to the toolbar
virtual wxToolBarToolBase *AddSeparator();
@ -344,11 +344,11 @@ public:
// remove the tool from the toolbar: the caller is responsible for actually
// deleting the pointer
virtual wxToolBarToolBase *RemoveTool(int id);
virtual wxToolBarToolBase *RemoveTool(int toolid);
// delete tool either by index or by position
virtual bool DeleteToolByPos(size_t pos);
virtual bool DeleteTool(int id);
virtual bool DeleteTool(int toolid);
// delete all tools
virtual void ClearTools();
@ -360,25 +360,25 @@ public:
// tools state
// -----------
virtual void EnableTool(int id, bool enable);
virtual void ToggleTool(int id, bool toggle);
virtual void EnableTool(int toolid, bool enable);
virtual void ToggleTool(int toolid, bool toggle);
// Set this to be togglable (or not)
virtual void SetToggle(int id, bool toggle);
virtual void SetToggle(int toolid, bool toggle);
// set/get tools client data (not for controls)
virtual wxObject *GetToolClientData(int id) const;
virtual void SetToolClientData(int id, wxObject *clientData);
virtual wxObject *GetToolClientData(int toolid) const;
virtual void SetToolClientData(int toolid, wxObject *clientData);
// return TRUE if the tool is toggled
virtual bool GetToolState(int id) const;
virtual bool GetToolState(int toolid) const;
virtual bool GetToolEnabled(int id) const;
virtual bool GetToolEnabled(int toolid) const;
virtual void SetToolShortHelp(int id, const wxString& helpString);
virtual wxString GetToolShortHelp(int id) const;
virtual void SetToolLongHelp(int id, const wxString& helpString);
virtual wxString GetToolLongHelp(int id) const;
virtual void SetToolShortHelp(int toolid, const wxString& helpString);
virtual wxString GetToolShortHelp(int toolid) const;
virtual void SetToolLongHelp(int toolid, const wxString& helpString);
virtual wxString GetToolLongHelp(int toolid) const;
// margins/packing/separation
// --------------------------
@ -432,7 +432,7 @@ public:
// don't use in the new code!
// --------------------------------------------------------------
wxToolBarToolBase *AddTool(int id,
wxToolBarToolBase *AddTool(int toolid,
const wxBitmap& bitmap,
const wxBitmap& bmpDisabled,
bool toggle = FALSE,
@ -440,23 +440,23 @@ public:
const wxString& shortHelpString = wxEmptyString,
const wxString& longHelpString = wxEmptyString)
{
return AddTool(id, wxEmptyString,
return AddTool(toolid, wxEmptyString,
bitmap, bmpDisabled,
toggle ? wxITEM_CHECK : wxITEM_NORMAL,
shortHelpString, longHelpString, clientData);
}
wxToolBarToolBase *AddTool(int id,
wxToolBarToolBase *AddTool(int toolid,
const wxBitmap& bitmap,
const wxString& shortHelpString = wxEmptyString,
const wxString& longHelpString = wxEmptyString)
{
return AddTool(id, wxEmptyString,
return AddTool(toolid, wxEmptyString,
bitmap, wxNullBitmap, wxITEM_NORMAL,
shortHelpString, longHelpString, NULL);
}
wxToolBarToolBase *AddTool(int id,
wxToolBarToolBase *AddTool(int toolid,
const wxBitmap& bitmap,
const wxBitmap& bmpDisabled,
bool toggle,
@ -466,13 +466,13 @@ public:
const wxString& shortHelp = wxEmptyString,
const wxString& longHelp = wxEmptyString)
{
return DoAddTool(id, wxEmptyString, bitmap, bmpDisabled,
return DoAddTool(toolid, wxEmptyString, bitmap, bmpDisabled,
toggle ? wxITEM_CHECK : wxITEM_NORMAL,
shortHelp, longHelp, clientData, xPos, yPos);
}
wxToolBarToolBase *InsertTool(size_t pos,
int id,
int toolid,
const wxBitmap& bitmap,
const wxBitmap& bmpDisabled = wxNullBitmap,
bool toggle = FALSE,
@ -480,7 +480,7 @@ public:
const wxString& shortHelp = wxEmptyString,
const wxString& longHelp = wxEmptyString)
{
return InsertTool(pos, id, wxEmptyString, bitmap, bmpDisabled,
return InsertTool(pos, toolid, wxEmptyString, bitmap, bmpDisabled,
toggle ? wxITEM_CHECK : wxITEM_NORMAL,
shortHelp, longHelp, clientData);
}
@ -491,14 +491,14 @@ public:
// NB: these functions are deprecated, use EVT_TOOL_XXX() instead!
// Only allow toggle if returns TRUE. Call when left button up.
virtual bool OnLeftClick(int id, bool toggleDown);
virtual bool OnLeftClick(int toolid, bool toggleDown);
// Call when right button down.
virtual void OnRightClick(int id, long x, long y);
virtual void OnRightClick(int toolid, long x, long y);
// Called when the mouse cursor enters a tool bitmap.
// Argument is -1 if mouse is exiting the toolbar.
virtual void OnMouseEnter(int id);
virtual void OnMouseEnter(int toolid);
// more deprecated functions
// -------------------------
@ -538,7 +538,7 @@ protected:
// implemented by just calling InsertTool()
virtual wxToolBarToolBase *DoAddTool
(
int id,
int toolid,
const wxString& label,
const wxBitmap& bitmap,
const wxBitmap& bmpDisabled,
@ -568,7 +568,7 @@ protected:
virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle) = 0;
// the functions to create toolbar tools
virtual wxToolBarToolBase *CreateTool(int id,
virtual wxToolBarToolBase *CreateTool(int toolid,
const wxString& label,
const wxBitmap& bmpNormal,
const wxBitmap& bmpDisabled,
@ -583,7 +583,7 @@ protected:
// ----------------
// find the tool by id
wxToolBarToolBase *FindById(int id) const;
wxToolBarToolBase *FindById(int toolid) const;
// the list of all our tools
wxToolBarToolsList m_tools;

View File

@ -33,7 +33,7 @@ public:
wxToolBarSimple() { Init(); }
wxToolBarSimple(wxWindow *parent,
wxWindowID id,
wxWindowID winid,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxNO_BORDER | wxTB_HORIZONTAL,
@ -41,11 +41,11 @@ public:
{
Init();
Create(parent, id, pos, size, style, name);
Create(parent, winid, pos, size, style, name);
}
bool Create(wxWindow *parent,
wxWindowID id,
wxWindowID winid,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxNO_BORDER | wxTB_HORIZONTAL,
@ -108,7 +108,7 @@ protected:
// implement base class pure virtuals
virtual wxToolBarToolBase *DoAddTool
(
int id,
int toolid,
const wxString& label,
const wxBitmap& bitmap,
const wxBitmap& bmpDisabled,
@ -127,7 +127,7 @@ protected:
virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle);
virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle);
virtual wxToolBarToolBase *CreateTool(int id,
virtual wxToolBarToolBase *CreateTool(int winid,
const wxString& label,
const wxBitmap& bmpNormal,
const wxBitmap& bmpDisabled,

View File

@ -327,9 +327,9 @@ END_DECLARE_EVENT_TYPES()
class WXDLLEXPORT wxTextUrlEvent : public wxCommandEvent
{
public:
wxTextUrlEvent(int id, const wxMouseEvent& evtMouse,
wxTextUrlEvent(int winid, const wxMouseEvent& evtMouse,
long start, long end)
: wxCommandEvent(wxEVT_COMMAND_TEXT_URL, id)
: wxCommandEvent(wxEVT_COMMAND_TEXT_URL, winid)
, m_evtMouse(evtMouse), m_start(start), m_end(end)
{ }

View File

@ -24,27 +24,27 @@
wxToolBar() { }
wxToolBar(wxWindow *parent,
wxWindowID id,
wxWindowID winid,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxNO_BORDER | wxTB_HORIZONTAL,
const wxString& name = wxToolBarNameStr)
: wxToolBarSimple(parent, id, pos, size, style, name) { }
: wxToolBarSimple(parent, winid, pos, size, style, name) { }
// the most commonly used version of AddTool()
wxToolBarToolBase *AddTool(int id,
wxToolBarToolBase *AddTool(int toolid,
const wxBitmap& bitmap,
const wxString& shortHelpString = wxEmptyString,
const wxString& longHelpString = wxEmptyString)
{
return wxToolBarSimple::AddTool(id, bitmap, wxNullBitmap, FALSE, -1, -1, NULL,
return wxToolBarSimple::AddTool(toolid, bitmap, wxNullBitmap, FALSE, -1, -1, NULL,
shortHelpString, longHelpString);
}
// old form
wxToolBarToolBase *AddTool
(
int id,
int toolid,
const wxBitmap& bitmap,
const wxBitmap& pushedBitmap,
bool toggle,
@ -53,14 +53,14 @@
const wxString& longHelpString = wxEmptyString
)
{
return wxToolBarSimple::AddTool(id, bitmap, pushedBitmap, toggle, -1, -1, clientData,
return wxToolBarSimple::AddTool(toolid, bitmap, pushedBitmap, toggle, -1, -1, clientData,
shortHelpString, longHelpString);
}
// virtual overridden
virtual wxToolBarToolBase *AddTool
(
int id,
int toolid,
const wxBitmap& bitmap,
const wxBitmap& pushedBitmap,
bool toggle,
@ -71,7 +71,7 @@
const wxString& longHelpString = wxEmptyString
)
{
return wxToolBarSimple::AddTool(id, bitmap, pushedBitmap, toggle, xPos, yPos, clientData,
return wxToolBarSimple::AddTool(toolid, bitmap, pushedBitmap, toggle, xPos, yPos, clientData,
shortHelpString, longHelpString);
}

View File

@ -188,7 +188,7 @@ protected:
// construction
wxTopLevelWindow() { Init(); }
wxTopLevelWindow(wxWindow *parent,
wxWindowID id,
wxWindowID winid,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
@ -196,7 +196,7 @@ protected:
const wxString& name = wxFrameNameStr)
{
Init();
Create(parent, id, title, pos, size, style, name);
Create(parent, winid, title, pos, size, style, name);
}
DECLARE_DYNAMIC_CLASS(wxTopLevelWindow)

View File

@ -107,7 +107,7 @@ public:
// pseudo ctor (can't be virtual, called from ctor)
bool CreateBase(wxWindowBase *parent,
wxWindowID id,
wxWindowID winid,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
@ -169,7 +169,7 @@ public:
// window id uniquely identifies the window among its siblings unless
// it is -1 which means "don't care"
void SetId( wxWindowID id ) { m_windowId = id; }
void SetId( wxWindowID winid ) { m_windowId = winid; }
wxWindowID GetId() const { return m_windowId; }
// generate a control id for the controls which were not given one by
@ -177,10 +177,10 @@ public:
static int NewControlId() { return --ms_lastControlId; }
// get the id of the control following the one with the given
// (autogenerated) id
static int NextControlId(int id) { return id - 1; }
static int NextControlId(int winid) { return winid - 1; }
// get the id of the control preceding the one with the given
// (autogenerated) id
static int PrevControlId(int id) { return id + 1; }
static int PrevControlId(int winid) { return winid + 1; }
// moving/resizing
// ---------------
@ -464,11 +464,11 @@ public:
// find window among the descendants of this one either by id or by
// name (return NULL if not found)
wxWindow *FindWindow( long id );
wxWindow *FindWindow( long winid );
wxWindow *FindWindow( const wxString& name );
// Find a window among any window (all return NULL if not found)
static wxWindow *FindWindowById( long id, const wxWindow *parent = NULL );
static wxWindow *FindWindowById( long winid, const wxWindow *parent = NULL );
static wxWindow *FindWindowByName( const wxString& name,
const wxWindow *parent = NULL );
static wxWindow *FindWindowByLabel( const wxString& label,