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 GetFullName() const;
|
||||
wxString GetHint() const;
|
||||
wxString GetEntry( const int num );
|
||||
wxString GetEntry( int num );
|
||||
bool IsDir();
|
||||
bool IsLink();
|
||||
bool IsExe();
|
||||
@@ -92,10 +92,14 @@ private:
|
||||
|
||||
public:
|
||||
wxFileCtrl();
|
||||
wxFileCtrl( wxWindow *win, const wxWindowID id,
|
||||
const wxString &dirName, const wxString &wild,
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
const long style = wxLC_LIST, const wxValidator &validator = wxDefaultValidator,
|
||||
wxFileCtrl( wxWindow *win,
|
||||
wxWindowID id,
|
||||
const wxString &dirName,
|
||||
const wxString &wild,
|
||||
const wxPoint &pos = wxDefaultPosition,
|
||||
const wxSize &size = wxDefaultSize,
|
||||
long style = wxLC_LIST,
|
||||
const wxValidator &validator = wxDefaultValidator,
|
||||
const wxString &name = _T("filelist") );
|
||||
void ChangeToListMode();
|
||||
void ChangeToReportMode();
|
||||
@@ -182,11 +186,14 @@ private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#define wxOPEN 1
|
||||
#define wxSAVE 2
|
||||
#define wxOVERWRITE_PROMPT 4
|
||||
#define wxHIDE_READONLY 8
|
||||
#define wxFILE_MUST_EXIST 16
|
||||
enum
|
||||
{
|
||||
wxOPEN = 1,
|
||||
wxSAVE = 2,
|
||||
wxOVERWRITE_PROMPT = 4,
|
||||
wxHIDE_READONLY = 8,
|
||||
wxFILE_MUST_EXIST = 16
|
||||
}
|
||||
|
||||
// File selector - backward compatibility
|
||||
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
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -153,7 +169,7 @@ wxString wxFileData::GetHint() const
|
||||
return s;
|
||||
};
|
||||
|
||||
wxString wxFileData::GetEntry( const int num )
|
||||
wxString wxFileData::GetEntry( int num )
|
||||
{
|
||||
wxString s;
|
||||
switch (num)
|
||||
@@ -291,17 +307,6 @@ void wxFileCtrl::ShowHidden( bool show )
|
||||
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 ret = -1;
|
||||
|
Reference in New Issue
Block a user