Reference Manual
Inti Logo
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

fileselection.h

Go to the documentation of this file.
00001 /*  Inti: Integrated Foundation Classes
00002  *  Copyright (C) 2002 The Inti Development Team.
00003  *
00004  *  This program is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License as published by
00006  *  the Free Software Foundation; either version 2 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  This program is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *  GNU Library General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU Library General Public License
00015  *  along with this program; if not, write to the Free Software
00016  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00017  */
00018  
00023 
00024 #ifndef INTI_GTK_FILE_SELECTION_H
00025 #define INTI_GTK_FILE_SELECTION_H
00026 
00027 #ifndef INTI_GTK_DIALOG_H
00028 #include <inti/gtk/dialog.h>
00029 #endif
00030 
00031 #ifndef __GTK_FILESEL_H__
00032 #include <gtk/gtkfilesel.h>
00033 #endif
00034 
00035 namespace Inti {
00036 
00037 namespace Gtk {
00038         
00039 class Entry;
00040 class FileSelectionClass;
00041 class Label;
00042 
00114 
00115 class FileSelection : public Dialog
00116 {
00117         friend class G::Object;
00118         friend class FileSelectionClass;
00119 
00120         FileSelection(const FileSelection&);
00121         FileSelection& operator=(const FileSelection&);
00122         
00123 protected:
00126 
00127         explicit FileSelection(GtkFileSelection *file_selection, bool reference = false);
00134 
00136 //  Properties
00137 
00138         typedef G::Property<String> FilenamePropertyType;
00139         typedef G::PropertyProxy<G::Object, FilenamePropertyType> FilenamePropertyProxy;
00140         static const FilenamePropertyType filename_property;
00141 
00142         typedef G::Property<bool> ShowFileopsPropertyType;
00143         typedef G::PropertyProxy<G::Object, ShowFileopsPropertyType> ShowFileopsPropertyProxy;
00144         static const ShowFileopsPropertyType show_fileops_property;
00145 
00146         typedef G::Property<bool> SelectMultiplePropertyType;
00147         typedef G::PropertyProxy<G::Object, SelectMultiplePropertyType> SelectMultiplePropertyProxy;
00148         static const SelectMultiplePropertyType select_multiple_property;
00149 
00150 public:
00153 
00154         FileSelection();
00159 
00160         explicit FileSelection(const String& title);
00167 
00168         virtual ~FileSelection();
00170         
00174 
00175         GtkFileSelection* gtk_file_selection() const { return (GtkFileSelection*)instance; }
00177 
00178         GtkFileSelectionClass* gtk_file_selection_class() const;
00180 
00181         operator GtkFileSelection* () const;
00183 
00184         Entry* selection_entry() const;
00186 
00187         Label* selection_text() const;
00189 
00190         Button* ok_button() const;
00193 
00194         Button* cancel_button() const;
00197 
00198         Button* help_button() const;
00201 
00202         String get_filename(G::Error *error = 0) const;
00212 
00213         bool get_selections(std::vector<String>& selections, G::Error *error = 0) const;
00225 
00226         bool get_select_multiple() const;
00229 
00233 
00234         void set_filename(const String& filename, G::Error *error = 0);
00243 
00244         void complete(const String& pattern);
00253 
00254         void show_fileop_buttons();
00257 
00258         void hide_fileop_buttons();
00261         
00262         void set_select_multiple(bool select_multiple);
00267 
00271         
00272         const FilenamePropertyProxy prop_filename()
00273         {
00274                 return FilenamePropertyProxy(this, &filename_property);
00275         }
00277 
00278         const ShowFileopsPropertyProxy prop_show_fileops()
00279         {
00280                 return ShowFileopsPropertyProxy(this, &show_fileops_property);
00281         }
00283 
00284         const SelectMultiplePropertyProxy prop_select_multiple()
00285         {
00286                 return SelectMultiplePropertyProxy(this, &select_multiple_property);
00287         }
00289 
00291 };
00292 
00293 } // namespace Gtk
00294 
00295 } // namespace Inti
00296 
00297 #endif // INTI_GTK_FILE_SELECTION_H
00298 
Main Page - Footer


Generated on Sun Sep 14 20:08:02 2003 for Inti by doxygen 1.3.2 written by Dimitri van Heesch, © 1997-2002