00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
#ifndef _vdkfc_form_h_
00028
#define _vdkfc_form_h_
00029
#ifdef HAVE_CONFIG_H
00030
#include <config.h>
00031
#endif
00032
#include <vdk/vdk.h>
00033
00034
typedef VDKArray<VDKString> FileStringArray;
00066 class VDKFileChooser:
public VDKForm
00067 {
00068
00069
private:
00070
00071
VDKObject* filechooser;
00072
static void file_activated (GtkFileChooser *filechooser,
00073 gpointer user_data);
00074 FileStringArray* selections;
00075
public:
00082
VDKFileChooser(
VDKForm* owner, FileStringArray* selections,
char* title);
00083
virtual ~
VDKFileChooser();
00084
00085
00086
00087
00088
private:
void Setup(
void);
00089
00090
protected:
VDKBox* mainbox;
00091
protected:
VDKBox* fcbox;
00092
protected:
VDKSeparator* separator0;
00093
protected:
VDKBox* buttonbox;
00094
protected:
VDKCustomButton* okButton;
00095
protected:
VDKCustomButton* cancelButton;
00096
bool OnokButtonClick(
VDKObject* sender);
00097
bool OncancelButtonClick(
VDKObject* sender);
00098
00099
public:
00100 DECLARE_SIGNAL_MAP(
VDKFileChooser);
00101
00102
00103
00104
00105 DECLARE_SIGNAL_LIST(
VDKFileChooser);
00106 DECLARE_EVENT_LIST(
VDKFileChooser);
00107
00108
00109
static GtkWindowType VDKFileChooser::DisplayType;
00110
static GtkWindowPosition VDKFileChooser::InitialPosition;
00111
00117
void AddFilterPattern(
char* name,
char* pattern);
00122
void SetDefaultFilter(
char* name);
00123
void AddMimeType(
char* name,
char* mime);
00128
void RemoveFilter(
char* name);
00129
00134 VDKReadWriteValueProp<VDKFileChooser,bool>
MultiSelection;
00142 VDKReadWriteValueProp<VDKFileChooser,GtkFileChooserAction>
Action;
00143
00144
bool GetMultiSelection() {
return gtk_file_chooser_get_select_multiple (GTK_FILE_CHOOSER(sigwid)); }
00145
void SetMultiSelection(
bool ms) { gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(sigwid),ms); }
00146 GtkFileChooserAction GetAction() {
return gtk_file_chooser_get_action(GTK_FILE_CHOOSER(sigwid)); }
00147
void SetAction(GtkFileChooserAction a) { gtk_file_chooser_set_action (GTK_FILE_CHOOSER(sigwid),a); }
00148 };
00149
#endif
00150