#define wxUSER_COLOURS 0x00800000
// Override CTL3D etc. control colour processing to
// allow own background colour
- // OBSOLETE - use wxNO_CTL3D instead
+ // OBSOLETE - use wxNO_3D instead
#define wxNO_3D 0x00800000
// Override CTL3D or native 3D styles for children
#define wxCLIP_CHILDREN 0x00400000
#define wxTR_HAS_BUTTONS 0x0004
#define wxTR_EDIT_LABELS 0x0008
+#define wxTR_LINES_AT_ROOT 0x0010
/*
* wxListCtrl flags
* Event types
*
*/
-enum {
+
+enum wxEventType {
+ wxEVT_NULL = 0,
wxEVT_FIRST = 10000,
// New names
wxEvent(int id = 0);
inline ~wxEvent(void) {}
- inline void SetEventType(WXTYPE typ) { m_eventType = typ; }
- inline WXTYPE GetEventType(void) const { return m_eventType; }
+ inline void SetEventType(wxEventType typ) { m_eventType = typ; }
+ inline wxEventType GetEventType(void) const { return m_eventType; }
inline wxObject *GetEventObject(void) const { return m_eventObject; }
inline void SetEventObject(wxObject *obj) { m_eventObject = obj; }
inline long GetTimestamp(void) const { return m_timeStamp; }
bool m_skipped;
wxObject* m_eventObject;
char* m_eventHandle; // Handle of an underlying windowing system event
- WXTYPE m_eventType;
+ wxEventType m_eventType;
long m_timeStamp;
int m_id;
wxObject* m_callbackUserData;
{
DECLARE_DYNAMIC_CLASS(wxCommandEvent)
- wxCommandEvent(WXTYPE commandType = 0, int id = 0);
+ wxCommandEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
inline ~wxCommandEvent(void) {}
/*
DECLARE_DYNAMIC_CLASS(wxScrollEvent)
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) {}
/*
DECLARE_DYNAMIC_CLASS(wxMouseEvent)
public:
- wxMouseEvent(WXTYPE mouseType = 0);
+ wxMouseEvent(wxEventType mouseType = wxEVT_NULL);
// Was it a button event? (*doesn't* mean: is any button *down*?)
inline bool IsButton(void) const { return Button(-1); }
DECLARE_DYNAMIC_CLASS(wxKeyEvent)
public:
- wxKeyEvent(WXTYPE keyType = 0);
+ wxKeyEvent(wxEventType keyType = wxEVT_NULL);
// Find state of shift/control keys
inline bool ControlDown(void) const { return m_controlDown; }
DECLARE_DYNAMIC_CLASS(wxFocusEvent)
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
public:
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; }
};
public:
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; }
};
DECLARE_DYNAMIC_CLASS(wxCloseEvent)
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_id = id; m_force = FALSE; }
int m_buttonState; // Which buttons are down?
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_joyStick = joystick; m_buttonChange = change; }
wxPoint m_pos;
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; }
inline wxPoint GetPosition(void) const { return m_pos; }
DECLARE_DYNAMIC_CLASS(wxListEvent)
public:
- wxListEvent(WXTYPE commandType = 0, int id = 0);
+ wxListEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
int m_code;
long m_itemIndex;
void OnPaint( wxPaintEvent &event );
void HilightAll( const bool on );
void ActivateLine( wxListLineData *line );
- void SendNotify( wxListLineData *line, long command );
+ void SendNotify( wxListLineData *line, wxEventType command );
void FocusLine( wxListLineData *line );
void UnfocusLine( wxListLineData *line );
void SelectLine( wxListLineData *line );
long m_data;
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; }
};
//-----------------------------------------------------------------------------
DECLARE_DYNAMIC_CLASS(wxTreeEvent)
public:
- wxTreeEvent(WXTYPE commandType = 0, int id = 0);
+ wxTreeEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
int m_code;
wxTreeItem m_item;
long m_oldItem;
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&);
DECLARE_DYNAMIC_CLASS(wxListEvent)
public:
- wxListEvent(WXTYPE commandType = 0, int id = 0);
+ wxListEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
int m_code;
long m_itemIndex;
DECLARE_DYNAMIC_CLASS(wxSpinEvent)
public:
- wxSpinEvent(WXTYPE commandType = 0, int id = 0);
+ wxSpinEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
};
typedef void (wxEvtHandler::*wxSpinEventFunction)(wxSpinEvent&);
DECLARE_DYNAMIC_CLASS(wxTabEvent)
public:
- wxTabEvent(WXTYPE commandType = 0, int id = 0);
+ wxTabEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
};
typedef void (wxEvtHandler::*wxTabEventFunction)(wxTabEvent&);
long m_data;
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
inline wxTreeCtrl(wxWindow *parent, const wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
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 wxString& name = "wxTreeCtrl")
{
bool Create(wxWindow *parent, const wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
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 wxString& name = "wxTreeCtrl");
DECLARE_DYNAMIC_CLASS(wxTreeEvent)
public:
- wxTreeEvent(WXTYPE commandType = 0, int id = 0);
+ wxTreeEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
int m_code;
wxTreeItem m_item;
long m_oldItem;
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&);