]>
git.saurik.com Git - wxWidgets.git/blob - user/wxFile/filectrl.h
2 * Author: Robert Roebling
4 * Copyright: (C) 1997,1998 Robert Roebling
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the wxWindows Licence, which
8 * you have received with this library (see Licence.htm).
20 #include "wx/listctrl.h"
22 //-----------------------------------------------------------------------------
24 //-----------------------------------------------------------------------------
29 //-----------------------------------------------------------------------------
31 //-----------------------------------------------------------------------------
33 class wxFileData
: public wxObject
35 DECLARE_DYNAMIC_CLASS(wxFileData
);
46 wxString m_permissions
;
52 wxFileData( void ) {};
53 wxFileData( const wxString
&name
, const wxString
&fname
);
54 wxString
GetName(void) const;
55 wxString
GetFullName(void) const;
56 wxString
GetHint(void) const;
57 wxString
GetEntry( const int num
);
62 bool NewNameIsLegal( const wxString
&s
);
63 bool Rename( const wxString
&s
);
64 void MakeItem( wxListItem
&item
);
67 //-----------------------------------------------------------------------------
69 //-----------------------------------------------------------------------------
71 class wxFileCtrl
: public wxListCtrl
73 DECLARE_DYNAMIC_CLASS(wxFileCtrl
);
77 static wxFileCtrl
* m_lastFocus
;
88 wxFileCtrl( wxWindow
*win
, const wxWindowID id
, const wxString
&dirName
,
89 const wxPoint
&pos
= wxDefaultPosition
, const wxSize
&size
= wxDefaultSize
,
90 const long style
= wxLC_LIST
, const wxString
&name
= "filelist" );
91 void ChangeToListMode();
92 void ChangeToReportMode();
93 void ChangeToIconMode();
94 void ShowHidden( bool show
= TRUE
);
96 virtual void StatusbarText( char *WXUNUSED(text
) ) {};
97 int FillList( wxStringList
&list
);
98 void DeleteFiles(void);
99 void CopyFiles( char *dest
);
100 void MoveFiles( char *dest
);
101 void RenameFile(void);
103 void GoToParentDir(void);
104 void GoToHomeDir(void);
105 void GoToDir( const wxString
&dir
);
106 void GetDir( wxString
&dir
);
107 void OnListDeleteItem( wxListEvent
&event
);
108 void OnListKeyDown( wxListEvent
&event
);
109 void OnListEndLabelEdit( wxListEvent
&event
);
110 void OnSetFocus( wxFocusEvent
&event
);
112 DECLARE_EVENT_TABLE()