Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

pda_listctrl.h

Go to the documentation of this file.
      00001 //----------------------------------------------------------------------------------------
      00011 // RCS-ID:      $Id: pda_listctrl.h,v 1.1 2003/02/06 21:47:30 robertoconnor Exp $
      00012 //----------------------------------------------------------------------------------------
      00013 
      00014 //----------------------------------------------------------------------------------------
      00015 // Begin single inclusion of this .h file condition
      00016 //----------------------------------------------------------------------------------------
      00017 
      00018 #ifndef _PDA_LISTCTRL_H_
      00019 #define _PDA_LISTCTRL_H_
      00020 
      00021 //----------------------------------------------------------------------------------------
      00022 // GCC interface
      00023 //----------------------------------------------------------------------------------------
      00024 
      00025 #if defined(__GNUG__) && ! defined(__APPLE__)
      00026     #pragma interface "pda_listctrl.h"
      00027 #endif
      00028 
      00029 //----------------------------------------------------------------------------------------
      00030 // Shared defines
      00031 //----------------------------------------------------------------------------------------
      00032 
      00033 #include "plucker_defines.h"
      00034 
      00035 //----------------------------------------------------------------------------------------
      00036 // Headers
      00037 //----------------------------------------------------------------------------------------
      00038 
      00039 #include "wx/listctrl.h"
      00040 
      00041 //----------------------------------------------------------------------------------------
      00042 // Class option flags
      00043 //----------------------------------------------------------------------------------------
      00044 
      00045 enum {
      00047     optionIS_USERS_LISTCTRL = 1,
      00048     optionIS_DIRECTORIES_LISTCTRL = 2
      00049 };
      00050 
      00051 //----------------------------------------------------------------------------------------
      00052 // Class definition: pda_listctrl
      00053 //----------------------------------------------------------------------------------------
      00054 
      00055 // List control with a single column that auto-resizes its column to the
      00056 // width of the control, minus some right hand space for the scrollbar:
      00058 class pda_listctrl : public wxListCtrl
      00059 {
      00060     DECLARE_DYNAMIC_CLASS( pda_listctrl )
      00061 
      00062 public:
      00064 
      00078     pda_listctrl( wxWindow *parent,
      00079                   wxWindowID id = -1,
      00080                   const wxPoint &pos = wxDefaultPosition,
      00081                   const wxSize &size = wxDefaultSize,
      00082                   long listCtrlStyle = wxLC_ICON,
      00083                   const wxValidator& validator = wxDefaultValidator,
      00084                   const wxString &name = "listctrl",
      00085                   const wxString &column_caption = "User",
      00086                   long  users_or_directories_listctrl = optionIS_USERS_LISTCTRL );
      00087 
      00088     // Unused constructor: solely for usage of RTTI (DYNAMIC_CLASS) macros.
      00089     pda_listctrl() {};
      00090 
      00092     ~pda_listctrl();
      00093 
      00094     void set_column_widths();
      00095 
      00097 
      00102     wxString get_cell_contents_string( long row_number,
      00103                                        int column );
      00104 
      00105     void find_matching_rows( wxArrayString& input_arraystring,
      00106                              wxArrayInt *output_matching_rows_arrayint );
      00107 
      00108 protected:
      00109 
      00110     void OnSize( wxSizeEvent& event );
      00111 
      00112 private:
      00113 
      00114     long    m_users_or_directories_listctrl;
      00115 
      00116     DECLARE_EVENT_TABLE()
      00117 
      00118 };
      00119 
      00120 //----------------------------------------------------------------------------------------
      00121 // Global functions and variables
      00122 //----------------------------------------------------------------------------------------
      00123 
      00125 
      00130 enum
      00131 {
      00132     USER_NAME_COLUMN        = 0,
      00133     RAM_OR_CARD_COLUMN,
      00134     DIRECTORY_ON_CARD_COLUMN
      00135 };
      00136 
      00137 //----------------------------------------------------------------------------------------
      00138 // End single inclusion of this .h file condition
      00139 //----------------------------------------------------------------------------------------
      00140 
      00141 #endif  //_PDA_LISTCTRL_H_
      00142