extra consts removed here and there
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3704 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -67,7 +67,7 @@ public:
|
|||||||
wxString GetName() const;
|
wxString GetName() const;
|
||||||
wxString GetFullName() const;
|
wxString GetFullName() const;
|
||||||
wxString GetHint() const;
|
wxString GetHint() const;
|
||||||
wxString GetEntry( const int num );
|
wxString GetEntry( int num );
|
||||||
bool IsDir();
|
bool IsDir();
|
||||||
bool IsLink();
|
bool IsLink();
|
||||||
bool IsExe();
|
bool IsExe();
|
||||||
@@ -92,10 +92,14 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
wxFileCtrl();
|
wxFileCtrl();
|
||||||
wxFileCtrl( wxWindow *win, const wxWindowID id,
|
wxFileCtrl( wxWindow *win,
|
||||||
const wxString &dirName, const wxString &wild,
|
wxWindowID id,
|
||||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
const wxString &dirName,
|
||||||
const long style = wxLC_LIST, const wxValidator &validator = wxDefaultValidator,
|
const wxString &wild,
|
||||||
|
const wxPoint &pos = wxDefaultPosition,
|
||||||
|
const wxSize &size = wxDefaultSize,
|
||||||
|
long style = wxLC_LIST,
|
||||||
|
const wxValidator &validator = wxDefaultValidator,
|
||||||
const wxString &name = _T("filelist") );
|
const wxString &name = _T("filelist") );
|
||||||
void ChangeToListMode();
|
void ChangeToListMode();
|
||||||
void ChangeToReportMode();
|
void ChangeToReportMode();
|
||||||
@@ -182,11 +186,14 @@ private:
|
|||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
#define wxOPEN 1
|
enum
|
||||||
#define wxSAVE 2
|
{
|
||||||
#define wxOVERWRITE_PROMPT 4
|
wxOPEN = 1,
|
||||||
#define wxHIDE_READONLY 8
|
wxSAVE = 2,
|
||||||
#define wxFILE_MUST_EXIST 16
|
wxOVERWRITE_PROMPT = 4,
|
||||||
|
wxHIDE_READONLY = 8,
|
||||||
|
wxFILE_MUST_EXIST = 16
|
||||||
|
}
|
||||||
|
|
||||||
// File selector - backward compatibility
|
// File selector - backward compatibility
|
||||||
WXDLLEXPORT wxString
|
WXDLLEXPORT wxString
|
||||||
|
@@ -80,6 +80,22 @@ static char * folder_xpm[] = {
|
|||||||
" ",
|
" ",
|
||||||
" "};
|
" "};
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// private functions
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
static
|
||||||
|
int ListCompare( long data1, long data2, long WXUNUSED(data) )
|
||||||
|
{
|
||||||
|
wxFileData *fd1 = (wxFileData*)data1 ;
|
||||||
|
wxFileData *fd2 = (wxFileData*)data2 ;
|
||||||
|
if (fd1->GetName() == _T("..")) return -1;
|
||||||
|
if (fd2->GetName() == _T("..")) return 1;
|
||||||
|
if (fd1->IsDir() && !fd2->IsDir()) return -1;
|
||||||
|
if (fd2->IsDir() && !fd1->IsDir()) return 1;
|
||||||
|
return strcmp( fd1->GetName(), fd2->GetName() );
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// wxFileData
|
// wxFileData
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -153,7 +169,7 @@ wxString wxFileData::GetHint() const
|
|||||||
return s;
|
return s;
|
||||||
};
|
};
|
||||||
|
|
||||||
wxString wxFileData::GetEntry( const int num )
|
wxString wxFileData::GetEntry( int num )
|
||||||
{
|
{
|
||||||
wxString s;
|
wxString s;
|
||||||
switch (num)
|
switch (num)
|
||||||
@@ -291,17 +307,6 @@ void wxFileCtrl::ShowHidden( bool show )
|
|||||||
Update();
|
Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
int ListCompare( const long data1, const long data2, const long WXUNUSED(data) )
|
|
||||||
{
|
|
||||||
wxFileData *fd1 = (wxFileData*)data1 ;
|
|
||||||
wxFileData *fd2 = (wxFileData*)data2 ;
|
|
||||||
if (fd1->GetName() == _T("..")) return -1;
|
|
||||||
if (fd2->GetName() == _T("..")) return 1;
|
|
||||||
if (fd1->IsDir() && !fd2->IsDir()) return -1;
|
|
||||||
if (fd2->IsDir() && !fd1->IsDir()) return 1;
|
|
||||||
return strcmp( fd1->GetName(), fd2->GetName() );
|
|
||||||
}
|
|
||||||
|
|
||||||
long wxFileCtrl::Add( wxFileData *fd, wxListItem &item )
|
long wxFileCtrl::Add( wxFileData *fd, wxListItem &item )
|
||||||
{
|
{
|
||||||
long ret = -1;
|
long ret = -1;
|
||||||
|
Reference in New Issue
Block a user