2005-05-13 16:47:18 -04:00
|
|
|
// Generated by gtkmmproc -- DO NOT MODIFY!
|
|
|
|
|
2007-11-12 18:44:49 -05:00
|
|
|
#ifndef GTKMM_DISABLE_DEPRECATED
|
|
|
|
|
|
|
|
|
2005-05-13 16:47:18 -04:00
|
|
|
#include <gtkmm/fileselection.h>
|
|
|
|
#include <gtkmm/private/fileselection_p.h>
|
|
|
|
|
|
|
|
// -*- 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/gtkfilesel.h>
|
|
|
|
#include <gtkmm/entry.h>
|
|
|
|
#include <gtkmm/label.h>
|
|
|
|
#include <gtkmm/box.h>
|
|
|
|
#include <gtkmm/button.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace Gtk
|
|
|
|
{
|
|
|
|
|
|
|
|
FileSelection::FileSelection()
|
|
|
|
:
|
|
|
|
Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
|
|
|
|
Gtk::Dialog(Glib::ConstructParams(fileselection_class_.init(), "title",(char*) 0, (char*) 0))
|
|
|
|
{}
|
|
|
|
|
|
|
|
} // namespace Gtk
|
|
|
|
|
|
|
|
|
|
|
|
namespace
|
|
|
|
{
|
|
|
|
} // anonymous namespace
|
|
|
|
|
|
|
|
|
|
|
|
namespace Glib
|
|
|
|
{
|
|
|
|
|
|
|
|
Gtk::FileSelection* wrap(GtkFileSelection* object, bool take_copy)
|
|
|
|
{
|
|
|
|
return dynamic_cast<Gtk::FileSelection *> (Glib::wrap_auto ((GObject*)(object), take_copy));
|
|
|
|
}
|
|
|
|
|
|
|
|
} /* namespace Glib */
|
|
|
|
|
|
|
|
namespace Gtk
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
/* The *_Class implementation: */
|
|
|
|
|
|
|
|
const Glib::Class& FileSelection_Class::init()
|
|
|
|
{
|
|
|
|
if(!gtype_) // create the GType if necessary
|
|
|
|
{
|
|
|
|
// Glib::Class has to know the class init function to clone custom types.
|
|
|
|
class_init_func_ = &FileSelection_Class::class_init_function;
|
|
|
|
|
|
|
|
// This is actually just optimized away, apparently with no harm.
|
|
|
|
// Make sure that the parent type has been created.
|
|
|
|
//CppClassParent::CppObjectType::get_type();
|
|
|
|
|
|
|
|
// Create the wrapper type, with the same class/instance size as the base type.
|
|
|
|
register_derived_type(gtk_file_selection_get_type());
|
|
|
|
|
|
|
|
// Add derived versions of interfaces, if the C type implements any interfaces:
|
|
|
|
}
|
|
|
|
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
void FileSelection_Class::class_init_function(void* g_class, void* class_data)
|
|
|
|
{
|
|
|
|
BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
|
|
|
|
CppClassParent::class_init_function(klass, class_data);
|
|
|
|
|
2007-11-12 18:44:49 -05:00
|
|
|
#ifdef GLIBMM_VFUNCS_ENABLED
|
|
|
|
#endif //GLIBMM_VFUNCS_ENABLED
|
|
|
|
|
|
|
|
#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
|
|
|
|
#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
|
2005-05-13 16:47:18 -04:00
|
|
|
}
|
|
|
|
|
2007-11-12 18:44:49 -05:00
|
|
|
#ifdef GLIBMM_VFUNCS_ENABLED
|
|
|
|
#endif //GLIBMM_VFUNCS_ENABLED
|
|
|
|
|
|
|
|
#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
|
|
|
|
#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
|
|
|
|
|
2005-05-13 16:47:18 -04:00
|
|
|
|
|
|
|
Glib::ObjectBase* FileSelection_Class::wrap_new(GObject* o)
|
|
|
|
{
|
|
|
|
return new FileSelection((GtkFileSelection*)(o)); //top-level windows can not be manage()ed.
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* The implementation: */
|
|
|
|
|
|
|
|
FileSelection::FileSelection(const Glib::ConstructParams& construct_params)
|
|
|
|
:
|
|
|
|
Gtk::Dialog(construct_params)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
FileSelection::FileSelection(GtkFileSelection* castitem)
|
|
|
|
:
|
|
|
|
Gtk::Dialog((GtkDialog*)(castitem))
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
FileSelection::~FileSelection()
|
|
|
|
{
|
|
|
|
destroy_();
|
|
|
|
}
|
|
|
|
|
|
|
|
FileSelection::CppClassType FileSelection::fileselection_class_; // initialize static member
|
|
|
|
|
|
|
|
GType FileSelection::get_type()
|
|
|
|
{
|
|
|
|
return fileselection_class_.init().get_type();
|
|
|
|
}
|
|
|
|
|
|
|
|
GType FileSelection::get_base_type()
|
|
|
|
{
|
|
|
|
return gtk_file_selection_get_type();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
FileSelection::FileSelection(const Glib::ustring& title)
|
|
|
|
:
|
|
|
|
Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
|
|
|
|
Gtk::Dialog(Glib::ConstructParams(fileselection_class_.init(), "title", title.c_str(), (char*) 0))
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void FileSelection::set_filename(const std::string& filename)
|
|
|
|
{
|
2007-11-12 18:44:49 -05:00
|
|
|
gtk_file_selection_set_filename(gobj(), (filename).c_str());
|
2005-05-13 16:47:18 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
std::string FileSelection::get_filename() const
|
|
|
|
{
|
|
|
|
return std::string(gtk_file_selection_get_filename(const_cast<GtkFileSelection*>(gobj())));
|
|
|
|
}
|
|
|
|
|
|
|
|
void FileSelection::complete(const Glib::ustring& pattern)
|
|
|
|
{
|
2007-11-12 18:44:49 -05:00
|
|
|
gtk_file_selection_complete(gobj(), pattern.c_str());
|
2005-05-13 16:47:18 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void FileSelection::show_fileop_buttons()
|
|
|
|
{
|
2007-11-12 18:44:49 -05:00
|
|
|
gtk_file_selection_show_fileop_buttons(gobj());
|
2005-05-13 16:47:18 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void FileSelection::hide_fileop_buttons()
|
|
|
|
{
|
2007-11-12 18:44:49 -05:00
|
|
|
gtk_file_selection_hide_fileop_buttons(gobj());
|
2005-05-13 16:47:18 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
Glib::ArrayHandle<std::string> FileSelection::get_selections() const
|
|
|
|
{
|
|
|
|
return Glib::ArrayHandle<std::string>(gtk_file_selection_get_selections(const_cast<GtkFileSelection*>(gobj())), Glib::OWNERSHIP_DEEP);
|
|
|
|
}
|
|
|
|
|
|
|
|
void FileSelection::set_select_multiple(bool select_multiple)
|
|
|
|
{
|
2007-11-12 18:44:49 -05:00
|
|
|
gtk_file_selection_set_select_multiple(gobj(), static_cast<int>(select_multiple));
|
2005-05-13 16:47:18 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
bool FileSelection::get_select_multiple() const
|
|
|
|
{
|
|
|
|
return gtk_file_selection_get_select_multiple(const_cast<GtkFileSelection*>(gobj()));
|
|
|
|
}
|
|
|
|
|
2007-11-12 18:44:49 -05:00
|
|
|
TreeView* FileSelection::get_dir_list()
|
2005-05-13 16:47:18 -04:00
|
|
|
{
|
|
|
|
return Glib::wrap((GtkTreeView*)(gobj()->dir_list));
|
|
|
|
}
|
|
|
|
|
|
|
|
const TreeView* FileSelection::get_dir_list() const
|
|
|
|
{
|
|
|
|
return Glib::wrap((GtkTreeView*)(gobj()->dir_list));
|
|
|
|
}
|
2007-11-12 18:44:49 -05:00
|
|
|
|
|
|
|
TreeView* FileSelection::get_file_list()
|
2005-05-13 16:47:18 -04:00
|
|
|
{
|
|
|
|
return Glib::wrap((GtkTreeView*)(gobj()->file_list));
|
|
|
|
}
|
|
|
|
|
|
|
|
const TreeView* FileSelection::get_file_list() const
|
|
|
|
{
|
|
|
|
return Glib::wrap((GtkTreeView*)(gobj()->file_list));
|
|
|
|
}
|
2007-11-12 18:44:49 -05:00
|
|
|
|
|
|
|
OptionMenu* FileSelection::get_history_pulldown()
|
2005-05-13 16:47:18 -04:00
|
|
|
{
|
|
|
|
return Glib::wrap((GtkOptionMenu*)(gobj()->history_pulldown));
|
|
|
|
}
|
|
|
|
|
|
|
|
const OptionMenu* FileSelection::get_history_pulldown() const
|
|
|
|
{
|
|
|
|
return Glib::wrap((GtkOptionMenu*)(gobj()->history_pulldown));
|
|
|
|
}
|
2007-11-12 18:44:49 -05:00
|
|
|
|
|
|
|
Entry* FileSelection::get_selection_entry()
|
2005-05-13 16:47:18 -04:00
|
|
|
{
|
|
|
|
return Glib::wrap((GtkEntry*)(gobj()->selection_entry));
|
|
|
|
}
|
|
|
|
|
|
|
|
const Entry* FileSelection::get_selection_entry() const
|
|
|
|
{
|
|
|
|
return Glib::wrap((GtkEntry*)(gobj()->selection_entry));
|
|
|
|
}
|
2007-11-12 18:44:49 -05:00
|
|
|
|
|
|
|
Label* FileSelection::get_selection_text()
|
2005-05-13 16:47:18 -04:00
|
|
|
{
|
|
|
|
return Glib::wrap((GtkLabel*)(gobj()->selection_text));
|
|
|
|
}
|
|
|
|
|
|
|
|
const Label* FileSelection::get_selection_text() const
|
|
|
|
{
|
|
|
|
return Glib::wrap((GtkLabel*)(gobj()->selection_text));
|
|
|
|
}
|
2007-11-12 18:44:49 -05:00
|
|
|
|
|
|
|
VBox* FileSelection::get_main_vbox()
|
2005-05-13 16:47:18 -04:00
|
|
|
{
|
|
|
|
return Glib::wrap((GtkVBox*)(gobj()->main_vbox));
|
|
|
|
}
|
|
|
|
|
|
|
|
const VBox* FileSelection::get_main_vbox() const
|
|
|
|
{
|
|
|
|
return Glib::wrap((GtkVBox*)(gobj()->main_vbox));
|
|
|
|
}
|
2007-11-12 18:44:49 -05:00
|
|
|
|
|
|
|
Button* FileSelection::get_ok_button()
|
2005-05-13 16:47:18 -04:00
|
|
|
{
|
|
|
|
return Glib::wrap((GtkButton*)(gobj()->ok_button));
|
|
|
|
}
|
|
|
|
|
|
|
|
const Button* FileSelection::get_ok_button() const
|
|
|
|
{
|
|
|
|
return Glib::wrap((GtkButton*)(gobj()->ok_button));
|
|
|
|
}
|
2007-11-12 18:44:49 -05:00
|
|
|
|
|
|
|
Button* FileSelection::get_cancel_button()
|
2005-05-13 16:47:18 -04:00
|
|
|
{
|
|
|
|
return Glib::wrap((GtkButton*)(gobj()->cancel_button));
|
|
|
|
}
|
|
|
|
|
|
|
|
const Button* FileSelection::get_cancel_button() const
|
|
|
|
{
|
|
|
|
return Glib::wrap((GtkButton*)(gobj()->cancel_button));
|
|
|
|
}
|
2007-11-12 18:44:49 -05:00
|
|
|
|
|
|
|
Button* FileSelection::get_help_button()
|
2005-05-13 16:47:18 -04:00
|
|
|
{
|
|
|
|
return Glib::wrap((GtkButton*)(gobj()->help_button));
|
|
|
|
}
|
|
|
|
|
|
|
|
const Button* FileSelection::get_help_button() const
|
|
|
|
{
|
|
|
|
return Glib::wrap((GtkButton*)(gobj()->help_button));
|
|
|
|
}
|
2007-11-12 18:44:49 -05:00
|
|
|
|
|
|
|
HButtonBox* FileSelection::get_button_area()
|
2005-05-13 16:47:18 -04:00
|
|
|
{
|
|
|
|
return Glib::wrap((GtkHButtonBox*)(gobj()->button_area));
|
|
|
|
}
|
|
|
|
|
|
|
|
const HButtonBox* FileSelection::get_button_area() const
|
|
|
|
{
|
|
|
|
return Glib::wrap((GtkHButtonBox*)(gobj()->button_area));
|
|
|
|
}
|
2007-11-12 18:44:49 -05:00
|
|
|
|
|
|
|
HBox* FileSelection::get_action_area()
|
2005-05-13 16:47:18 -04:00
|
|
|
{
|
|
|
|
return Glib::wrap((GtkHBox*)(gobj()->action_area));
|
|
|
|
}
|
|
|
|
|
|
|
|
const HBox* FileSelection::get_action_area() const
|
|
|
|
{
|
|
|
|
return Glib::wrap((GtkHBox*)(gobj()->action_area));
|
|
|
|
}
|
2007-11-12 18:44:49 -05:00
|
|
|
|
2005-05-13 16:47:18 -04:00
|
|
|
|
2007-11-12 18:44:49 -05:00
|
|
|
#ifdef GLIBMM_PROPERTIES_ENABLED
|
2005-05-13 16:47:18 -04:00
|
|
|
Glib::PropertyProxy<bool> FileSelection::property_show_fileops()
|
|
|
|
{
|
|
|
|
return Glib::PropertyProxy<bool>(this, "show-fileops");
|
|
|
|
}
|
2007-11-12 18:44:49 -05:00
|
|
|
#endif //GLIBMM_PROPERTIES_ENABLED
|
2005-05-13 16:47:18 -04:00
|
|
|
|
2007-11-12 18:44:49 -05:00
|
|
|
#ifdef GLIBMM_PROPERTIES_ENABLED
|
2005-05-13 16:47:18 -04:00
|
|
|
Glib::PropertyProxy_ReadOnly<bool> FileSelection::property_show_fileops() const
|
|
|
|
{
|
|
|
|
return Glib::PropertyProxy_ReadOnly<bool>(this, "show-fileops");
|
|
|
|
}
|
2007-11-12 18:44:49 -05:00
|
|
|
#endif //GLIBMM_PROPERTIES_ENABLED
|
2005-05-13 16:47:18 -04:00
|
|
|
|
2007-11-12 18:44:49 -05:00
|
|
|
#ifdef GLIBMM_PROPERTIES_ENABLED
|
2005-05-13 16:47:18 -04:00
|
|
|
Glib::PropertyProxy<std::string> FileSelection::property_filename()
|
|
|
|
{
|
|
|
|
return Glib::PropertyProxy<std::string>(this, "filename");
|
|
|
|
}
|
2007-11-12 18:44:49 -05:00
|
|
|
#endif //GLIBMM_PROPERTIES_ENABLED
|
2005-05-13 16:47:18 -04:00
|
|
|
|
2007-11-12 18:44:49 -05:00
|
|
|
#ifdef GLIBMM_PROPERTIES_ENABLED
|
2005-05-13 16:47:18 -04:00
|
|
|
Glib::PropertyProxy_ReadOnly<std::string> FileSelection::property_filename() const
|
|
|
|
{
|
|
|
|
return Glib::PropertyProxy_ReadOnly<std::string>(this, "filename");
|
|
|
|
}
|
2007-11-12 18:44:49 -05:00
|
|
|
#endif //GLIBMM_PROPERTIES_ENABLED
|
2005-05-13 16:47:18 -04:00
|
|
|
|
2007-11-12 18:44:49 -05:00
|
|
|
#ifdef GLIBMM_PROPERTIES_ENABLED
|
2005-05-13 16:47:18 -04:00
|
|
|
Glib::PropertyProxy<bool> FileSelection::property_select_multiple()
|
|
|
|
{
|
|
|
|
return Glib::PropertyProxy<bool>(this, "select-multiple");
|
|
|
|
}
|
2007-11-12 18:44:49 -05:00
|
|
|
#endif //GLIBMM_PROPERTIES_ENABLED
|
2005-05-13 16:47:18 -04:00
|
|
|
|
2007-11-12 18:44:49 -05:00
|
|
|
#ifdef GLIBMM_PROPERTIES_ENABLED
|
2005-05-13 16:47:18 -04:00
|
|
|
Glib::PropertyProxy_ReadOnly<bool> FileSelection::property_select_multiple() const
|
|
|
|
{
|
|
|
|
return Glib::PropertyProxy_ReadOnly<bool>(this, "select-multiple");
|
|
|
|
}
|
2007-11-12 18:44:49 -05:00
|
|
|
#endif //GLIBMM_PROPERTIES_ENABLED
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
|
|
|
|
#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
|
|
|
|
|
|
|
|
#ifdef GLIBMM_VFUNCS_ENABLED
|
|
|
|
#endif //GLIBMM_VFUNCS_ENABLED
|
2005-05-13 16:47:18 -04:00
|
|
|
|
|
|
|
|
|
|
|
} // namespace Gtk
|
|
|
|
|
2007-11-12 18:44:49 -05:00
|
|
|
#endif // GTKMM_DISABLE_DEPRECATED
|
|
|
|
|
2005-05-13 16:47:18 -04:00
|
|
|
|