3 #ifndef _GTKMM_BUILDER_H
4 #define _GTKMM_BUILDER_H
7 #include <glibmm/ustring.h>
8 #include <sigc++/sigc++.h>
32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
38 #ifndef DOXYGEN_SHOULD_SKIP_THIS
40 {
class Builder_Class; }
70 #ifndef DOXYGEN_SHOULD_SKIP_THIS
73 static void throw_func(GError* gobject);
82 #ifndef DOXYGEN_SHOULD_SKIP_THIS
87 class Value<
Gtk::BuilderError::Code> :
public Glib::Value_Enum<Gtk::BuilderError::Code>
90 static GType value_type() G_GNUC_CONST;
112 #ifndef DOXYGEN_SHOULD_SKIP_THIS
121 static CppClassType builder_class_;
129 explicit Builder(
const Glib::ConstructParams& construct_params);
141 #ifndef DOXYGEN_SHOULD_SKIP_THIS
144 static GType get_base_type() G_GNUC_CONST;
189 static Glib::RefPtr<Builder>
create_from_file(
const std::string& filename,
const Glib::ustring& object_id);
203 static Glib::RefPtr<Builder>
create_from_file(
const std::string& filename,
const char* object_id);
215 static Glib::RefPtr<Builder>
create_from_file(
const std::string& filename,
const Glib::StringArrayHandle& object_ids);
242 static Glib::RefPtr<Builder>
create_from_string(
const Glib::ustring& buffer,
const Glib::ustring& object_id);
255 static Glib::RefPtr<Builder>
create_from_string(
const Glib::ustring& buffer,
const Glib::StringArrayHandle& object_ids);
297 bool add_from_file(
const std::string& filename,
const Glib::ustring& object_id);
317 bool add_from_file(
const std::string& filename,
const Glib::StringArrayHandle& object_ids);
361 bool add_from_string(
const Glib::ustring& buffer,
const Glib::StringArrayHandle& object_ids);
403 template <
class T_W
idget>
inline
410 widget =
dynamic_cast<T_Widget*
>(this->get_widget_checked(
name, T_Widget::get_base_type()));
413 g_critical(
"Gtk::Builder::get_widget(): dynamic_cast<> failed.");
432 template <
class T_W
idget>
inline
439 typedef typename T_Widget::BaseObjectType cwidget_type;
440 cwidget_type* pCWidget = (cwidget_type*)get_cwidget(
name);
447 Glib::ObjectBase* pObjectBase = ObjectBase::_get_current_wrapper((GObject*)pCWidget);
452 widget =
dynamic_cast<T_Widget*
>( Glib::wrap((
GtkWidget*)pCWidget) );
459 g_critical(
"Gtk::Builder::get_widget_derived(): dynamic_cast<> failed. An existing C++ instance, of a different type, seems to exist.");
466 Glib::RefPtr<Gtk::Builder> refThis(
this);
467 refThis->reference();
468 widget =
new T_Widget(pCWidget, refThis);
BuilderError(GError *gobject)
BuilderError(Code error_code, const Glib::ustring &error_message)
static Glib::RefPtr< Builder > create_from_string(const Glib::ustring &buffer)
Glib::PropertyProxy_ReadOnly< Glib::ustring > property_translation_domain() const
Glib::RefPtr< Gtk::Builder > wrap(GtkBuilder *object, bool take_copy=false)
GtkBuilder * gobj()
Provides access to the underlying C GObject.
static Glib::RefPtr< Builder > create_from_file(const std::string &filename, const Glib::StringArrayHandle &object_ids)
bool add_from_file(const std::string &filename, const Glib::ustring &object_id)
Glib::RefPtr< Glib::Object > get_object(const Glib::ustring &name)
static Glib::RefPtr< Builder > create()
GtkBuilder * gobj_copy()
Provides access to the underlying C instance. The caller is responsible for unrefing it....
bool add_from_string(const Glib::ustring &buffer, const Glib::ustring &object_id)
static Glib::RefPtr< Builder > create_from_string(const Glib::ustring &buffer, const Glib::ustring &object_id)
static Glib::RefPtr< Builder > create_from_file(const std::string &filename)
bool add_from_string(const Glib::ustring &buffer, const Glib::StringArrayHandle &object_ids)
bool add_from_file(const std::string &filename, const char *object_id)
static Glib::RefPtr< Builder > create_from_file(const std::string &filename, const char *object_id)
Glib::PropertyProxy< Glib::ustring > property_translation_domain()
static Glib::RefPtr< Builder > create_from_string(const Glib::ustring &buffer, const Glib::StringArrayHandle &object_ids)
void get_widget_derived(const Glib::ustring &name, T_Widget *&widget)
GtkWidget * get_cwidget(const Glib::ustring &name)
static GType get_type() G_GNUC_CONST
void set_translation_domain(const Glib::ustring &domain)
const GtkBuilder * gobj() const
Provides access to the underlying C GObject.
bool add_from_file(const std::string &filename)
bool add_from_string(const Glib::ustring &buffer, const char *object_id)
bool add_from_string(const char *buffer, gsize length)
static Glib::RefPtr< Builder > create_from_string(const Glib::ustring &buffer, const char *object_id)
Glib::ustring get_translation_domain() const
bool add_from_string(const Glib::ustring &buffer)
void get_widget(const Glib::ustring &name, T_Widget *&widget)
static Glib::RefPtr< Builder > create_from_file(const std::string &filename, const Glib::ustring &object_id)
bool add_from_file(const std::string &filename, const Glib::StringArrayHandle &object_ids)
Gtk::Widget * get_widget_checked(const Glib::ustring &name, GType type)
GtkImageIconNameData name
PBD::PropertyDescriptor< timecnt_t > length