projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
provide generic implementation for ShowScrollbars() too
[wxWidgets.git]
/
include
/
wx
/
generic
/
dirctrlg.h
diff --git
a/include/wx/generic/dirctrlg.h
b/include/wx/generic/dirctrlg.h
index 0c5627ca0861d31e7719bc1aea62e722e16b07e1..bd09b3c8a6fb4cd8209071a6458981259698873f 100644
(file)
--- a/
include/wx/generic/dirctrlg.h
+++ b/
include/wx/generic/dirctrlg.h
@@
-15,8
+15,8
@@
#ifndef _WX_DIRCTRL_H_
#define _WX_DIRCTRL_H_
#ifndef _WX_DIRCTRL_H_
#define _WX_DIRCTRL_H_
-#if
defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-
#pragma interface "dirctrlg
.h"
+#if
wxUSE_DIRDLG || wxUSE_FILEDLG
+
#include "wx/imaglist
.h"
#endif
#if wxUSE_DIRDLG
#endif
#if wxUSE_DIRDLG
@@
-30,9
+30,9
@@
// classes
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
-class WXDLLIMPEXP_CORE wxTextCtrl;
-class WXDLLIMPEXP_CORE wxImageList;
-class WXDLLIMPEXP_BASE wxHashTable;
+class WXDLLIMPEXP_
FWD_
CORE wxTextCtrl;
+class WXDLLIMPEXP_
FWD_
CORE wxImageList;
+class WXDLLIMPEXP_
FWD_
BASE wxHashTable;
//-----------------------------------------------------------------------------
// Extra styles for wxGenericDirCtrl
//-----------------------------------------------------------------------------
// Extra styles for wxGenericDirCtrl
@@
-44,8
+44,10
@@
enum
wxDIRCTRL_DIR_ONLY = 0x0010,
// When setting the default path, select the first file in the directory
wxDIRCTRL_SELECT_FIRST = 0x0020,
wxDIRCTRL_DIR_ONLY = 0x0010,
// When setting the default path, select the first file in the directory
wxDIRCTRL_SELECT_FIRST = 0x0020,
- // Show the filter list
+#if WXWIN_COMPATIBILITY_2_8
+ // Unused, for compatibility only
wxDIRCTRL_SHOW_FILTERS = 0x0040,
wxDIRCTRL_SHOW_FILTERS = 0x0040,
+#endif // WXWIN_COMPATIBILITY_2_8
// Use 3D borders on internal controls
wxDIRCTRL_3D_INTERNAL = 0x0080,
// Editable labels
// Use 3D borders on internal controls
wxDIRCTRL_3D_INTERNAL = 0x0080,
// Editable labels
@@
-56,11
+58,11
@@
enum
// wxDirItemData
//-----------------------------------------------------------------------------
// wxDirItemData
//-----------------------------------------------------------------------------
-class WXDLL
EXPORT
wxDirItemData : public wxTreeItemData
+class WXDLL
IMPEXP_CORE
wxDirItemData : public wxTreeItemData
{
public:
wxDirItemData(const wxString& path, const wxString& name, bool isDir);
{
public:
wxDirItemData(const wxString& path, const wxString& name, bool isDir);
- ~wxDirItemData();
+ virtual ~wxDirItemData(){}
void SetNewDirName(const wxString& path);
bool HasSubDirs() const;
void SetNewDirName(const wxString& path);
bool HasSubDirs() const;
@@
-76,9
+78,9
@@
public:
// wxDirCtrl
//-----------------------------------------------------------------------------
// wxDirCtrl
//-----------------------------------------------------------------------------
-class WXDLL
EXPORT
wxDirFilterListCtrl;
+class WXDLL
IMPEXP_FWD_CORE
wxDirFilterListCtrl;
-class WXDLL
EXPORT
wxGenericDirCtrl: public wxControl
+class WXDLL
IMPEXP_CORE
wxGenericDirCtrl: public wxControl
{
public:
wxGenericDirCtrl();
{
public:
wxGenericDirCtrl();
@@
-86,7
+88,7
@@
public:
const wxString &dir = wxDirDialogDefaultFolderStr,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
const wxString &dir = wxDirDialogDefaultFolderStr,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = wxDIRCTRL_3D_INTERNAL
|wxSUNKEN_BORDER
,
+ long style = wxDIRCTRL_3D_INTERNAL,
const wxString& filter = wxEmptyString,
int defaultFilter = 0,
const wxString& name = wxTreeCtrlNameStr )
const wxString& filter = wxEmptyString,
int defaultFilter = 0,
const wxString& name = wxTreeCtrlNameStr )
@@
-99,7
+101,7
@@
public:
const wxString &dir = wxDirDialogDefaultFolderStr,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
const wxString &dir = wxDirDialogDefaultFolderStr,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = wxDIRCTRL_3D_INTERNAL
|wxSUNKEN_BORDER
,
+ long style = wxDIRCTRL_3D_INTERNAL,
const wxString& filter = wxEmptyString,
int defaultFilter = 0,
const wxString& name = wxTreeCtrlNameStr );
const wxString& filter = wxEmptyString,
int defaultFilter = 0,
const wxString& name = wxTreeCtrlNameStr );
@@
-116,6
+118,8
@@
public:
// Try to expand as much of the given path as possible.
virtual bool ExpandPath(const wxString& path);
// Try to expand as much of the given path as possible.
virtual bool ExpandPath(const wxString& path);
+ // collapse the path
+ virtual bool CollapsePath(const wxString& path);
// Accessors
// Accessors
@@
-147,11
+151,6
@@
public:
// Helper
virtual void SetupSections();
// Helper
virtual void SetupSections();
-#if WXWIN_COMPATIBILITY_2_4
- // Parse the filter into an array of filters and an array of descriptions
- virtual int ParseFilter(const wxString& filterStr, wxArrayString& filters, wxArrayString& descriptions);
-#endif // WXWIN_COMPATIBILITY_2_4
-
// 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.
// 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.
@@
-164,7
+163,15
@@
public:
// Collapse & expand the tree, thus re-creating it from scratch:
virtual void ReCreateTree();
// Collapse & expand the tree, thus re-creating it from scratch:
virtual void ReCreateTree();
+ // Collapse the entire tree
+ virtual void CollapseTree();
+
+
+ // overridden base class methods
+ virtual void SetFocus();
+
protected:
protected:
+ virtual void ExpandRoot();
virtual void ExpandDir(wxTreeItemId parentId);
virtual void CollapseDir(wxTreeItemId parentId);
virtual const wxTreeItemId AddSection(const wxString& path, const wxString& name, int imageId = 0);
virtual void ExpandDir(wxTreeItemId parentId);
virtual void CollapseDir(wxTreeItemId parentId);
virtual const wxTreeItemId AddSection(const wxString& path, const wxString& name, int imageId = 0);
@@
-173,6
+180,7
@@
protected:
int image = -1, int selectedImage = -1,
wxTreeItemData * data = NULL);
//void FindChildFiles(wxTreeItemId id, int dirFlags, wxArrayString& filenames);
int image = -1, int selectedImage = -1,
wxTreeItemData * data = NULL);
//void FindChildFiles(wxTreeItemId id, int dirFlags, wxArrayString& filenames);
+ virtual wxTreeCtrl* CreateTreeCtrl(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long treeStyle);
// Extract description and actual filter from overall filter string
bool ExtractWildcard(const wxString& filterStr, int n, wxString& filter, wxString& description);
// Extract description and actual filter from overall filter string
bool ExtractWildcard(const wxString& filterStr, int n, wxString& filter, wxString& description);
@@
-198,7
+206,7
@@
private:
// wxDirFilterListCtrl
//-----------------------------------------------------------------------------
// wxDirFilterListCtrl
//-----------------------------------------------------------------------------
-class WXDLL
EXPORT
wxDirFilterListCtrl: public wxChoice
+class WXDLL
IMPEXP_CORE
wxDirFilterListCtrl: public wxChoice
{
public:
wxDirFilterListCtrl() { Init(); }
{
public:
wxDirFilterListCtrl() { Init(); }
@@
-218,7
+226,7
@@
public:
void Init();
void Init();
- ~wxDirFilterListCtrl() {};
+ virtual ~wxDirFilterListCtrl() {}
//// Operations
void FillFilterList(const wxString& filter, int defaultFilter);
//// Operations
void FillFilterList(const wxString& filter, int defaultFilter);
@@
-242,11
+250,15
@@
protected:
#define wxID_TREECTRL 7000
#define wxID_FILTERLISTCTRL 7001
#define wxID_TREECTRL 7000
#define wxID_FILTERLISTCTRL 7001
+#endif // wxUSE_DIRDLG
+
//-------------------------------------------------------------------------
// wxFileIconsTable - use wxTheFileIconsTable which is created as necessary
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
// wxFileIconsTable - use wxTheFileIconsTable which is created as necessary
//-------------------------------------------------------------------------
-class WXDLLEXPORT wxFileIconsTable
+#if wxUSE_DIRDLG || wxUSE_FILEDLG
+
+class WXDLLIMPEXP_CORE wxFileIconsTable
{
public:
wxFileIconsTable();
{
public:
wxFileIconsTable();
@@
-276,9
+288,9
@@
protected:
};
// The global fileicons table
};
// The global fileicons table
-
WXDLLEXPORT_DATA(extern
wxFileIconsTable *) wxTheFileIconsTable;
+
extern WXDLLIMPEXP_DATA_CORE(
wxFileIconsTable *) wxTheFileIconsTable;
-#endif // wxUSE_DIRDLG
+#endif // wxUSE_DIRDLG
|| wxUSE_FILEDLG
#endif
// _WX_DIRCTRLG_H_
#endif
// _WX_DIRCTRLG_H_