[gdlmm] Add the item in the dock layout manager
- From: Fabien Parent <fparent src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gdlmm] Add the item in the dock layout manager
- Date: Wed, 25 Nov 2009 11:47:40 +0000 (UTC)
commit 0bfca6001b44f9b5edeb39af79f3b79031d647bb
Author: Fabien Parent <parent f gmail com>
Date: Wed Nov 25 12:27:30 2009 +0100
Add the item in the dock layout manager
gdl/src/dockitem.ccg | 22 ++++++++++++++++++++++
gdl/src/dockitem.hg | 6 ++++--
2 files changed, 26 insertions(+), 2 deletions(-)
---
diff --git a/gdl/src/dockitem.ccg b/gdl/src/dockitem.ccg
index ab5f7e4..6961650 100644
--- a/gdl/src/dockitem.ccg
+++ b/gdl/src/dockitem.ccg
@@ -19,6 +19,28 @@
namespace Gdl
{
+DockItem::DockItem(const Glib::ustring& name, const Glib::ustring& long_name, DockItemBehavior behavior)
+:
+ _CONSTRUCT("name", name.c_str(), "long-name", long_name.c_str(), "behavior", static_cast<GdlDockItemBehavior>(behavior))
+{
+ GdlDockItem* item = this->gobj();
+ int flags = GDL_DOCK_OBJECT(item)->flags;
+ flags &= ~GDL_DOCK_AUTOMATIC;
+ GDL_DOCK_OBJECT(item)->flags = static_cast<GdlDockObjectFlags>(flags);
+ gdl_dock_item_set_tablabel(item, gtk_label_new(long_name.c_str()));
+}
+
+DockItem::DockItem(const Glib::ustring& name, const Glib::ustring& long_name, const Gtk::StockID& stock_id, DockItemBehavior behavior)
+:
+ _CONSTRUCT("name", name.c_str(), "long-name", long_name.c_str(), "stock-id", stock_id.get_c_str(), "behavior", static_cast<GdlDockItemBehavior>(behavior))
+{
+ GdlDockItem* item = this->gobj();
+ int flags = GDL_DOCK_OBJECT(item)->flags;
+ flags &= ~GDL_DOCK_AUTOMATIC;
+ GDL_DOCK_OBJECT(item)->flags = static_cast<GdlDockObjectFlags>(flags);
+ gdl_dock_item_set_tablabel(item, gtk_label_new(long_name.c_str()));
+}
+
void DockItem::dock_floating(int docking_param)
{
gdl_dock_item_dock_to(gobj(), 0, GDL_DOCK_FLOATING, docking_param);
diff --git a/gdl/src/dockitem.hg b/gdl/src/dockitem.hg
index b01ddcb..cf873c2 100644
--- a/gdl/src/dockitem.hg
+++ b/gdl/src/dockitem.hg
@@ -36,9 +36,11 @@ class DockItem : public DockObject
_CLASS_GTKOBJECT(DockItem, GdlDockItem, GDL_DOCK_ITEM, DockObject, GdlDockObject)
public:
- _WRAP_CTOR(DockItem(const Glib::ustring& name, const Glib::ustring& long_name, DockItemBehavior behavior = static_cast<DockItemBehavior>(DOCK_ITEM_BEH_NORMAL)), gdl_dock_item_new)
+ DockItem(const Glib::ustring& name, const Glib::ustring& long_name, DockItemBehavior behavior = static_cast<DockItemBehavior>(DOCK_ITEM_BEH_NORMAL));
+ //_WRAP_CTOR(DockItem(const Glib::ustring& name, const Glib::ustring& long_name, DockItemBehavior behavior = static_cast<DockItemBehavior>(DOCK_ITEM_BEH_NORMAL)), gdl_dock_item_new)
- _WRAP_CTOR(DockItem(const Glib::ustring& name, const Glib::ustring& long_name, const Gtk::StockID& stock_id, DockItemBehavior behavior = static_cast<DockItemBehavior>(DOCK_ITEM_BEH_NORMAL)), gdl_dock_item_new_with_stock)
+ DockItem(const Glib::ustring& name, const Glib::ustring& long_name, const Gtk::StockID& stock_id, DockItemBehavior behavior = static_cast<DockItemBehavior>(DOCK_ITEM_BEH_NORMAL));
+ //_WRAP_CTOR(DockItem(const Glib::ustring& name, const Glib::ustring& long_name, const Gtk::StockID& stock_id, DockItemBehavior behavior = static_cast<DockItemBehavior>(DOCK_ITEM_BEH_NORMAL)), gdl_dock_item_new_with_stock)
_WRAP_METHOD(void dock_to(DockItem& target, DockPlacement position = static_cast<DockPlacement>(DOCK_NONE), int docking_param = -1), gdl_dock_item_dock_to)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]