wxEventType alterations.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -309,7 +309,7 @@ typedef void (*wxFunction) (wxObject&, wxEvent&);
|
|||||||
#define wxUSER_COLOURS 0x00800000
|
#define wxUSER_COLOURS 0x00800000
|
||||||
// Override CTL3D etc. control colour processing to
|
// Override CTL3D etc. control colour processing to
|
||||||
// allow own background colour
|
// allow own background colour
|
||||||
// OBSOLETE - use wxNO_CTL3D instead
|
// OBSOLETE - use wxNO_3D instead
|
||||||
#define wxNO_3D 0x00800000
|
#define wxNO_3D 0x00800000
|
||||||
// Override CTL3D or native 3D styles for children
|
// Override CTL3D or native 3D styles for children
|
||||||
#define wxCLIP_CHILDREN 0x00400000
|
#define wxCLIP_CHILDREN 0x00400000
|
||||||
@@ -478,6 +478,7 @@ typedef void (*wxFunction) (wxObject&, wxEvent&);
|
|||||||
|
|
||||||
#define wxTR_HAS_BUTTONS 0x0004
|
#define wxTR_HAS_BUTTONS 0x0004
|
||||||
#define wxTR_EDIT_LABELS 0x0008
|
#define wxTR_EDIT_LABELS 0x0008
|
||||||
|
#define wxTR_LINES_AT_ROOT 0x0010
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* wxListCtrl flags
|
* wxListCtrl flags
|
||||||
|
@@ -24,7 +24,9 @@
|
|||||||
* Event types
|
* Event types
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
enum {
|
|
||||||
|
enum wxEventType {
|
||||||
|
wxEVT_NULL = 0,
|
||||||
wxEVT_FIRST = 10000,
|
wxEVT_FIRST = 10000,
|
||||||
|
|
||||||
// New names
|
// New names
|
||||||
@@ -245,8 +247,8 @@ public:
|
|||||||
wxEvent(int id = 0);
|
wxEvent(int id = 0);
|
||||||
inline ~wxEvent(void) {}
|
inline ~wxEvent(void) {}
|
||||||
|
|
||||||
inline void SetEventType(WXTYPE typ) { m_eventType = typ; }
|
inline void SetEventType(wxEventType typ) { m_eventType = typ; }
|
||||||
inline WXTYPE GetEventType(void) const { return m_eventType; }
|
inline wxEventType GetEventType(void) const { return m_eventType; }
|
||||||
inline wxObject *GetEventObject(void) const { return m_eventObject; }
|
inline wxObject *GetEventObject(void) const { return m_eventObject; }
|
||||||
inline void SetEventObject(wxObject *obj) { m_eventObject = obj; }
|
inline void SetEventObject(wxObject *obj) { m_eventObject = obj; }
|
||||||
inline long GetTimestamp(void) const { return m_timeStamp; }
|
inline long GetTimestamp(void) const { return m_timeStamp; }
|
||||||
@@ -263,7 +265,7 @@ public:
|
|||||||
bool m_skipped;
|
bool m_skipped;
|
||||||
wxObject* m_eventObject;
|
wxObject* m_eventObject;
|
||||||
char* m_eventHandle; // Handle of an underlying windowing system event
|
char* m_eventHandle; // Handle of an underlying windowing system event
|
||||||
WXTYPE m_eventType;
|
wxEventType m_eventType;
|
||||||
long m_timeStamp;
|
long m_timeStamp;
|
||||||
int m_id;
|
int m_id;
|
||||||
wxObject* m_callbackUserData;
|
wxObject* m_callbackUserData;
|
||||||
@@ -292,7 +294,7 @@ class WXDLLEXPORT wxCommandEvent: public wxEvent
|
|||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxCommandEvent)
|
DECLARE_DYNAMIC_CLASS(wxCommandEvent)
|
||||||
|
|
||||||
wxCommandEvent(WXTYPE commandType = 0, int id = 0);
|
wxCommandEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
|
||||||
inline ~wxCommandEvent(void) {}
|
inline ~wxCommandEvent(void) {}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -346,7 +348,7 @@ class WXDLLEXPORT wxScrollEvent: public wxCommandEvent
|
|||||||
DECLARE_DYNAMIC_CLASS(wxScrollEvent)
|
DECLARE_DYNAMIC_CLASS(wxScrollEvent)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxScrollEvent(WXTYPE commandType = 0, int id = 0, int pos = 0, int orient = 0);
|
wxScrollEvent(wxEventType commandType = wxEVT_NULL, int id = 0, int pos = 0, int orient = 0);
|
||||||
inline ~wxScrollEvent(void) {}
|
inline ~wxScrollEvent(void) {}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -394,7 +396,7 @@ class WXDLLEXPORT wxMouseEvent: public wxEvent
|
|||||||
DECLARE_DYNAMIC_CLASS(wxMouseEvent)
|
DECLARE_DYNAMIC_CLASS(wxMouseEvent)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxMouseEvent(WXTYPE mouseType = 0);
|
wxMouseEvent(wxEventType mouseType = wxEVT_NULL);
|
||||||
|
|
||||||
// Was it a button event? (*doesn't* mean: is any button *down*?)
|
// Was it a button event? (*doesn't* mean: is any button *down*?)
|
||||||
inline bool IsButton(void) const { return Button(-1); }
|
inline bool IsButton(void) const { return Button(-1); }
|
||||||
@@ -496,7 +498,7 @@ class WXDLLEXPORT wxKeyEvent: public wxEvent
|
|||||||
DECLARE_DYNAMIC_CLASS(wxKeyEvent)
|
DECLARE_DYNAMIC_CLASS(wxKeyEvent)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxKeyEvent(WXTYPE keyType = 0);
|
wxKeyEvent(wxEventType keyType = wxEVT_NULL);
|
||||||
|
|
||||||
// Find state of shift/control keys
|
// Find state of shift/control keys
|
||||||
inline bool ControlDown(void) const { return m_controlDown; }
|
inline bool ControlDown(void) const { return m_controlDown; }
|
||||||
@@ -605,7 +607,7 @@ class WXDLLEXPORT wxFocusEvent: public wxEvent
|
|||||||
DECLARE_DYNAMIC_CLASS(wxFocusEvent)
|
DECLARE_DYNAMIC_CLASS(wxFocusEvent)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
inline wxFocusEvent(WXTYPE type = 0, int Id = 0) { m_eventType = type; m_id = Id; }
|
inline wxFocusEvent(wxEventType type = wxEVT_NULL, int Id = 0) { m_eventType = type; m_id = Id; }
|
||||||
};
|
};
|
||||||
|
|
||||||
// Activate event class
|
// Activate event class
|
||||||
@@ -620,7 +622,7 @@ class WXDLLEXPORT wxActivateEvent: public wxEvent
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
bool m_active;
|
bool m_active;
|
||||||
inline wxActivateEvent(WXTYPE type = 0, bool active = TRUE, int Id = 0) { m_eventType = type; m_active = active; m_id = Id; }
|
inline wxActivateEvent(wxEventType type = wxEVT_NULL, bool active = TRUE, int Id = 0) { m_eventType = type; m_active = active; m_id = Id; }
|
||||||
inline bool GetActive(void) const { return m_active; }
|
inline bool GetActive(void) const { return m_active; }
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -653,7 +655,7 @@ class WXDLLEXPORT wxMenuEvent: public wxEvent
|
|||||||
public:
|
public:
|
||||||
int m_menuId;
|
int m_menuId;
|
||||||
|
|
||||||
inline wxMenuEvent(WXTYPE type = 0, int id = 0) { m_eventType = type; m_menuId = id; }
|
inline wxMenuEvent(wxEventType type = wxEVT_NULL, int id = 0) { m_eventType = type; m_menuId = id; }
|
||||||
|
|
||||||
inline int GetMenuId(void) const { return m_menuId; }
|
inline int GetMenuId(void) const { return m_menuId; }
|
||||||
};
|
};
|
||||||
@@ -670,7 +672,7 @@ class WXDLLEXPORT wxCloseEvent: public wxEvent
|
|||||||
DECLARE_DYNAMIC_CLASS(wxCloseEvent)
|
DECLARE_DYNAMIC_CLASS(wxCloseEvent)
|
||||||
public:
|
public:
|
||||||
|
|
||||||
inline wxCloseEvent(WXTYPE type = 0, int id = 0)
|
inline wxCloseEvent(wxEventType type = wxEVT_NULL, int id = 0)
|
||||||
{ m_eventType = type; m_sessionEnding = TRUE; m_loggingOff = TRUE; m_veto = FALSE;
|
{ m_eventType = type; m_sessionEnding = TRUE; m_loggingOff = TRUE; m_veto = FALSE;
|
||||||
m_id = id; m_force = FALSE; }
|
m_id = id; m_force = FALSE; }
|
||||||
|
|
||||||
@@ -764,7 +766,7 @@ class WXDLLEXPORT wxJoystickEvent: public wxEvent
|
|||||||
int m_buttonState; // Which buttons are down?
|
int m_buttonState; // Which buttons are down?
|
||||||
int m_joyStick; // Which joystick?
|
int m_joyStick; // Which joystick?
|
||||||
|
|
||||||
inline wxJoystickEvent(WXTYPE type = 0, int state = 0, int joystick = wxJOYSTICK1, int change = 0)
|
inline wxJoystickEvent(wxEventType type = wxEVT_NULL, int state = 0, int joystick = wxJOYSTICK1, int change = 0)
|
||||||
{ m_eventType = type; m_buttonState = state; m_pos = wxPoint(0,0); m_zPosition = 0;
|
{ m_eventType = type; m_buttonState = state; m_pos = wxPoint(0,0); m_zPosition = 0;
|
||||||
m_joyStick = joystick; m_buttonChange = change; }
|
m_joyStick = joystick; m_buttonChange = change; }
|
||||||
|
|
||||||
@@ -820,7 +822,7 @@ class WXDLLEXPORT wxDropFilesEvent: public wxEvent
|
|||||||
wxPoint m_pos;
|
wxPoint m_pos;
|
||||||
wxString* m_files; // Memory (de)allocated by code calling ProcessEvent
|
wxString* m_files; // Memory (de)allocated by code calling ProcessEvent
|
||||||
|
|
||||||
inline wxDropFilesEvent(WXTYPE type = 0, int noFiles = 0, wxString *files = NULL)
|
inline wxDropFilesEvent(wxEventType type = wxEVT_NULL, int noFiles = 0, wxString *files = NULL)
|
||||||
{ m_eventType = type; m_noFiles = noFiles; m_files = files; }
|
{ m_eventType = type; m_noFiles = noFiles; m_files = files; }
|
||||||
|
|
||||||
inline wxPoint GetPosition(void) const { return m_pos; }
|
inline wxPoint GetPosition(void) const { return m_pos; }
|
||||||
|
@@ -202,7 +202,7 @@ class WXDLLEXPORT wxListEvent: public wxCommandEvent
|
|||||||
DECLARE_DYNAMIC_CLASS(wxListEvent)
|
DECLARE_DYNAMIC_CLASS(wxListEvent)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxListEvent(WXTYPE commandType = 0, int id = 0);
|
wxListEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
|
||||||
|
|
||||||
int m_code;
|
int m_code;
|
||||||
long m_itemIndex;
|
long m_itemIndex;
|
||||||
@@ -495,7 +495,7 @@ class wxListMainWindow: public wxScrolledWindow
|
|||||||
void OnPaint( wxPaintEvent &event );
|
void OnPaint( wxPaintEvent &event );
|
||||||
void HilightAll( const bool on );
|
void HilightAll( const bool on );
|
||||||
void ActivateLine( wxListLineData *line );
|
void ActivateLine( wxListLineData *line );
|
||||||
void SendNotify( wxListLineData *line, long command );
|
void SendNotify( wxListLineData *line, wxEventType command );
|
||||||
void FocusLine( wxListLineData *line );
|
void FocusLine( wxListLineData *line );
|
||||||
void UnfocusLine( wxListLineData *line );
|
void UnfocusLine( wxListLineData *line );
|
||||||
void SelectLine( wxListLineData *line );
|
void SelectLine( wxListLineData *line );
|
||||||
|
@@ -135,6 +135,27 @@ class WXDLLEXPORT wxTreeItem: public wxObject
|
|||||||
long m_data;
|
long m_data;
|
||||||
|
|
||||||
wxTreeItem(void);
|
wxTreeItem(void);
|
||||||
|
|
||||||
|
// Accessors
|
||||||
|
inline long GetMask() const { return m_mask; }
|
||||||
|
inline long GetItemId() const { return m_itemId; }
|
||||||
|
inline long GetState() const { return m_state; }
|
||||||
|
inline long GetStateMask() const { return m_stateMask; }
|
||||||
|
inline wxString GetText() const { return m_text; }
|
||||||
|
inline int GetImage() const { return m_image; }
|
||||||
|
inline int GetSelectedImage() const { return m_selectedImage; }
|
||||||
|
inline int GetChildren() const { return m_children; }
|
||||||
|
inline long GetData() const { return m_data; }
|
||||||
|
|
||||||
|
inline void SetMask(long mask) { m_mask = mask; }
|
||||||
|
inline void SetItemId(long id) { m_itemId = m_itemId = id; }
|
||||||
|
inline void GetState(long state) { m_state = state; }
|
||||||
|
inline void SetStateMask(long stateMask) { m_stateMask = stateMask; }
|
||||||
|
inline void GetText(const wxString& text) { m_text = text; }
|
||||||
|
inline void SetImage(int image) { m_image = image; }
|
||||||
|
inline void GetSelectedImage(int selImage) { m_selectedImage = selImage; }
|
||||||
|
inline void SetChildren(int children) { m_children = children; }
|
||||||
|
inline void SetData(long data) { m_data = data; }
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -146,12 +167,17 @@ class WXDLLEXPORT wxTreeEvent: public wxCommandEvent
|
|||||||
DECLARE_DYNAMIC_CLASS(wxTreeEvent)
|
DECLARE_DYNAMIC_CLASS(wxTreeEvent)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxTreeEvent(WXTYPE commandType = 0, int id = 0);
|
wxTreeEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
|
||||||
|
|
||||||
int m_code;
|
int m_code;
|
||||||
wxTreeItem m_item;
|
wxTreeItem m_item;
|
||||||
long m_oldItem;
|
long m_oldItem;
|
||||||
wxPoint m_pointDrag;
|
wxPoint m_pointDrag;
|
||||||
|
|
||||||
|
inline long GetOldItem() const { return m_oldItem; }
|
||||||
|
inline wxTreeItem& GetItem() const { return (wxTreeItem&) m_item; }
|
||||||
|
inline wxPoint GetPoint() const { return m_pointDrag; }
|
||||||
|
inline int GetCode() const { return m_code; }
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&);
|
typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&);
|
||||||
|
@@ -444,7 +444,7 @@ class WXDLLEXPORT wxListEvent: public wxCommandEvent
|
|||||||
DECLARE_DYNAMIC_CLASS(wxListEvent)
|
DECLARE_DYNAMIC_CLASS(wxListEvent)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxListEvent(WXTYPE commandType = 0, int id = 0);
|
wxListEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
|
||||||
|
|
||||||
int m_code;
|
int m_code;
|
||||||
long m_itemIndex;
|
long m_itemIndex;
|
||||||
|
@@ -82,7 +82,7 @@ class WXDLLEXPORT wxSpinEvent: public wxScrollEvent
|
|||||||
DECLARE_DYNAMIC_CLASS(wxSpinEvent)
|
DECLARE_DYNAMIC_CLASS(wxSpinEvent)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxSpinEvent(WXTYPE commandType = 0, int id = 0);
|
wxSpinEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef void (wxEvtHandler::*wxSpinEventFunction)(wxSpinEvent&);
|
typedef void (wxEvtHandler::*wxSpinEventFunction)(wxSpinEvent&);
|
||||||
|
@@ -136,7 +136,7 @@ class WXDLLEXPORT wxTabEvent: public wxCommandEvent
|
|||||||
DECLARE_DYNAMIC_CLASS(wxTabEvent)
|
DECLARE_DYNAMIC_CLASS(wxTabEvent)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxTabEvent(WXTYPE commandType = 0, int id = 0);
|
wxTabEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef void (wxEvtHandler::*wxTabEventFunction)(wxTabEvent&);
|
typedef void (wxEvtHandler::*wxTabEventFunction)(wxTabEvent&);
|
||||||
|
@@ -96,6 +96,27 @@ public:
|
|||||||
long m_data;
|
long m_data;
|
||||||
|
|
||||||
wxTreeItem(void);
|
wxTreeItem(void);
|
||||||
|
|
||||||
|
// Accessors
|
||||||
|
inline long GetMask() const { return m_mask; }
|
||||||
|
inline long GetItemId() const { return m_itemId; }
|
||||||
|
inline long GetState() const { return m_state; }
|
||||||
|
inline long GetStateMask() const { return m_stateMask; }
|
||||||
|
inline wxString GetText() const { return m_text; }
|
||||||
|
inline int GetImage() const { return m_image; }
|
||||||
|
inline int GetSelectedImage() const { return m_selectedImage; }
|
||||||
|
inline int GetChildren() const { return m_children; }
|
||||||
|
inline long GetData() const { return m_data; }
|
||||||
|
|
||||||
|
inline void SetMask(long mask) { m_mask = mask; }
|
||||||
|
inline void SetItemId(long id) { m_itemId = m_itemId = id; }
|
||||||
|
inline void GetState(long state) { m_state = state; }
|
||||||
|
inline void SetStateMask(long stateMask) { m_stateMask = stateMask; }
|
||||||
|
inline void GetText(const wxString& text) { m_text = text; }
|
||||||
|
inline void SetImage(int image) { m_image = image; }
|
||||||
|
inline void GetSelectedImage(int selImage) { m_selectedImage = selImage; }
|
||||||
|
inline void SetChildren(int children) { m_children = children; }
|
||||||
|
inline void SetData(long data) { m_data = data; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class WXDLLEXPORT wxTreeCtrl: public wxControl
|
class WXDLLEXPORT wxTreeCtrl: public wxControl
|
||||||
@@ -111,7 +132,7 @@ class WXDLLEXPORT wxTreeCtrl: public wxControl
|
|||||||
inline wxTreeCtrl(wxWindow *parent, const wxWindowID id = -1,
|
inline wxTreeCtrl(wxWindow *parent, const wxWindowID id = -1,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
const long style = wxTR_HAS_BUTTONS,
|
const long style = wxTR_HAS_BUTTONS|wxTR_LINES_AT_ROOT,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = "wxTreeCtrl")
|
const wxString& name = "wxTreeCtrl")
|
||||||
{
|
{
|
||||||
@@ -122,7 +143,7 @@ class WXDLLEXPORT wxTreeCtrl: public wxControl
|
|||||||
bool Create(wxWindow *parent, const wxWindowID id = -1,
|
bool Create(wxWindow *parent, const wxWindowID id = -1,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
const long style = wxTR_HAS_BUTTONS,
|
const long style = wxTR_HAS_BUTTONS|wxTR_LINES_AT_ROOT,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = "wxTreeCtrl");
|
const wxString& name = "wxTreeCtrl");
|
||||||
|
|
||||||
@@ -201,12 +222,17 @@ class WXDLLEXPORT wxTreeEvent: public wxCommandEvent
|
|||||||
DECLARE_DYNAMIC_CLASS(wxTreeEvent)
|
DECLARE_DYNAMIC_CLASS(wxTreeEvent)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxTreeEvent(WXTYPE commandType = 0, int id = 0);
|
wxTreeEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
|
||||||
|
|
||||||
int m_code;
|
int m_code;
|
||||||
wxTreeItem m_item;
|
wxTreeItem m_item;
|
||||||
long m_oldItem;
|
long m_oldItem;
|
||||||
wxPoint m_pointDrag;
|
wxPoint m_pointDrag;
|
||||||
|
|
||||||
|
inline long GetOldItem() const { return m_oldItem; }
|
||||||
|
inline wxTreeItem& GetItem() const { return (wxTreeItem&) m_item; }
|
||||||
|
inline wxPoint GetPoint() const { return m_pointDrag; }
|
||||||
|
inline int GetCode() const { return m_code; }
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&);
|
typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&);
|
||||||
|
Reference in New Issue
Block a user