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

channel_dialog.h

Go to the documentation of this file.
      00001 //----------------------------------------------------------------------------------------
      00011 // RCS-ID:      $Id: channel_dialog.h,v 1.26 2002/09/27 13:28:41 robertoconnor Exp $
      00012 //----------------------------------------------------------------------------------------
      00013 
      00014 //----------------------------------------------------------------------------------------
      00015 // Begin single inclusion of this .h file condition
      00016 //----------------------------------------------------------------------------------------
      00017 
      00018 #ifndef _CHANNEL_DIALOG_H_
      00019 #define _CHANNEL_DIALOG_H_
      00020 
      00021 //----------------------------------------------------------------------------------------
      00022 // GCC interface
      00023 //----------------------------------------------------------------------------------------
      00024 
      00025 #if defined(__GNUG__) && ! defined(__APPLE__)
      00026     #pragma interface "channel_dialog.h"
      00027 #endif
      00028 
      00029 //----------------------------------------------------------------------------------------
      00030 // Shared defines
      00031 //----------------------------------------------------------------------------------------
      00032 
      00033 #include "plucker_defines.h"
      00034 
      00035 // ---------------------------------------------------------------------------------------
      00036 // Headers
      00037 // ---------------------------------------------------------------------------------------
      00038 
      00039 #include "wx/dialog.h"
      00040 #include "wx/datetime.h"
      00041 // ---------------------------------------------------------------------------------------
      00042 #include "hhictrl.h"                    // wxHandheldInstallCtrl
      00043 #include "time_control.h"               // time_control
      00044 
      00045 //----------------------------------------------------------------------------------------
      00046 // External functions and variables
      00047 //----------------------------------------------------------------------------------------
      00048 
      00050 /*
      00051     For checking that we have entered the channels tab, so know to save configuration.
      00052 
      00053     Also used to display the correct help page for the tab. Also for starting the
      00054     dialog with a different tab.
      00055 
      00056     Placed before channel_dialog contructor since used as a default param value.
      00057  */
      00058 enum {
      00060     CHANNEL_NOTEBOOK_PAGE_INDEX_START           = 0,
      00062     CHANNEL_NOTEBOOK_PAGE_INDEX_SPIDERING, 
      00064     CHANNEL_NOTEBOOK_PAGE_INDEX_LIMITS,
      00066     CHANNEL_NOTEBOOK_PAGE_INDEX_FORMATTING,
      00068     CHANNEL_NOTEBOOK_PAGE_INDEX_IMAGES, 
      00070     CHANNEL_NOTEBOOK_PAGE_INDEX_OUTPUT,
      00072     CHANNEL_NOTEBOOK_PAGE_INDEX_DESTINATION,
      00074     CHANNEL_NOTEBOOK_PAGE_INDEX_SCHEDULING    
      00075 };
      00076 
      00077 //----------------------------------------------------------------------------------------
      00078 // Class definition: channel_dialog
      00079 //----------------------------------------------------------------------------------------
      00080 
      00082 class channel_dialog : public wxDialog
