Lumiera  0.pre.03
»edit your freedom«
workspace-window.cpp
Go to the documentation of this file.
1 /*
2  WorkspaceWindow - the main workspace window of the GUI
3 
4  Copyright (C)
5  2008, Joel Holdsworth <joel@airwebreathe.org.uk>
6 
7   **Lumiera** is free software; you can redistribute it and/or modify it
8   under the terms of the GNU General Public License as published by the
9   Free Software Foundation; either version 2 of the License, or (at your
10   option) any later version. See the file COPYING for further details.
11 
12 * *****************************************************************/
13 
14 
19 #include "stage/gtk-base.hpp"
20 #include "stage/config-keys.hpp"
24 #include "include/logging.h"
25 
26 
27 
28 
29 namespace stage {
30 namespace workspace {
31 
32  using ctrl::UiManager;
33 
34 
35  WorkspaceWindow::WorkspaceWindow (UiManager& uiManager)
36  : panelManager_(*this)
37  {
38  createUI (uiManager);
39  }
40 
41 
42  WorkspaceWindow::~WorkspaceWindow()
43  {
44  INFO (gui_dbg, "Closing workspace window...");
45  }
46 
47 
48 
49  PanelManager&
50  WorkspaceWindow::getPanelManager()
51  {
52  return panelManager_;
53  }
54 
55 
56  void
57  WorkspaceWindow::createUI (UiManager& uiManager)
58  {
59  signal_show ().connect_notify(mem_fun(uiManager, &UiManager::updateWindowFocusRelatedActions));
60  add_accel_group (uiManager.get_accel_group());
61 
62  // RTL Test Code
63  //set_default_direction (TEXT_DIR_RTL);
64 
65  //----- Configure the Window -----//
66  set_title (Config::get (KEY_TITLE));
67  set_default_size (1024, 768);
68 
69  //----- Set up the UI Manager -----//
70  // The UI will be nested within a VBox
71  add (baseContainer_);
72 
73  //----- Set up the Menu Bar -----//
74  Gtk::Widget* menu_bar = uiManager.get_widget ("/MenuBar");
75  REQUIRE (menu_bar != NULL);
76  baseContainer_.pack_start(*menu_bar, Gtk::PACK_SHRINK);
77 
78  //----- Create the Docks -----//
79  panelManager_.setupDock();
80  dockContainer_.pack_start (panelManager_.getDockBar(), false,false,0);
81  dockContainer_.pack_start (panelManager_.getDock(), true,true,0);
82  baseContainer_.pack_start (dockContainer_, Gtk::PACK_EXPAND_WIDGET);
83 
84  //----- Create the status bar -----//
85  //statusBar.set_has_resize_grip();
86  statusBar_.set_resize_mode (Gtk::RESIZE_PARENT);
87  baseContainer_.pack_start (statusBar_, Gtk::PACK_SHRINK);
88 
89  show_all_children();
90  }
91 
92 
93 
94 }}// namespace stage::workspace
Definition of access keys for global UI configuration.
Management of dockable panels.
This header is for including and configuring NoBug.
static string get(lib::Literal key)
Manager for global user interface concerns, framework integration and global state.
Lumiera GTK UI implementation root.
Definition: guifacade.cpp:37
This file contains the definition of the main workspace window parent, which is the toplevel parent o...
A set of basic GTK includes for the UI.