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

main_listctrl.h

Go to the documentation of this file.
      00001 //----------------------------------------------------------------------------------------
      00011 // RCS-ID:      $Id: main_listctrl.h,v 1.16 2003/02/16 16:06:56 robertoconnor Exp $
      00012 //----------------------------------------------------------------------------------------
      00013 
      00014 //----------------------------------------------------------------------------------------
      00015 // Begin single inclusion of this .h file condition
      00016 //----------------------------------------------------------------------------------------
      00017 
      00018 #ifndef _MAIN_LISTCTRL_H_
      00019 #define _MAIN_LISTCTRL_H_
      00020 
      00021 //----------------------------------------------------------------------------------------
      00022 // GCC interface
      00023 //----------------------------------------------------------------------------------------
      00024 
      00025 #if defined(__GNUG__) && ! defined(__APPLE__)
      00026     #pragma interface "main_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 definition: main_listctrl
      00043 //----------------------------------------------------------------------------------------
      00044 
      00046 
      00055 class main_listctrl : public wxListCtrl
00056 {
00057 
00058     DECLARE_DYNAMIC_CLASS( main_listctrl )
00059 
00060 public:
00061 
00063 
00073     main_listctrl( wxWindow *parent,
00074                    wxWindowID id = -1,
00075                    const wxPoint &pos = wxDefaultPosition,
00076                    const wxSize &size = wxDefaultSize,
00077                    long style = wxLC_REPORT,
00078                    const wxValidator& validator = wxDefaultValidator,
00079                    const wxString &name = "the_main_listctrl" );
00080 
00081     // Unused constructor: solely for usage of RTTI (DYNAMIC_CLASS) macros.
00082     main_listctrl() {};
00083     
00085     ~main_listctrl();
00086 
00088     void            init();
00089     
00091     void            gui_add_channel();
00092     
00094     void            gui_add_channel_wizard();
00095     
00097 
00100     void            gui_configure_channel();
00101     
00103 
00106     void            gui_delete_channels( bool prompt_first = TRUE );
00107     
00109     void            gui_update_selected_channels();
00110     
00112     void            gui_update_due_channels();
00113     
00115     void            gui_update_all_channels();
00116     
00118 
00121     void            paste_text_url_as_new_channel( const wxString& url );
00122     
00124     void            paste_fullnames_as_new_separate_channels( const wxArrayString& fullnames );
00125 
00127 
00131     void            on_paste_url_as_new_channel_menuitem();
00132     
00134 
00138     void            on_paste_fullnames_as_new_separate_channels_menuitem();
00139 
00140 protected:   
00141 
00143     void            load_rows();
00144     
00146 
00150     void            insert_row( wxString &channel_section );
00151     
00153 
00156     void            refresh_row( long row_number );
00157     
00159 
00163     void            refresh_rows( wxArrayString& channel_sections );
00164     
00166 
00169     void            get_selected_channel_sections( wxArrayString *channel_sections );
00170     
00172 
00175     void            get_selected_row_numbers( wxArrayInt *row_numbers );    
00176     
00178 
00183     wxString        get_cell_contents_string( long row_number,
00184                                               int column
00185                                             );
00186                                             
00188 
00193     wxString        get_row_channel_section( long row_number );
00194     
00196 
00200     void            set_row_channel_section( const wxString& channel_section,
00201                                              long row_number
00202                                            );
00203                                            
00205 
00209     void            insert_row_channel_section( const wxString& channel_section,
00210                                                 long row_number
00211                                               );
00212     
00214 
00217     void            remove_row_channel_section( long row_number );        
00218     
00220 
00228     bool            ensure_destinations_provided( const wxArrayString& channel_sections );
00229     
00231     void            popup_menu( wxMouseEvent& event );   
00232     
00234 
00237     void            launch_dialog_for_new_channel( const wxString& new_channel_section );
00238 
00240 
00243     wxString        get_channel_name_from_text_entry_dialog(); 
00244     
00246     void            OnSize( wxSizeEvent &event );
00247     
00249     void            set_column_widths();
00250     
00252     wxWindow*       m_parent;    
00253     
00255     wxArrayString   m_row_channel_section_array;  
00256     
00257 private:
00258 
00259     DECLARE_EVENT_TABLE()
00260 
00261 };
00262 
00263 //----------------------------------------------------------------------------------------
00264 // End single inclusion of this .h file condition
00265 //----------------------------------------------------------------------------------------
00266 
00267 #endif  //_WX_MAIN_LISTCTRL_H_