merged 2.4 branch into the trunk
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -43,12 +43,7 @@ public:
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxCAL_SHOW_HOLIDAYS | wxWANTS_CHARS,
|
||||
const wxString& name = wxCalendarNameStr)
|
||||
{
|
||||
Init();
|
||||
|
||||
(void)Create(parent, id, date, pos, size, style, name);
|
||||
}
|
||||
const wxString& name = wxCalendarNameStr);
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
|
@@ -102,9 +102,9 @@ public:
|
||||
int defaultFilter = 0,
|
||||
const wxString& name = wxTreeCtrlNameStr );
|
||||
|
||||
void Init();
|
||||
virtual void Init();
|
||||
|
||||
~wxGenericDirCtrl();
|
||||
virtual ~wxGenericDirCtrl();
|
||||
|
||||
void OnExpandItem(wxTreeEvent &event );
|
||||
void OnCollapseItem(wxTreeEvent &event );
|
||||
@@ -113,52 +113,52 @@ public:
|
||||
void OnSize(wxSizeEvent &event );
|
||||
|
||||
// Try to expand as much of the given path as possible.
|
||||
bool ExpandPath(const wxString& path);
|
||||
virtual bool ExpandPath(const wxString& path);
|
||||
|
||||
// Accessors
|
||||
|
||||
inline wxString GetDefaultPath() const { return m_defaultPath; }
|
||||
void SetDefaultPath(const wxString& path) { m_defaultPath = path; }
|
||||
virtual inline wxString GetDefaultPath() const { return m_defaultPath; }
|
||||
virtual void SetDefaultPath(const wxString& path) { m_defaultPath = path; }
|
||||
|
||||
// Get dir or filename
|
||||
wxString GetPath() const;
|
||||
virtual wxString GetPath() const;
|
||||
|
||||
// Get selected filename path only (else empty string).
|
||||
// I.e. don't count a directory as a selection
|
||||
wxString GetFilePath() const;
|
||||
void SetPath(const wxString& path);
|
||||
virtual wxString GetFilePath() const;
|
||||
virtual void SetPath(const wxString& path);
|
||||
|
||||
void ShowHidden( bool show );
|
||||
bool GetShowHidden() { return m_showHidden; }
|
||||
virtual void ShowHidden( bool show );
|
||||
virtual bool GetShowHidden() { return m_showHidden; }
|
||||
|
||||
wxString GetFilter() const { return m_filter; }
|
||||
void SetFilter(const wxString& filter);
|
||||
virtual wxString GetFilter() const { return m_filter; }
|
||||
virtual void SetFilter(const wxString& filter);
|
||||
|
||||
int GetFilterIndex() const { return m_currentFilter; }
|
||||
void SetFilterIndex(int n);
|
||||
virtual int GetFilterIndex() const { return m_currentFilter; }
|
||||
virtual void SetFilterIndex(int n);
|
||||
|
||||
wxTreeItemId GetRootId() { return m_rootId; }
|
||||
virtual wxTreeItemId GetRootId() { return m_rootId; }
|
||||
|
||||
wxTreeCtrl* GetTreeCtrl() const { return m_treeCtrl; }
|
||||
wxDirFilterListCtrl* GetFilterListCtrl() const { return m_filterListCtrl; }
|
||||
virtual wxTreeCtrl* GetTreeCtrl() const { return m_treeCtrl; }
|
||||
virtual wxDirFilterListCtrl* GetFilterListCtrl() const { return m_filterListCtrl; }
|
||||
|
||||
// Helper
|
||||
void SetupSections();
|
||||
virtual void SetupSections();
|
||||
|
||||
// Parse the filter into an array of filters and an array of descriptions
|
||||
int ParseFilter(const wxString& filterStr, wxArrayString& filters, wxArrayString& descriptions);
|
||||
virtual int ParseFilter(const wxString& filterStr, wxArrayString& filters, wxArrayString& descriptions);
|
||||
|
||||
// Find the child that matches the first part of 'path'.
|
||||
// E.g. if a child path is "/usr" and 'path' is "/usr/include"
|
||||
// then the child for /usr is returned.
|
||||
// If the path string has been used (we're at the leaf), done is set to TRUE
|
||||
wxTreeItemId FindChild(wxTreeItemId parentId, const wxString& path, bool& done);
|
||||
virtual wxTreeItemId FindChild(wxTreeItemId parentId, const wxString& path, bool& done);
|
||||
|
||||
// Resize the components of the control
|
||||
void DoResize();
|
||||
virtual void DoResize();
|
||||
|
||||
// Collapse & expand the tree, thus re-creating it from scratch:
|
||||
void ReCreateTree();
|
||||
virtual void ReCreateTree();
|
||||
|
||||
protected:
|
||||
void ExpandDir(wxTreeItemId parentId);
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/generic/dragimgg.h
|
||||
// Purpose: wxDragImage class: a kind of a cursor, that can cope
|
||||
// with more sophisticated images
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "wx/cursor.h"
|
||||
#include "wx/treectrl.h"
|
||||
#include "wx/listctrl.h"
|
||||
#include "wx/log.h"
|
||||
|
||||
/*
|
||||
To use this class, create a wxDragImage when you start dragging, for example:
|
||||
|
@@ -89,13 +89,16 @@ public:
|
||||
void OnHome( wxCommandEvent &event );
|
||||
void OnListOk( wxCommandEvent &event );
|
||||
void OnNew( wxCommandEvent &event );
|
||||
void OnChoice( wxCommandEvent &event );
|
||||
void OnChoiceFilter( wxCommandEvent &event );
|
||||
void OnTextEnter( wxCommandEvent &event );
|
||||
void OnCheck( wxCommandEvent &event );
|
||||
|
||||
void HandleAction( const wxString &fn );
|
||||
|
||||
protected:
|
||||
// use the filter with the given index
|
||||
void DoSetFilterIndex(int filterindex);
|
||||
|
||||
wxString m_message;
|
||||
long m_dialogStyle;
|
||||
wxString m_dir;
|
||||
|
@@ -1824,7 +1824,7 @@ protected:
|
||||
bool GetModelValues();
|
||||
bool SetModelValues();
|
||||
|
||||
friend class wxGridSelection;
|
||||
friend class WXDLLEXPORT wxGridSelection;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS( wxGrid )
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
@@ -82,7 +82,7 @@ private:
|
||||
wxGrid *m_grid;
|
||||
wxGrid::wxGridSelectionModes m_selectionMode;
|
||||
|
||||
friend class wxGrid;
|
||||
friend class WXDLLEXPORT wxGrid;
|
||||
};
|
||||
|
||||
#endif // #ifdef __WXGRIDSEL_H__
|
||||
|
@@ -86,7 +86,7 @@ DECLARE_ABSTRACT_CLASS(wxHTMLHelpControllerBase)
|
||||
@file Name of help directory.
|
||||
@return true on success
|
||||
*/
|
||||
virtual bool LoadFile(const wxString& file = "");
|
||||
virtual bool LoadFile(const wxString& file = wxT(""));
|
||||
|
||||
/** Display list of all help entries.
|
||||
@return true on success
|
||||
|
@@ -61,9 +61,7 @@ enum wxLayoutAlignment
|
||||
|
||||
class WXDLLEXPORT wxQueryLayoutInfoEvent: public wxEvent
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxQueryLayoutInfoEvent)
|
||||
public:
|
||||
|
||||
wxQueryLayoutInfoEvent(wxWindowID id = 0)
|
||||
{
|
||||
SetEventType(wxEVT_QUERY_LAYOUT_INFO);
|
||||
@@ -99,7 +97,9 @@ protected:
|
||||
wxSize m_size;
|
||||
wxLayoutOrientation m_orientation;
|
||||
wxLayoutAlignment m_alignment;
|
||||
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxQueryLayoutInfoEvent)
|
||||
};
|
||||
|
||||
typedef void (wxEvtHandler::*wxQueryLayoutInfoEventFunction)(wxQueryLayoutInfoEvent&);
|
||||
@@ -113,7 +113,6 @@ typedef void (wxEvtHandler::*wxQueryLayoutInfoEventFunction)(wxQueryLayoutInfoEv
|
||||
|
||||
class WXDLLEXPORT wxCalculateLayoutEvent: public wxEvent
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxCalculateLayoutEvent)
|
||||
public:
|
||||
wxCalculateLayoutEvent(wxWindowID id = 0)
|
||||
{
|
||||
@@ -135,6 +134,9 @@ public:
|
||||
protected:
|
||||
int m_flags;
|
||||
wxRect m_rect;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxCalculateLayoutEvent)
|
||||
};
|
||||
|
||||
typedef void (wxEvtHandler::*wxCalculateLayoutEventFunction)(wxCalculateLayoutEvent&);
|
||||
@@ -149,7 +151,6 @@ typedef void (wxEvtHandler::*wxCalculateLayoutEventFunction)(wxCalculateLayoutEv
|
||||
// an IDE-style interface.
|
||||
class WXDLLEXPORT wxSashLayoutWindow: public wxSashWindow
|
||||
{
|
||||
DECLARE_CLASS(wxSashLayoutWindow)
|
||||
public:
|
||||
wxSashLayoutWindow()
|
||||
{
|
||||
@@ -157,13 +158,13 @@ public:
|
||||
}
|
||||
|
||||
wxSashLayoutWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = "layoutWindow")
|
||||
const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = wxT("layoutWindow"))
|
||||
{
|
||||
Create(parent, id, pos, size, style, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = "layoutWindow");
|
||||
const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = wxT("layoutWindow"));
|
||||
|
||||
// Accessors
|
||||
inline wxLayoutAlignment GetAlignment() const { return m_alignment; };
|
||||
@@ -190,7 +191,9 @@ private:
|
||||
wxLayoutOrientation m_orientation;
|
||||
wxSize m_defaultSize;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
private:
|
||||
DECLARE_CLASS(wxSashLayoutWindow)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif // wxUSE_SASH
|
||||
|
@@ -72,7 +72,7 @@ public:
|
||||
const wxSize &size = wxDefaultSize,
|
||||
long style = wxLC_ICON,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString &name = "listctrl" )
|
||||
const wxString &name = wxT("listctrl") )
|
||||
{
|
||||
Create(parent, id, pos, size, style, validator, name);
|
||||
}
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
const wxSize &size = wxDefaultSize,
|
||||
long style = wxLC_ICON,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString &name = "listctrl" );
|
||||
const wxString &name = wxT("listctrl") );
|
||||
|
||||
bool GetColumn( int col, wxListItem& item ) const;
|
||||
bool SetColumn( int col, wxListItem& item );
|
||||
@@ -246,7 +246,7 @@ public:
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxLC_ICON,
|
||||
const wxValidator &validator = wxDefaultValidator,
|
||||
const wxString &name = "listctrl" )
|
||||
const wxString &name = wxT("listctrl") )
|
||||
: wxGenericListCtrl(parent, id, pos, size, style, validator, name)
|
||||
{
|
||||
}
|
||||
|
@@ -265,6 +265,8 @@ private:
|
||||
|
||||
#if wxUSE_GENERIC_MDI_AS_NATIVE
|
||||
|
||||
class wxMDIChildFrame ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxMDIParentFrame
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -284,6 +286,9 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
wxMDIChildFrame * GetActiveChild() const ;
|
||||
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxMDIParentFrame)
|
||||
};
|
||||
|
@@ -82,8 +82,8 @@ public:
|
||||
virtual void InitDialog();
|
||||
|
||||
#ifdef __WXUNIVERSAL__
|
||||
virtual bool IsCanvasWindow() { return TRUE; }
|
||||
virtual bool ProvidesBackground() { return TRUE; }
|
||||
virtual bool IsCanvasWindow() const { return TRUE; }
|
||||
virtual bool ProvidesBackground() const { return TRUE; }
|
||||
#endif
|
||||
|
||||
WX_DECLARE_CONTROL_CONTAINER();
|
||||
|
@@ -69,13 +69,7 @@ public:
|
||||
|
||||
class WXDLLEXPORT wxSashWindow: public wxWindow
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxSashWindow)
|
||||
|
||||
public:
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Public API
|
||||
|
||||
// Default constructor
|
||||
wxSashWindow()
|
||||
{
|
||||
@@ -84,7 +78,7 @@ public:
|
||||
|
||||
// Normal constructor
|
||||
wxSashWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = "sashWindow")
|
||||
const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = wxT("sashWindow"))
|
||||
{
|
||||
Init();
|
||||
Create(parent, id, pos, size, style, name);
|
||||
@@ -93,7 +87,7 @@ public:
|
||||
~wxSashWindow();
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = "sashWindow");
|
||||
const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = wxT("sashWindow"));
|
||||
|
||||
// Set whether there's a sash in this position
|
||||
void SetSashVisible(wxSashEdgePosition edge, bool sash);
|
||||
@@ -144,6 +138,11 @@ public:
|
||||
// Adjusts the panes
|
||||
void OnSize(wxSizeEvent& event);
|
||||
|
||||
#ifdef __WXMSW__
|
||||
// Handle cursor correctly
|
||||
void OnSetCursor(wxSetCursorEvent& event);
|
||||
#endif // wxMSW
|
||||
|
||||
// Draws borders
|
||||
void DrawBorders(wxDC& dc);
|
||||
|
||||
@@ -189,8 +188,11 @@ private:
|
||||
wxColour m_hilightColour;
|
||||
wxColour m_faceColour;
|
||||
bool m_mouseCaptured;
|
||||
wxCursor* m_currentCursor;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxSashWindow)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
BEGIN_DECLARE_EVENT_TYPES()
|
||||
@@ -207,9 +209,7 @@ enum wxSashDragStatus
|
||||
|
||||
class WXDLLEXPORT wxSashEvent: public wxCommandEvent
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxSashEvent)
|
||||
|
||||
public:
|
||||
public:
|
||||
inline wxSashEvent(int id = 0, wxSashEdgePosition edge = wxSASH_NONE) {
|
||||
m_eventType = (wxEventType) wxEVT_SASH_DRAGGED; m_id = id; m_edge = edge; }
|
||||
|
||||
@@ -224,10 +224,14 @@ class WXDLLEXPORT wxSashEvent: public wxCommandEvent
|
||||
//// dragging the top below the bottom)
|
||||
inline void SetDragStatus(wxSashDragStatus status) { m_dragStatus = status; }
|
||||
inline wxSashDragStatus GetDragStatus() const { return m_dragStatus; }
|
||||
private:
|
||||
|
||||
private:
|
||||
wxSashEdgePosition m_edge;
|
||||
wxRect m_dragRect;
|
||||
wxSashDragStatus m_dragStatus;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxSashEvent)
|
||||
};
|
||||
|
||||
typedef void (wxEvtHandler::*wxSashEventFunction)(wxSashEvent&);
|
||||
|
@@ -69,6 +69,8 @@ public:
|
||||
// lay out the window and its children
|
||||
virtual bool Layout();
|
||||
|
||||
virtual void DoSetVirtualSize(int x, int y);
|
||||
|
||||
protected:
|
||||
// this is needed for wxEVT_PAINT processing hack described in
|
||||
// wxScrollHelperEvtHandler::ProcessEvent()
|
||||
|
@@ -71,7 +71,7 @@ public:
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSP_3D,
|
||||
const wxString& name = "splitter")
|
||||
const wxString& name = wxT("splitter"))
|
||||
{
|
||||
Init();
|
||||
Create(parent, id, pos, size, style, name);
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSP_3D,
|
||||
const wxString& name = "splitter");
|
||||
const wxString& name = wxT("splitter"));
|
||||
|
||||
// Gets the only or left/top pane
|
||||
wxWindow *GetWindow1() const { return m_windowOne; }
|
||||
|
@@ -92,7 +92,9 @@ public:
|
||||
void SetBorderY(int y);
|
||||
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
void OnSize(wxSizeEvent& event);
|
||||
|
||||
void OnLeftDown(wxMouseEvent& event);
|
||||
void OnRightDown(wxMouseEvent& event);
|
||||
|
||||
virtual void InitColours();
|
||||
|
||||
@@ -105,6 +107,8 @@ protected:
|
||||
|
||||
wxArrayString m_statusStrings;
|
||||
|
||||
// the last known width of the client rect (used to rebuild cache)
|
||||
int m_lastClientWidth;
|
||||
// the widths of the status bar panes in pixels
|
||||
wxArrayInt m_widthsAbs;
|
||||
|
||||
|
@@ -117,6 +117,15 @@ public:
|
||||
// get the data associated with the item
|
||||
wxTreeItemData *GetItemData(const wxTreeItemId& item) const;
|
||||
|
||||
// get the item's text colour
|
||||
wxColour GetItemTextColour(const wxTreeItemId& item) const;
|
||||
|
||||
// get the item's background colour
|
||||
wxColour GetItemBackgroundColour(const wxTreeItemId& item) const;
|
||||
|
||||
// get the item's font
|
||||
wxFont GetItemFont(const wxTreeItemId& item) const;
|
||||
|
||||
// modifiers
|
||||
// ---------
|
||||
|
||||
|
@@ -29,8 +29,6 @@ class wxMouseEvent;
|
||||
|
||||
class WXDLLEXPORT wxTreeLayout: public wxObject
|
||||
{
|
||||
DECLARE_ABSTRACT_CLASS(wxTreeLayout)
|
||||
|
||||
public:
|
||||
wxTreeLayout();
|
||||
virtual ~wxTreeLayout() { }
|
||||
@@ -49,7 +47,7 @@ public:
|
||||
// Optional redefinition
|
||||
void Initialize(void);
|
||||
inline virtual void SetNodeName(long WXUNUSED(id), const wxString& WXUNUSED(name)) {}
|
||||
inline virtual wxString GetNodeName(long WXUNUSED(id)) { return wxString(""); }
|
||||
inline virtual wxString GetNodeName(long WXUNUSED(id)) { return wxString(wxT("")); }
|
||||
virtual void GetNodeSize(long id, long *x, long *y, wxDC& dc);
|
||||
virtual void Draw(wxDC& dc);
|
||||
virtual void DrawNodes(wxDC& dc);
|
||||
@@ -76,8 +74,6 @@ public:
|
||||
private:
|
||||
void CalcLayout(long node_id, int level, wxDC& dc);
|
||||
|
||||
// Members
|
||||
|
||||
protected:
|
||||
long m_parentNode;
|
||||
long m_lastY;
|
||||
@@ -87,6 +83,9 @@ protected:
|
||||
long m_topMargin;
|
||||
long m_leftMargin;
|
||||
bool m_orientation; // TRUE for top-to-bottom, FALSE for left-to-right
|
||||
|
||||
private:
|
||||
DECLARE_ABSTRACT_CLASS(wxTreeLayout)
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxStoredNode
|
||||
@@ -105,7 +104,6 @@ public:
|
||||
|
||||
class WXDLLEXPORT wxTreeLayoutStored: public wxTreeLayout
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxTreeLayoutStored)
|
||||
public:
|
||||
wxTreeLayoutStored(int noNodes = 200);
|
||||
virtual ~wxTreeLayoutStored(void);
|
||||
@@ -130,7 +128,7 @@ public:
|
||||
virtual void SetClientData(long id, long clientData);
|
||||
virtual long GetClientData(long id) const;
|
||||
|
||||
virtual long AddChild(const wxString& name, const wxString& parent = "");
|
||||
virtual long AddChild(const wxString& name, const wxString& parent = wxT(""));
|
||||
virtual long AddChild(const wxString& name, long parent);
|
||||
virtual long NameToId(const wxString& name);
|
||||
|
||||
@@ -139,6 +137,9 @@ private:
|
||||
wxStoredNode* m_nodes;
|
||||
int m_num;
|
||||
int m_maxNodes;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxTreeLayoutStored)
|
||||
};
|
||||
|
||||
// For backward compatibility
|
||||
|
Reference in New Issue
Block a user