Commit f5683473 authored by Murray Cumming's avatar Murray Cumming Committed by Murray Cumming

Added wrappers for FileChooser, FileChooserWidget, FileChooserDialog and

2003-11-01  Murray Cumming  <murrayc@usa.net>

        * gtk/src/: Added wrappers for FileChooser, FileChooserWidget,
        FileChooserDialog and FileFilter. FileChooser is an interface
        but I see no way to override it.
        * Wrapped some more signals and vfuncs.
parent b4446205
2003-11-01 Murray Cumming <murrayc@usa.net>
* gtk/src/: Added wrappers for FileChooser, FileChooserWidget,
FileChooserDialog and FileFilter. FileChooser is an interface
but I see no way to override it.
* Wrapped some more signals and vfuncs.
2003-10-31 Murray Cumming <murrayc@usa.net> 2003-10-31 Murray Cumming <murrayc@usa.net>
* docs/index.html: Corrected links to glibmm docs, using relative * docs/index.html: Corrected links to glibmm docs, using relative
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
- ToggleAction::create() has extra bool is_active parameter. - ToggleAction::create() has extra bool is_active parameter.
* Gtk::Menu::AccelKey is now Gtk::AccelKey * Gtk::Menu::AccelKey is now Gtk::AccelKey
* AccelGroup: Now takes * AccelGroup: Now takes
* Gtk::MessageDialog: Added set_markup().
* Added Gtk::FileChooser (interface), FileChooserWidget, FileChooserDialog, FileFilter.
2.3.0: 2.3.0:
......
...@@ -116,7 +116,7 @@ AC_CHECK_FUNCS([flockfile funlockfile getc_unlocked]) ...@@ -116,7 +116,7 @@ AC_CHECK_FUNCS([flockfile funlockfile getc_unlocked])
######################################################################### #########################################################################
# Dependancy checks # Dependancy checks
######################################################################### #########################################################################
gtkmm_min_glibmm_version=2.3.1 gtkmm_min_glibmm_version=2.3.2
gtkmm_min_gtk_version=2.3.0 gtkmm_min_gtk_version=2.3.0
......
...@@ -12,7 +12,8 @@ files_general_hg = accelgroup.hg accellabel.hg action.hg actiongroup.hg adjustme ...@@ -12,7 +12,8 @@ files_general_hg = accelgroup.hg accellabel.hg action.hg actiongroup.hg adjustme
checkbutton.hg checkmenuitem.hg clipboard.hg colorselection.hg colorbutton.hg \ checkbutton.hg checkmenuitem.hg clipboard.hg colorselection.hg colorbutton.hg \
combo.hg combobox.hg comboboxentry.hg container.hg curve.hg \ combo.hg combobox.hg comboboxentry.hg container.hg curve.hg \
dialog.hg drawingarea.hg \ dialog.hg drawingarea.hg \
editable.hg entry.hg entrycompletion.hg enums.hg eventbox.hg expander.hg\ editable.hg entry.hg entrycompletion.hg enums.hg eventbox.hg expander.hg \
filechooser.hg filechooserwidget.hg filechooserdialog.hg filefilter.hg \
fileselection.hg fixed.hg fontbutton.hg fontselection.hg frame.hg \ fileselection.hg fixed.hg fontbutton.hg fontselection.hg frame.hg \
handlebox.hg \ handlebox.hg \
iconfactory.hg iconset.hg iconsource.hg image.hg imagemenuitem.hg inputdialog.hg invisible.hg item.hg \ iconfactory.hg iconset.hg iconsource.hg image.hg imagemenuitem.hg inputdialog.hg invisible.hg item.hg \
......
...@@ -100,7 +100,10 @@ public: ...@@ -100,7 +100,10 @@ public:
_WRAP_METHOD(static bool activate(Gtk::Object& object, guint accel_key, Gdk::ModifierType accel_mods), _WRAP_METHOD(static bool activate(Gtk::Object& object, guint accel_key, Gdk::ModifierType accel_mods),
gtk_accel_groups_activate) gtk_accel_groups_activate)
_WRAP_SIGNAL(void accel_changed(guint keyval, GdkModifierType modifier, GClosure* accel_closure), "accel_changed") //TODO: Discover real parameter names:
_WRAP_SIGNAL(bool accel_activate(const Glib::RefPtr<Glib::Object>& object, guint param2, Gdk::ModifierType param3), "accel_activate", no_default_handler)
//TODO: The C type is unpleasant:
_WRAP_SIGNAL(void accel_changed(guint keyval, Gdk::ModifierType modifier, GClosure* accel_closure), "accel_changed")
}; };
} // namespace Gtk } // namespace Gtk
......
...@@ -52,7 +52,9 @@ public: ...@@ -52,7 +52,9 @@ public:
/// For instance, void on_activate(); /// For instance, void on_activate();
typedef SigC::Slot0<void> SlotActivate; typedef SigC::Slot0<void> SlotActivate;
_WRAP_SIGNAL(void activate(), "activate") _WRAP_SIGNAL(void activate(), "activate")
//TODO: There are other signals, without default signal handlers.
_WRAP_SIGNAL(void connect_proxy(Widget* proxy), "connect_proxy", no_default_handler)
_WRAP_SIGNAL(void disconnect_proxy(Widget* proxy), "disconnect_proxy", no_default_handler)
//Used by AccelGroup: //Used by AccelGroup:
_WRAP_METHOD(void set_accel_path(const Glib::ustring& accel_path), gtk_action_set_accel_path) _WRAP_METHOD(void set_accel_path(const Glib::ustring& accel_path), gtk_action_set_accel_path)
...@@ -68,7 +70,7 @@ protected: ...@@ -68,7 +70,7 @@ protected:
_WRAP_VFUNC(Widget* create_menu_item(), "create_menu_item") _WRAP_VFUNC(Widget* create_menu_item(), "create_menu_item")
_WRAP_VFUNC(Widget* create_tool_item(), "create_tool_item") _WRAP_VFUNC(Widget* create_tool_item(), "create_tool_item")
_WRAP_VFUNC(void connect_proxy(Widget* proxy), "connect_proxy") _WRAP_VFUNC(void connect_proxy(Widget* proxy), "connect_proxy")
_WRAP_VFUNC(void disconnect_proxy(Widget* proxy), "disconnect_proxy") _WRAP_VFUNC(void disconnect_proxy(Widget* proxy), "disconnect_proxy")
}; };
} // namespace Gtk } // namespace Gtk
......
...@@ -41,13 +41,15 @@ public: ...@@ -41,13 +41,15 @@ public:
//TODO: Const version: //TODO: Const version:
_WRAP_METHOD(Glib::ListHandle< Glib::RefPtr<Action> > list_actions(), gtk_action_group_list_actions) _WRAP_METHOD(Glib::ListHandle< Glib::RefPtr<Action> > list_actions(), gtk_action_group_list_actions)
_WRAP_METHOD(void add_action(const Glib::RefPtr<Action>& action), gtk_action_group_add_action) _WRAP_METHOD(void add_action(const Glib::RefPtr<Action>& action), gtk_action_group_add_action)
//TODO: Could this whole class have an STL-style interface?
//TODO: rename to push_back() instead?
void add_action(const Glib::RefPtr<Action>& action, const Action::SlotActivate& slot); void add_action(const Glib::RefPtr<Action>& action, const Action::SlotActivate& slot);
void add_action(const Glib::RefPtr<Action>& action, const AccelKey& accel_key, const Action::SlotActivate& slot); void add_action(const Glib::RefPtr<Action>& action, const AccelKey& accel_key, const Action::SlotActivate& slot);
_WRAP_METHOD(void remove_action(const Glib::RefPtr<Action>& action), gtk_action_group_remove_action) _WRAP_METHOD(void remove_action(const Glib::RefPtr<Action>& action), gtk_action_group_remove_action)
//TODO: _WRAP_METHOD(void add_actions(GtkActionEntry *entries, guint n_entries, gpointer user_data), gtk_action_group_add_actions) //TODO: _WRAP_METHOD(void add_actions(GtkActionEntry* entries, guint n_entries, gpointer user_data), gtk_action_group_add_actions)
//TODO: _WRAP_METHOD(void add_toggle_actions(GtkToggleActionEntry *entries, guint n_entries, gpointer user_data), gtk_action_group_add_toggle_actions) //TODO: _WRAP_METHOD(void add_toggle_actions(GtkToggleActionEntry *entries, guint n_entries, gpointer user_data), gtk_action_group_add_toggle_actions)
//TODO: _WRAP_METHOD(void add_radio_actions(GtkRadioActionEntry *entries, guint n_entries, int value, GCallback on_change, gpointer user_data), gtk_action_group_add_radio_actions), gtk_action_group_add_radio_actions) //TODO: _WRAP_METHOD(void add_radio_actions(GtkRadioActionEntry *entries, guint n_entries, int value, GCallback on_change, gpointer user_data), gtk_action_group_add_radio_actions), gtk_action_group_add_radio_actions)
//TODO: _WRAP_METHOD(void add_actions_full(GtkActionEntry* entries, guint n_entries, gpointer user_data, GDestroyNotify destroy), gtk_action_group_add_actions_full) //TODO: _WRAP_METHOD(void add_actions_full(GtkActionEntry* entries, guint n_entries, gpointer user_data, GDestroyNotify destroy), gtk_action_group_add_actions_full)
......
...@@ -39,7 +39,7 @@ _WRAP_ENUM(CalendarDisplayOptions, GtkCalendarDisplayOptions) ...@@ -39,7 +39,7 @@ _WRAP_ENUM(CalendarDisplayOptions, GtkCalendarDisplayOptions)
* using select_day(). * using select_day().
* *
* The way in which the calendar itself is displayed can be altered using * The way in which the calendar itself is displayed can be altered using
* display_options(). * set_display_options().
* *
* The selected date can be retrieved from a GtkCalendar using get_date(). * The selected date can be retrieved from a GtkCalendar using get_date().
* *
...@@ -52,10 +52,8 @@ class Calendar : public Widget ...@@ -52,10 +52,8 @@ class Calendar : public Widget
{ {
_CLASS_GTKOBJECT(Calendar,GtkCalendar,GTK_CALENDAR,Gtk::Widget,GtkWidget) _CLASS_GTKOBJECT(Calendar,GtkCalendar,GTK_CALENDAR,Gtk::Widget,GtkWidget)
public: public:
_CTOR_DEFAULT _CTOR_DEFAULT
_WRAP_METHOD(int select_month(guint month, guint year), gtk_calendar_select_month) _WRAP_METHOD(int select_month(guint month, guint year), gtk_calendar_select_month)
_WRAP_METHOD(void select_day(guint day), gtk_calendar_select_day) _WRAP_METHOD(void select_day(guint day), gtk_calendar_select_day)
_WRAP_METHOD(int mark_day(guint day), gtk_calendar_mark_day) _WRAP_METHOD(int mark_day(guint day), gtk_calendar_mark_day)
......
...@@ -32,7 +32,7 @@ namespace Gtk ...@@ -32,7 +32,7 @@ namespace Gtk
_CC_INCLUDE(gtk/gtktypebuiltins.h) _CC_INCLUDE(gtk/gtktypebuiltins.h)
_WRAP_ENUM(CellRendererState, GtkCellRendererState) _WRAP_ENUM(CellRendererState, GtkCellRendererState)
_WRAP_ENUM(CellRendererMode, GtkCellRendererMode) _WRAP_ENUM(CellRendererMode, GtkCellRendererMode)
/** CellRenderers are used by Gtk::TreeView columns to render the Gtk::TreeModel column data appropriately. /** CellRenderers are used by Gtk::TreeView columns to render the Gtk::TreeModel column data appropriately.
* They display, and allow editing of, the values of their _property_renderable() properties. * They display, and allow editing of, the values of their _property_renderable() properties.
......
...@@ -91,8 +91,6 @@ public: ...@@ -91,8 +91,6 @@ public:
_WRAP_PROPERTY("has_separator", bool) _WRAP_PROPERTY("has_separator", bool)
_WRAP_SIGNAL(void response(int response_id), "response") _WRAP_SIGNAL(void response(int response_id), "response")
//_WRAP_SIGNAL(void response(int response_id), "response", custom_default_handler)
_IGNORE_SIGNAL("close") _IGNORE_SIGNAL("close")
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
#include <gtkmm/treeiter.h>
#include <gtk/gtkentrycompletion.h> #include <gtk/gtkentrycompletion.h>
......
...@@ -57,6 +57,11 @@ public: ...@@ -57,6 +57,11 @@ public:
_WRAP_METHOD(void set_text_column(int column), gtk_entry_completion_set_text_column) _WRAP_METHOD(void set_text_column(int column), gtk_entry_completion_set_text_column)
//TODO: The C++ iterator needs to know about the model. We need some custom stuff here.
//but I think I've done it elsewhere. murrayc:
//_WRAP_SIGNAL(bool match_selected(const Glib::RefPtr<const TreeModel>& model, const TreeModel::iterator& iter), match_selected)
_WRAP_SIGNAL(void action_activated(int index), action_activated)
}; };
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
/* /*
* *
* Copyright 1998-2002 The gtkmm Development Team * Copyright 2003 The gtkmm Development Team
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public * modify it under the terms of the GNU Library General Public
......
/* $Id$ */ /* $Id$ */
/* box.h /* expander.h
* *
* Copyright (C) 1998-2002 The gtkmm Development Team * Copyright (C) 2003 The gtkmm Development Team
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public * modify it under the terms of the GNU Library General Public
......
// -*- c++ -*-
/* $Id$ */
/* Copyright 2003 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gtk/gtkfilechooser.h>
/* $Id$ */
/* Copyright (C) 2003 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gtkmm/widget.h>
#include <gtkmm/filefilter.h>
#include <glibmm/interface.h>
#include <gtk/gtkfilechooser.h> //TODO: Remove C header.
_DEFS(gtkmm,gtk)
_PINCLUDE(glibmm/private/interface_p.h)
namespace Gtk
{
_WRAP_ENUM(FileChooserAction, GtkFileChooserAction)
/**
*
*/
class FileChooser : public Glib::Interface
{
_CLASS_INTERFACE(FileChooser, GtkFileChooser, GTK_FILE_CHOOSER, GtkFileChooserClass)
public:
_WRAP_METHOD(void set_action(FileChooserAction action), gtk_file_chooser_set_action)
_WRAP_METHOD(FileChooserAction get_action() const, gtk_file_chooser_get_action)
_WRAP_METHOD(void set_folder_mode(bool folder_mode = true), gtk_file_chooser_set_folder_mode)
_WRAP_METHOD(bool get_folder_mode() const, gtk_file_chooser_get_folder_mode)
_WRAP_METHOD(void set_local_only(bool files_only = true), gtk_file_chooser_set_local_only)
_WRAP_METHOD(bool get_local_only() const, gtk_file_chooser_get_local_only)
_WRAP_METHOD(void set_select_multiple(bool select_multiple = true), gtk_file_chooser_set_select_multiple)
_WRAP_METHOD(bool get_select_multiple() const, gtk_file_chooser_get_select_multiple)
_WRAP_METHOD(void set_current_name(const Glib::ustring& name), gtk_file_chooser_set_current_name)
_WRAP_METHOD(Glib::ustring get_filename() const, gtk_file_chooser_get_filename)
_WRAP_METHOD(void set_filename(const Glib::ustring& filename), gtk_file_chooser_set_filename)
_WRAP_METHOD(void select_filename(const Glib::ustring& filename), gtk_file_chooser_select_filename)
_WRAP_METHOD(void unselect_filename(const Glib::ustring& filename), gtk_file_chooser_unselect_filename)
_WRAP_METHOD(void select_all(), gtk_file_chooser_select_all)
_WRAP_METHOD(void unselect_all(), gtk_file_chooser_unselect_all)
_WRAP_METHOD(Glib::SListHandle<Glib::ustring> get_filenames () const, gtk_file_chooser_get_filenames)
_WRAP_METHOD(void set_current_folder(const Glib::ustring& filename), gtk_file_chooser_set_current_folder)
_WRAP_METHOD(Glib::ustring get_current_folder() const, gtk_file_chooser_get_current_folder)
/* URI manipulation
*/
_WRAP_METHOD(Glib::ustring get_uri() const, gtk_file_chooser_get_uri)
_WRAP_METHOD(void set_uri(const Glib::ustring& uri), gtk_file_chooser_set_uri)
_WRAP_METHOD(void select_uri(const Glib::ustring& uri), gtk_file_chooser_select_uri)
_WRAP_METHOD(void unselect_uri(const Glib::ustring& uri), gtk_file_chooser_unselect_uri)
_WRAP_METHOD(GSList* get_uris() const, gtk_file_chooser_get_uris)
_WRAP_METHOD(void set_current_folder_uri(const Glib::ustring& uri), gtk_file_chooser_set_current_folder_uri)
_WRAP_METHOD(Glib::ustring get_current_folder_uri() const, gtk_file_chooser_get_current_folder_uri)
/* Preview widget
*/
_WRAP_METHOD(void set_preview_widget(Gtk::Widget& preview_widget), gtk_file_chooser_set_preview_widget)
_WRAP_METHOD(const Gtk::Widget* get_preview_widget() const, gtk_file_chooser_get_preview_widget)
_WRAP_METHOD(Gtk::Widget* get_preview_widget(), gtk_file_chooser_get_preview_widget)
_WRAP_METHOD(void set_preview_widget_active(bool active = true), gtk_file_chooser_set_preview_widget_active)
_WRAP_METHOD(bool get_preview_widget_active() const, gtk_file_chooser_get_preview_widget_active)
_WRAP_METHOD(Glib::ustring get_preview_filename() const, gtk_file_chooser_get_preview_filename)
_WRAP_METHOD(Glib::ustring get_preview_uri() const, gtk_file_chooser_get_preview_uri)
/* Extra widget
*/
_WRAP_METHOD(void set_extra_widget(Gtk::Widget& extra_widget), gtk_file_chooser_set_extra_widget)
_WRAP_METHOD(Gtk::Widget* get_extra_widget(), gtk_file_chooser_get_extra_widget)
_WRAP_METHOD(const Gtk::Widget* get_extra_widget() const, gtk_file_chooser_get_extra_widget)
/* List of user selectable filters
*/
//TODO: _WRAP_METHOD(void add_filter(GtkFileFilter* filter), gtk_file_chooser_add_filter)
//TODO: _WRAP_METHOD(void remove_filter (GtkFileFilter* filter), gtk_file_chooser_remove_filter)
//TODO: _WRAP_METHOD(GSList* list_filters() const, gtk_file_chooser_list_filters)
/* Current filter
*/
//TODO: _WRAP_METHOD(void set_filter(FileFilter* filter), gtk_file_chooser_set_filter)
//TODO: _WRAP_METHOD(Glib::RefPtr<FileFilter> get_filter() const, gtk_file_chooser_get_filter)
/* Per-application shortcut folders */
_WRAP_METHOD(bool add_shortcut_folder(const Glib::ustring& folder), gtk_file_chooser_add_shortcut_folder, errthrow)
_WRAP_METHOD(bool remove_shortcut_folder(const Glib::ustring& folder), gtk_file_chooser_remove_shortcut_folder, errthrow)
_WRAP_METHOD(Glib::SListHandle<Glib::ustring> list_shortcut_folders() const, gtk_file_chooser_list_shortcut_folders)
_WRAP_METHOD(bool add_shortcut_folder_uri(const Glib::ustring& folder), gtk_file_chooser_add_shortcut_folder_uri, errthrow)
_WRAP_METHOD(bool remove_shortcut_folder_uri(const Glib::ustring& folder), gtk_file_chooser_remove_shortcut_folder_uri, errthrow)
_WRAP_METHOD(Glib::SListHandle<Glib::ustring> list_shortcut_folder_uris() const, gtk_file_chooser_list_shortcut_folder_uris)
//TODO: _WRAP_SIGNAL(void current_folder_changed(), "current_folder_changed")
//TODO: _WRAP_SIGNAL(void selection_changed(), "selection_changed")
//TODO: _WRAP_SIGNAL(void update_preview(), "update_preview")
//TODO: _WRAP_SIGNAL(void file_activated(), "file_activated")
_WRAP_PROPERTY("action", FileChooserAction)
//_WRAP_PROPERTY("file-system", FileSystem) //construct-only
_WRAP_PROPERTY("filter", FileFilter*) //TODO: Use RefPtr?
_WRAP_PROPERTY("folder-mode", bool)
_WRAP_PROPERTY("local-only", bool)
_WRAP_PROPERTY("preview-widget", Widget*) //TODO: Use RefPtr?
_WRAP_PROPERTY("preview-widget-active", bool)
_WRAP_PROPERTY("extra-widget", Widget*) //TODO: Use RefPtr?
_WRAP_PROPERTY("select-multiple", bool)
_WRAP_PROPERTY("show-hidden", bool)
//TODO: vfuncs
};
} // namespace Gtk
// -*- c++ -*-
/* $Id$ */
/*
*
* Copyright 2003 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gtk/gtkfilechooserdialog.h>
namespace Gtk
{
FileChooserDialog::FileChooserDialog(const Glib::ustring& title, FileChooserAction action)
:
_CONSTRUCT("title", title.c_str(), "action", (GtkFileChooserAction)action)
{
}
FileChooserDialog::FileChooserDialog(Gtk::Window& parent, const Glib::ustring& title, FileChooserAction action)
:
_CONSTRUCT("title", title.c_str(), "action", (GtkFileChooserAction)action)
{
set_transient_for(parent);
}
} // namespace Gtk
/* $Id$ */
/* filechooserdialog.h
*
* Copyright (C) 1998-2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gtkmm/dialog.h>
#include <gtkmm/filechooser.h>
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/dialog_p.h)
namespace Gtk
{
/** Convenient file chooser window.
*
* @ingroup Dialogs
*/
class FileChooserDialog
: public Dialog,
public FileChooser
{
_CLASS_GTKOBJECT(FileChooserDialog, GtkFileChooserDialog, GTK_FILE_CHOOSER_DIALOG, Gtk::Dialog, GtkDialog)
_IMPLEMENTS_INTERFACE(FileChooser)
_UNMANAGEABLE
public:
explicit FileChooserDialog(Gtk::Window& parent, const Glib::ustring& title, FileChooserAction action);
explicit FileChooserDialog(const Glib::ustring& title, FileChooserAction action);
_IGNORE(gtk_file_chooser_dialog_new)
};
} // namespace Gtk
// -*- c++ -*-
/* $Id$ */
/*
*
* Copyright 1998-2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gtk/gtkfilechooserwidget.h>
namespace Gtk
{
} // namespace Gtk
/* $Id$ */
/* box.h
*
* Copyright (C) 1998-2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gtkmm/box.h>
#include <gtkmm/filechooser.h>
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/box_p.h)
namespace Gtk
{
/**
*
* @ingroup Widgets
*/
class FileChooserWidget
: public VBox,
public FileChooser
{
_CLASS_GTKOBJECT(FileChooserWidget, GtkFileChooserWidget, GTK_FILE_CHOOSER_WIDGET, Gtk::VBox, GtkVBox)
_IMPLEMENTS_INTERFACE(FileChooser)
public:
_CTOR_DEFAULT;
_WRAP_CTOR(FileChooserWidget(FileChooserAction action), gtk_file_chooser_widget_new)
};
} // namespace Gtk
// -*- c++ -*-
/* $Id$ */
/* Copyright 2003 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gtk/gtkfilefilter.h>
namespace Gtk
{
} // namespace Gtk
/* $Id$ */
/* Copyright (C) 2003 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gtkmm/widget.h>
#include <gtkmm/accelgroup.h>
#include <gtkmm/stockid.h>
_DEFS(gtkmm,gtk)
_PINCLUDE(glibmm/private/object_p.h)
namespace Gtk
{
_WRAP_ENUM(FileFilterFlags, GtkFileFilterFlags)
class FileFilter : public Glib::Object
{
_CLASS_GOBJECT(FileFilter, GtkFileFilter, GTK_FILE_FILTER, Glib::Object, GObject)
_CTOR_DEFAULT
public:
_WRAP_CREATE()
_WRAP_METHOD(void set_name(const Glib::ustring& name), gtk_file_filter_set_name)
_WRAP_METHOD(Glib::ustring get_name() const, gtk_file_filter_get_name)
_WRAP_METHOD(void add_mime_type(const Glib::ustring& mime_type), gtk_file_filter_add_mime_type)
_WRAP_METHOD(void add_pattern(const Glib::ustring& pattern), gtk_file_filter_add_pattern)
//TODO: _WRAP_METHOD(void add_custom(FileFilterFlags needed, GtkFileFilterFunc func, gpointer data, GDestroyNotify notify), gtk_file_filter_add_custom)
_WRAP_METHOD(FileFilterFlags get_needed() const, gtk_file_filter_get_needed)
//TODO: _WRAP_METHOD(bool filter(const GtkFileFilterInfo* filter_info), gtk_file_filter_filter)
//TODO: Properties and signals and vfuncs.
};
} // namespace Gtk
...@@ -571,6 +571,7 @@ ...@@ -571,6 +571,7 @@
) )
) )
;; From /home/murrayc/cvs/gnome26/gtk+/gtk/gtkicontheme.h ;; From /home/murrayc/cvs/gnome26/gtk+/gtk/gtkicontheme.h
(define-enum-extended IconLookupFlags (define-enum-extended IconLookupFlags
...@@ -589,6 +590,116 @@ ...@@ -589,6 +590,116 @@
) )
) )
;; From /home/murrayc/cvs/gnome26/gtk+/gtk/gtkfilechooser.h
(define-enum-extended FileChooserAction
(in-module "Gtk")
(c-name "GtkFileChooserAction")
(values
'("open" "GTK_FILE_CHOOSER_ACTION_OPEN" "0")
'("save" "GTK_FILE_CHOOSER_ACTION_SAVE" "1")
)
)
(define-enum-extended FileChooserError
(in-module "Gtk")
(c-name "GtkFileChooserError")
(values
'("nonexistent" "GTK_FILE_CHOOSER_ERROR_NONEXISTENT" "0")
'("bad-filename" "GTK_FILE_CHOOSER_ERROR_BAD_FILENAME" "1")
)
)
;; From /home/murrayc/cvs/gnome26/gtk+/gtk/gtkfilechooserutils.h
(define-flags-extended FileChooserProp
(in-module "Gtk")
(c-name "GtkFileChooserProp")
(values
'("first" "GTK_FILE_CHOOSER_PROP_FIRST" "0x1000")
'("action" "GTK_FILE_CHOOSER_PROP_ACTION" "0x1000")
'("file-system" "GTK_FILE_CHOOSER_PROP_FILE_SYSTEM" "1")
'("filter" "GTK_FILE_CHOOSER_PROP_FILTER" "2")
'("folder-mode" "GTK_FILE_CHOOSER_PROP_FOLDER_MODE" "3")
'("local-only" "GTK_FILE_CHOOSER_PROP_LOCAL_ONLY" "4")
'("preview-widget" "GTK_FILE_CHOOSER_PROP_PREVIEW_WIDGET" "5")
'("preview-widget-active" "GTK_FILE_CHOOSER_PROP_PREVIEW_WIDGET_ACTIVE" "6")
'("extra-widget" "GTK_FILE_CHOOSER_PROP_EXTRA_WIDGET" "7")
'("select-multiple" "GTK_FILE_CHOOSER_PROP_SELECT_MULTIPLE" "8")
'("show-hidden" "GTK_FILE_CHOOSER_PROP_SHOW_HIDDEN" "9")
'("last" "GTK_FILE_CHOOSER_PROP_LAST" "0x9")
)
)
;; From /home/murrayc/cvs/gnome26/gtk+/gtk/gtkfilefilter.h
(define-flags-extended FileFilterFlags
(in-module "Gtk")
(c-name "GtkFileFilterFlags")
(values
'("filename" "GTK_FILE_FILTER_FILENAME" "1 << 0")
'("uri" "GTK_FILE_FILTER_URI" "1 << 1")
'("display-name" "GTK_FILE_FILTER_DISPLAY_NAME" "1 << 2")
'("mime-type" "GTK_FILE_FILTER_MIME_TYPE" "1 << 3")
)
)
;; From /home/murrayc/cvs/gnome26/gtk+/gtk/gtkfilesystem.h
(define-flags-extended FileInfoType
(in-module "Gtk")
(c-name "GtkFileInfoType")
(values
'("display-name" "GTK_FILE_INFO_DISPLAY_NAME" "1 << 0")
'("is-folder" "GTK_FILE_INFO_IS_FOLDER" "1 << 1")
'("is-hidden" "GTK_FILE_INFO_IS_HIDDEN" "1 << 2")
'("mime-type" "GTK_FILE_INFO_MIME_TYPE" "1 << 3")
'("modification-time" "GTK_FILE_INFO_MODIFICATION_TIME" "1 << 4")
'("size" "GTK_FILE_INFO_SIZE" "1 << 5")
'("icon" "GTK_FILE_INFO_ICON" "1 << 6")
)
)
(define-enum-extended FileIconType
(in-module "Gtk")
(c-name "GtkFileIconType")
(values
'("regular" "GTK_FILE_ICON_REGULAR" "0")
'("block-device" "GTK_FILE_ICON_BLOCK_DEVICE" "1")
'("broken-symbolic-link" "GTK_FILE_ICON_BROKEN_SYMBOLIC_LINK" "2")
'("character-device" "GTK_FILE_ICON_CHARACTER_DEVICE" "3")
'("directory" "GTK_FILE_ICON_DIRECTORY" "4")
'("executable" "GTK_FILE_ICON_EXECUTABLE" "5")
'("fifo" "GTK_FILE_ICON_FIFO" "6")
'("socket" "GTK_FILE_ICON_SOCKET" "7")
)
)
(define-enum-extended FileSystemError