00083 {
00084 
00085 public: 
00087 
00094     channel_dialog( wxWindow* parent, 
00095                     wxString configuration_section, 
00096                     int initial_selected_notebook_tab = CHANNEL_NOTEBOOK_PAGE_INDEX_START );
00097     
00099     ~channel_dialog();
00100            
00101 private:
00102 
00104     void read_configuration();
00105     void set_image_tab_bpp_controls( long bpp );
00107     void set_limits_tab_stayonhost_stayondomain_controls( bool stayonhost,
00108                                                           bool stayondomain );
00109     void set_scheduling_tab_update_controls( long update_frequency,
00110                                              const wxString& update_period,
00111                                              const wxDateTime& update_base,
00112                                              bool update_enabled );    
00113     void write_configuration();    
00114     void launch_editor( const wxString& filename_to_load, 
00115                         long style=plkrPROMPT_IF_FILE_NOT_FOUND );
00116     
00117     bool prevent_close_if_no_destinations_chosen();
00118 
00119     void on_update_ui_start_tab_url_radiobutton( wxUpdateUIEvent& event );
00120     void on_update_ui_start_tab_file_radiobutton( wxUpdateUIEvent& event );
00121     void on_update_ui_start_tab_links_radiobutton( wxUpdateUIEvent& event );
00122     void on_start_tab_url_button( wxCommandEvent& event );
00123     void on_update_ui_start_tab_file_textctrl( wxUpdateUIEvent& event );
00124     void on_start_tab_file_button( wxCommandEvent& event );
00125     void on_start_tab_edit_file_button( wxCommandEvent& event );
00126     void on_start_tab_links_button( wxCommandEvent& event );
00127 
00128     void on_update_ui_spidering_tab_status_line_length_checkbox( wxUpdateUIEvent& event );
00129     void on_update_ui_spidering_tab_referrer_checkbox( wxUpdateUIEvent& event );
00130     void on_update_ui_spidering_tab_user_agent_browser_radiobutton( wxUpdateUIEvent& event );
00131     void on_update_ui_spidering_tab_user_agent_custom_radiobutton( wxUpdateUIEvent& event );
00132     void on_update_ui_spidering_tab_command_before_checkbox( wxUpdateUIEvent& event );
00133     void on_update_ui_spidering_tab_command_after_checkbox( wxUpdateUIEvent& event );
00134 
00135     void on_update_ui_limits_tab_stayonhost_stayondomain_checkbox( wxUpdateUIEvent& event );
00136     void on_update_ui_limits_tab_url_pattern_checkbox( wxUpdateUIEvent& event );
00137     void on_update_ui_limits_tab_exclusion_checkbox( wxUpdateUIEvent& event );
00138     void on_limits_tab_exclusion_button( wxCommandEvent& event );
00139 
00140     void on_update_ui_formatting_tab_charset_checkbox( wxUpdateUIEvent& event );
00141     void on_update_ui_formatting_tab_anchor_color_checkbox( wxUpdateUIEvent& event );
00142     void on_formatting_tab_anchor_color_button( wxCommandEvent& event );
00143 
00144     void on_update_ui_images_tab_include_images_checkbox( wxUpdateUIEvent& event );
00145     void on_update_ui_images_tab_only_link_radiobutton( wxUpdateUIEvent& event );
00146     
00147     void on_update_ui_output_tab_only_compress_checkbox( wxUpdateUIEvent& event );
00148     void on_update_ui_output_tab_category_checkbox( wxUpdateUIEvent& event );
00149     void on_update_ui_output_tab_owner_id_checkbox( wxUpdateUIEvent& event );
00150     void on_update_ui_output_tab_launchable_checkbox( wxUpdateUIEvent& event );
00151     void on_update_ui_output_tab_custom_large_icon_checkbox( wxUpdateUIEvent& event );
00152     void on_update_ui_output_tab_custom_small_icon_checkbox( wxUpdateUIEvent& event );    
00153     void on_output_tab_custom_small_icon_button( wxCommandEvent& event );
00154     void on_output_tab_custom_large_icon_button( wxCommandEvent& event );    
00155 
00156     void on_update_ui_scheduling_tab_update_enabled_checkbox( wxUpdateUIEvent& event );  
00157     void on_scheduling_tab_now_button( wxCommandEvent& event );
00158     
00159     // Override base class functions.
00160     void OnOK( wxCommandEvent& event );
00161     void on_help_button( wxCommandEvent& event );
00162     
00163     // Member variables
00164     wxString                m_configuration_section;
00165     wxHandheldInstallCtrl*  m_handheld_install_ctrl;    
00166     time_control*           m_scheduling_time_control;
00167     
00168     DECLARE_EVENT_TABLE()
00169     
00170 };
00171 
00172 #endif      //_CHANNEL_DIALOG_H_
00173