00001
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _HANDHELDINSTALLCTRL_H_
00019 #define _HANDHELDINSTALLCTRL_H_
00020
00021
00022
00023
00024
00025 #if defined(__GNUG__) && ! defined(__APPLE__)
00026 #pragma interface "hhictrl.h"
00027 #endif
00028
00029
00030
00031
00032
00033 #include "plucker_defines.h"
00034
00035
00036
00037
00038
00039 #include "wx/panel.h"
00040 #include "wx/imaglist.h"
00041 #include "wx/button.h"
00042 #include "wx/listctrl.h"
00043 #include "palm_installer.h"
00044 #include "pda_listctrl.h"
00045
00046
00047
00048
00049
00051
00058 class wxHandheldInstallCtrl : public wxPanel
00059 {
00060
00061 DECLARE_DYNAMIC_CLASS( wxHandheldInstallCtrl )
00062
00063 public:
00064
00066
00076 wxHandheldInstallCtrl( wxWindow *parent,
00077 wxWindowID id,
00078 const wxString& users_message = _( "Install files to these handhelds" ),
00079 const wxString& directories_message = _( "Install files to these directories" ),
00080 const wxPoint& pos = wxDefaultPosition,
00081 const wxSize& size = wxDefaultSize,
00082 const wxString& name = wxT( "handheldInstallCtrl" )
00083 );
00084
00085
00086 wxHandheldInstallCtrl() {};
00087
00089 ~wxHandheldInstallCtrl();
00090
00092
00097 void SetImageList( wxImageList* imageList );
00098
00100 void SetUsersImageListImageId( int imageId );
00101
00103
00106 void InsertUserDestinations( handheld_dest_array_type& handheld_dest_array );
00107
00109
00112 void GetUserDestinations( handheld_dest_array_type& handheld_dest_array );
00113
00115 void SetDirectoriesImageListImageId( int imageId );
00116
00118
00121 void InsertDirectoryDestinations( wxArrayString& directories );
00122
00124
00127 void GetDirectoryDestinations( wxArrayString& directoryDestinations );
00128
00130
00134 bool InstallFilesToDestinations( wxArrayString& install_fullnames );
00135
00137
00144 bool IsAllDestinationsEmpty();
00145
00146 protected:
00147
00148 void OnRemoveButtons( wxCommandEvent& event );
00149
00150 void OnUpdateUiUsersListCtrl( wxUpdateUIEvent& event );
00151 void OnUsersAddButton();
00152
00153 void OnUpdateUiDirectoriesListCtrl( wxUpdateUIEvent& event );
00154 void OnDirectoriesAddButton();
00155
00156 palm_installer* m_palmInstaller;
00157
00158 pda_listctrl* m_usersListCtrl;
00159 int m_usersListCtrlImageId;
00160 wxButton* m_usersAddButton;
00161 wxButton* m_usersRemoveButton;
00162
00163 wxListCtrl* m_directoriesListCtrl;
00164 int m_directoriesListCtrlImageId;
00165 wxButton* m_directoriesAddButton;
00166 wxButton* m_directoriesRemoveButton;
00167
00168 DECLARE_EVENT_TABLE()
00169
00170 };
00171
00172
00173
00174
00175
00176 #endif //_HANDHELDINSTALLCTRL_H_
00177