You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

163 lines
8.1KB

  1. ///////////////////////////////////////////////////////////////////////////
  2. // C++ code generated with wxFormBuilder (version Sep 15 2010)
  3. // http://www.wxformbuilder.org/
  4. //
  5. // PLEASE DO "NOT" EDIT THIS FILE!
  6. ///////////////////////////////////////////////////////////////////////////
  7. #include "cosmosGUI.h"
  8. ///////////////////////////////////////////////////////////////////////////
  9. cosmosGUI::cosmosGUI( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
  10. {
  11. this->SetSizeHints( wxDefaultSize, wxDefaultSize );
  12. menubar = new wxMenuBar( 0 );
  13. menu_Fichier = new wxMenu();
  14. wxMenuItem* menuitem_Import;
  15. menuitem_Import = new wxMenuItem( menu_Fichier, wxID_OPEN, wxString( wxT("Importer base") ) , wxEmptyString, wxITEM_NORMAL );
  16. #ifdef __WXMSW__
  17. menuitem_Import->SetBitmaps( wxBitmap( wxT("icons/import.png"), wxBITMAP_TYPE_ANY ) );
  18. #elif defined( __WXGTK__ )
  19. menuitem_Import->SetBitmap( wxBitmap( wxT("icons/import.png"), wxBITMAP_TYPE_ANY ) );
  20. #endif
  21. menu_Fichier->Append( menuitem_Import );
  22. wxMenuItem* menuitem_Export;
  23. menuitem_Export = new wxMenuItem( menu_Fichier, wxID_SAVE, wxString( wxT("Exporter base") ) , wxEmptyString, wxITEM_NORMAL );
  24. #ifdef __WXMSW__
  25. menuitem_Export->SetBitmaps( wxBitmap( wxT("icons/export.png"), wxBITMAP_TYPE_ANY ) );
  26. #elif defined( __WXGTK__ )
  27. menuitem_Export->SetBitmap( wxBitmap( wxT("icons/export.png"), wxBITMAP_TYPE_ANY ) );
  28. #endif
  29. menu_Fichier->Append( menuitem_Export );
  30. wxMenuItem* m_separator1;
  31. m_separator1 = menu_Fichier->AppendSeparator();
  32. wxMenuItem* menuitem_Quit;
  33. menuitem_Quit = new wxMenuItem( menu_Fichier, wxID_EXIT, wxString( wxT("Quitter") ) , wxEmptyString, wxITEM_NORMAL );
  34. menu_Fichier->Append( menuitem_Quit );
  35. menubar->Append( menu_Fichier, wxT("Fichier") );
  36. menu_Edit = new wxMenu();
  37. wxMenuItem* menuitem_Optionsprog;
  38. menuitem_Optionsprog = new wxMenuItem( menu_Edit, wxID_PROPERTIES, wxString( wxT("Options générales") ) , wxEmptyString, wxITEM_NORMAL );
  39. #ifdef __WXMSW__
  40. menuitem_Optionsprog->SetBitmaps( wxBitmap( wxT("icons/optionsgales.png"), wxBITMAP_TYPE_ANY ) );
  41. #elif defined( __WXGTK__ )
  42. menuitem_Optionsprog->SetBitmap( wxBitmap( wxT("icons/optionsgales.png"), wxBITMAP_TYPE_ANY ) );
  43. #endif
  44. menu_Edit->Append( menuitem_Optionsprog );
  45. menubar->Append( menu_Edit, wxT("Edition") );
  46. menu_Aide = new wxMenu();
  47. menubar->Append( menu_Aide, wxT("Aide") );
  48. this->SetMenuBar( menubar );
  49. toolbar = this->CreateToolBar( wxTB_FLAT|wxTB_HORIZONTAL, wxID_ANY );
  50. toolbar->AddTool( wxID_OPEN, wxT("Importer base"), wxBitmap( wxT("icons/import.png"), wxBITMAP_TYPE_ANY ), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString );
  51. toolbar->AddTool( wxID_SAVE, wxT("Exporter base"), wxBitmap( wxT("icons/export.png"), wxBITMAP_TYPE_ANY ), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString );
  52. toolbar->AddSeparator();
  53. toolbar->AddTool( wxID_NEW, wxT("Lancer"), wxBitmap( wxT("icons/play.png"), wxBITMAP_TYPE_ANY ), wxNullBitmap, wxITEM_NORMAL, wxT("Lancer la recherche"), wxEmptyString );
  54. toolbar->AddTool( wxID_FIND, wxT("Options"), wxBitmap( wxT("icons/optionsrche.png"), wxBITMAP_TYPE_ANY ), wxNullBitmap, wxITEM_NORMAL, wxT("Options de recherche"), wxEmptyString );
  55. toolbar->AddSeparator();
  56. toolbar->AddTool( wxID_DUPLICATE, wxT("Corrections"), wxBitmap( wxT("icons/correc.png"), wxBITMAP_TYPE_ANY ), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString );
  57. toolbar->AddSeparator();
  58. searchctrl = new wxSearchCtrl( toolbar, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
  59. #ifndef __WXMAC__
  60. searchctrl->ShowSearchButton( true );
  61. #endif
  62. searchctrl->ShowCancelButton( true );
  63. toolbar->AddControl( searchctrl );
  64. toolbar->Realize();
  65. wxBoxSizer* bSizer2;
  66. bSizer2 = new wxBoxSizer( wxVERTICAL );
  67. grid_Consults = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
  68. // Grid
  69. grid_Consults->CreateGrid( 0, 10 );
  70. grid_Consults->EnableEditing( true );
  71. grid_Consults->EnableGridLines( true );
  72. grid_Consults->EnableDragGridSize( true );
  73. grid_Consults->SetMargins( 0, 0 );
  74. // Columns
  75. grid_Consults->SetColSize( 0, 83 );
  76. grid_Consults->SetColSize( 1, 125 );
  77. grid_Consults->SetColSize( 2, 107 );
  78. grid_Consults->SetColSize( 3, 68 );
  79. grid_Consults->SetColSize( 4, 135 );
  80. grid_Consults->SetColSize( 5, 154 );
  81. grid_Consults->SetColSize( 6, 139 );
  82. grid_Consults->SetColSize( 7, 49 );
  83. grid_Consults->SetColSize( 8, 161 );
  84. grid_Consults->SetColSize( 9, 64 );
  85. grid_Consults->EnableDragColMove( false );
  86. grid_Consults->EnableDragColSize( true );
  87. grid_Consults->SetColLabelSize( 30 );
  88. grid_Consults->SetColLabelValue( 0, wxT("Publication ?") );
  89. grid_Consults->SetColLabelValue( 1, wxT("Consultant associé ?") );
  90. grid_Consults->SetColLabelValue( 2, wxT("Publication CHU ?") );
  91. grid_Consults->SetColLabelValue( 3, wxT("N° Dossier") );
  92. grid_Consults->SetColLabelValue( 4, wxT("Nom(s) demandeur(s)") );
  93. grid_Consults->SetColLabelValue( 5, wxT("Prénom(s) demandeur(s)") );
  94. grid_Consults->SetColLabelValue( 6, wxT("Nom(s) responsable(s)") );
  95. grid_Consults->SetColLabelValue( 7, wxT("Thème") );
  96. grid_Consults->SetColLabelValue( 8, wxT("Date dernière consultation") );
  97. grid_Consults->SetColLabelValue( 9, wxT("Résultats") );
  98. grid_Consults->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
  99. // Rows
  100. grid_Consults->EnableDragRowSize( false );
  101. grid_Consults->SetRowLabelSize( 80 );
  102. grid_Consults->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
  103. // Label Appearance
  104. // Cell Defaults
  105. grid_Consults->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
  106. bSizer2->Add( grid_Consults, 1, wxALL|wxEXPAND, 5 );
  107. this->SetSizer( bSizer2 );
  108. this->Layout();
  109. this->Centre( wxBOTH );
  110. // Connect Events
  111. this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( cosmosGUI::OnQuit ) );
  112. this->Connect( menuitem_Import->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( cosmosGUI::OnImport ) );
  113. this->Connect( menuitem_Export->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( cosmosGUI::OnExport ) );
  114. this->Connect( menuitem_Quit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( cosmosGUI::OnQuit ) );
  115. this->Connect( menuitem_Optionsprog->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( cosmosGUI::OnOptionsProg ) );
  116. this->Connect( wxID_OPEN, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( cosmosGUI::OnImport ) );
  117. this->Connect( wxID_SAVE, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( cosmosGUI::OnExport ) );
  118. this->Connect( wxID_NEW, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( cosmosGUI::OnStart ) );
  119. this->Connect( wxID_FIND, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( cosmosGUI::OnOptionsRche ) );
  120. this->Connect( wxID_DUPLICATE, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( cosmosGUI::OnCorrections ) );
  121. searchctrl->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( cosmosGUI::OnSearch ), NULL, this );
  122. }
  123. cosmosGUI::~cosmosGUI()
  124. {
  125. // Disconnect Events
  126. this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( cosmosGUI::OnQuit ) );
  127. this->Disconnect( wxID_OPEN, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( cosmosGUI::OnImport ) );
  128. this->Disconnect( wxID_SAVE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( cosmosGUI::OnExport ) );
  129. this->Disconnect( wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( cosmosGUI::OnQuit ) );
  130. this->Disconnect( wxID_PROPERTIES, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( cosmosGUI::OnOptionsProg ) );
  131. this->Disconnect( wxID_OPEN, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( cosmosGUI::OnImport ) );
  132. this->Disconnect( wxID_SAVE, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( cosmosGUI::OnExport ) );
  133. this->Disconnect( wxID_NEW, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( cosmosGUI::OnStart ) );
  134. this->Disconnect( wxID_FIND, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( cosmosGUI::OnOptionsRche ) );
  135. this->Disconnect( wxID_DUPLICATE, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( cosmosGUI::OnCorrections ) );
  136. searchctrl->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( cosmosGUI::OnSearch ), NULL, this );
  137. }