Merge branch 'gui' of git://git.lumiera.org/LUMIERA into doxygen_fixes

This commit is contained in:
Mano Stienen 2008-07-17 00:38:20 +02:00
commit 4184dcf253
11 changed files with 261 additions and 202 deletions

View file

@ -21,27 +21,38 @@
* *****************************************************/ * *****************************************************/
#include "panel.hpp" #include "panel.hpp"
#include "../gtk-lumiera.hpp"
namespace lumiera { namespace lumiera {
namespace gui { namespace gui {
namespace panels { namespace panels {
Panel::Panel(const gchar *name, const gchar *long_name, GdlDockItemBehavior behavior) Panel::Panel(const gchar *name, const gchar *long_name,
GdlDockItemBehavior behavior)
{ {
dock_item = (GdlDockItem*)gdl_dock_item_new (name, long_name, behavior); dock_item = (GdlDockItem*)gdl_dock_item_new (
name, long_name, behavior);
internal_setup(); internal_setup();
ENSURE(dock_item != NULL);
} }
Panel::Panel(const gchar *name, const gchar *long_name, const gchar *stock_id, Panel::Panel(const gchar *name, const gchar *long_name, const gchar *stock_id,
GdlDockItemBehavior behavior) GdlDockItemBehavior behavior)
{ {
dock_item = (GdlDockItem*)gdl_dock_item_new_with_stock (name, long_name, stock_id, behavior); dock_item = (GdlDockItem*)gdl_dock_item_new_with_stock (
name, long_name, stock_id, behavior);
g_object_ref(dock_item);
internal_setup(); internal_setup();
ENSURE(dock_item != NULL);
} }
Panel::~Panel() Panel::~Panel()
{ {
#warning Im not sure that dock_item is freed - is it self deleting? REQUIRE(dock_item != NULL);
g_object_unref(dock_item);
dock_item = NULL;
} }
GdlDockItem* GdlDockItem*
@ -53,6 +64,7 @@ Panel::get_dock_item() const
void void
Panel::show(bool show) Panel::show(bool show)
{ {
REQUIRE(dock_item != NULL);
if(show) gdl_dock_item_show_item (dock_item); if(show) gdl_dock_item_show_item (dock_item);
else gdl_dock_item_hide_item (dock_item); else gdl_dock_item_hide_item (dock_item);
} }
@ -60,12 +72,17 @@ Panel::show(bool show)
bool bool
Panel::is_shown() const Panel::is_shown() const
{ {
REQUIRE(dock_item != NULL);
return GTK_WIDGET_VISIBLE((GtkWidget*)dock_item); return GTK_WIDGET_VISIBLE((GtkWidget*)dock_item);
} }
void void
Panel::internal_setup() Panel::internal_setup()
{ {
REQUIRE(dock_item != NULL);
REQUIRE(gobj() != NULL);
gdl_dock_item_hide_grip(dock_item);
gtk_container_add ((GtkContainer*)dock_item, (GtkWidget*)gobj()); gtk_container_add ((GtkContainer*)dock_item, (GtkWidget*)gobj());
gtk_widget_show ((GtkWidget*)dock_item); gtk_widget_show ((GtkWidget*)dock_item);
} }

View file

@ -30,8 +30,17 @@ namespace gui {
namespace panels { namespace panels {
TimelinePanel::TimelinePanel() : TimelinePanel::TimelinePanel() :
Panel("timeline", _("Timeline"), "timeline_panel") Panel("timeline", _("Timeline"), "timeline_panel"),
button(Stock::OK)
{ {
// Setup the toolbar
toolbar.append(button);
toolbar.set_icon_size(IconSize(ICON_SIZE_MENU));
toolbar.set_toolbar_style(TOOLBAR_ICONS);
// Add the toolbar
pack_start(toolbar, PACK_SHRINK);
pack_start(timeline_widget, PACK_EXPAND_WIDGET); pack_start(timeline_widget, PACK_EXPAND_WIDGET);
} }

View file

@ -41,7 +41,13 @@ namespace panels {
TimelinePanel(); TimelinePanel();
protected: protected:
// Widgets
Gtk::Toolbar toolbar;
TimelineWidget timeline_widget; TimelineWidget timeline_widget;
// Toolbar Widgets
Gtk::ToolButton button;
}; };
} // namespace panels } // namespace panels

View file

@ -210,7 +210,7 @@ TimelineWidget::zoom_view(int point, int zoom_size)
void void
TimelineWidget::on_mouse_move_in_body(int x, int y) TimelineWidget::on_mouse_move_in_body(int x, int y)
{ {
ruler.set_mouse_chevron_time(x * timeScale + timeOffset); ruler.set_mouse_chevron_offset(x);
} }
} // namespace widgets } // namespace widgets

View file

@ -66,7 +66,7 @@ TimelineBody::on_realize()
Widget::on_realize(); Widget::on_realize();
// We wish to receive all event notifications // We wish to receive all event notifications
add_events(Gdk::POINTER_MOTION_MASK); add_events(Gdk::POINTER_MOTION_MASK | Gdk::SCROLL_MASK);
} }
void void
@ -140,7 +140,7 @@ TimelineBody::on_expose_event(GdkEventExpose* event)
// Prepare to render via cairo // Prepare to render via cairo
Glib::RefPtr<Style> style = get_style(); Glib::RefPtr<Style> style = get_style();
Gtk::Allocation allocation = get_allocation(); const Allocation allocation = get_allocation();
Cairo::RefPtr<Cairo::Context> cairo = window->create_cairo_context(); Cairo::RefPtr<Cairo::Context> cairo = window->create_cairo_context();
REQUIRE(style); REQUIRE(style);

View file

@ -43,16 +43,15 @@ namespace timeline {
TimelineRuler::TimelineRuler() : TimelineRuler::TimelineRuler() :
Glib::ObjectBase("TimelineRuler"), Glib::ObjectBase("TimelineRuler"),
timeOffset(0), timeOffset(-1),
timeScale(1), timeScale(1),
mouseChevronTime(0), mouseChevronOffset(0),
annotationHorzMargin(0), annotationHorzMargin(0),
annotationVertMargin(0), annotationVertMargin(0),
majorTickHeight(0), majorTickHeight(0),
minorLongTickHeight(0), minorLongTickHeight(0),
minorShortTickHeight(0), minorShortTickHeight(0),
minDivisionWidth(100), minDivisionWidth(100)
mouseChevronSize(0)
{ {
// Install style properties // Install style properties
register_styles(); register_styles();
@ -76,9 +75,9 @@ TimelineRuler::set_time_scale(int64_t time_scale)
} }
void void
TimelineRuler::set_mouse_chevron_time(gavl_time_t time) TimelineRuler::set_mouse_chevron_offset(int offset)
{ {
mouseChevronTime = time; mouseChevronOffset = offset;
queue_draw(); queue_draw();
} }
@ -88,7 +87,7 @@ TimelineRuler::on_realize()
Widget::on_realize(); Widget::on_realize();
// Set event notifications // Set event notifications
add_events(Gdk::POINTER_MOTION_MASK); add_events(Gdk::POINTER_MOTION_MASK | Gdk::SCROLL_MASK);
// Load styles // Load styles
read_styles(); read_styles();
@ -144,7 +143,7 @@ TimelineRuler::on_motion_notify_event(GdkEventMotion *event)
{ {
REQUIRE(event != NULL); REQUIRE(event != NULL);
set_mouse_chevron_time(event->x * timeScale + timeOffset); set_mouse_chevron_offset(event->x);
return true; return true;
} }
@ -248,16 +247,20 @@ TimelineRuler::draw_mouse_chevron(Cairo::RefPtr<Cairo::Context> cairo,
REQUIRE(ruler_rect.get_width() > 0); REQUIRE(ruler_rect.get_width() > 0);
REQUIRE(ruler_rect.get_height() > 0); REQUIRE(ruler_rect.get_height() > 0);
// Is the mouse chevron in view?
if(mouseChevronOffset < 0 ||
mouseChevronOffset >= ruler_rect.get_width())
return;
// Set the source colour // Set the source colour
Glib::RefPtr<Style> style = get_style(); Glib::RefPtr<Style> style = get_style();
Gdk::Cairo::set_source_color(cairo, style->get_fg(STATE_NORMAL)); Gdk::Cairo::set_source_color(cairo, style->get_fg(STATE_NORMAL));
const int x = (mouseChevronTime - timeOffset) / timeScale; cairo->move_to(mouseChevronOffset + 0.5,
cairo->move_to(x + 0.5,
ruler_rect.get_height()); ruler_rect.get_height());
cairo->line_to(x + mouseChevronSize + 0.5, cairo->line_to(mouseChevronOffset + mouseChevronSize + 0.5,
ruler_rect.get_height() - mouseChevronSize); ruler_rect.get_height() - mouseChevronSize);
cairo->line_to(x - mouseChevronSize + 0.5, cairo->line_to(mouseChevronOffset - mouseChevronSize + 0.5,
ruler_rect.get_height() - mouseChevronSize); ruler_rect.get_height() - mouseChevronSize);
cairo->fill(); cairo->fill();

View file

@ -53,7 +53,12 @@ public:
*/ */
void set_time_scale(int64_t time_scale); void set_time_scale(int64_t time_scale);
void set_mouse_chevron_time(gavl_time_t time); /**
* Sets the offset of the mouse chevron in pixels from the left
* edge of the widget. If offset is less than 0 or greater than the
* width, the chevron will not be visible.
*/
void set_mouse_chevron_offset(int offset);
/* ===== Events ===== */ /* ===== Events ===== */
protected: protected:
@ -86,7 +91,9 @@ private:
// View values // View values
gavl_time_t timeOffset; gavl_time_t timeOffset;
int64_t timeScale; int64_t timeScale;
int mouseChevronTime;
// Indicated values
int mouseChevronOffset;
// Style values // Style values
int annotationHorzMargin; int annotationHorzMargin;

View file

@ -28,200 +28,208 @@
using namespace Gtk; using namespace Gtk;
using namespace Glib; using namespace Glib;
using namespace sigc;
using namespace lumiera::gui; using namespace lumiera::gui;
namespace lumiera { namespace lumiera {
namespace gui { namespace gui {
namespace workspace { namespace workspace {
Actions::Actions(WorkspaceWindow &workspace_window) : Actions::Actions(WorkspaceWindow &workspace_window) :
workspaceWindow(workspace_window) workspaceWindow(workspace_window),
is_updating_action_state(false)
{
register_stock_items();
workspace_window.signal_show ().connect_notify(mem_fun(this, &Actions::update_action_state));
//----- Create the Action Group -----//
actionGroup = ActionGroup::create();
// File menu
actionGroup->add(Action::create("FileMenu", _("_File")));
actionGroup->add(Action::create("FileNewProject", Stock::NEW, _("_New Project...")),
sigc::mem_fun(*this, &Actions::on_menu_file_new_project));
actionGroup->add(Action::create("FileOpenProject", Stock::OPEN, _("_Open Project...")),
sigc::mem_fun(*this, &Actions::on_menu_file_open_project));
actionGroup->add(Action::create("FileRender", _("_Render...")),
Gtk::AccelKey("<shift>R"),
sigc::mem_fun(*this, &Actions::on_menu_file_render));
actionGroup->add(Action::create("FileQuit", Stock::QUIT),
sigc::mem_fun(*this, &Actions::on_menu_file_quit));
// Edit menu
actionGroup->add(Action::create("EditMenu", _("_Edit")));
actionGroup->add(Action::create("EditCopy", Stock::COPY),
sigc::mem_fun(*this, &Actions::on_menu_others));
actionGroup->add(Action::create("EditPaste", Stock::PASTE),
sigc::mem_fun(*this, &Actions::on_menu_others));
actionGroup->add(Action::create("EditPreferences", Stock::PREFERENCES),
sigc::mem_fun(*this, &Actions::on_menu_edit_preferences));
// View Menu
actionGroup->add(Action::create("ViewMenu", _("_View")));
assetsPanelAction = ToggleAction::create("ViewAssets", Gtk::StockID("assets_panel"));
assetsPanelAction->signal_toggled().connect(
sigc::mem_fun(*this, &Actions::on_menu_view_assets));
actionGroup->add(assetsPanelAction);
timelinePanelAction = ToggleAction::create("ViewTimeline", Gtk::StockID("timeline_panel"));
timelinePanelAction->signal_toggled().connect(
sigc::mem_fun(*this, &Actions::on_menu_view_timeline));
actionGroup->add(timelinePanelAction);
viewerPanelAction = ToggleAction::create("ViewViewer", Gtk::StockID("viewer_panel"));
viewerPanelAction->signal_toggled().connect(
sigc::mem_fun(*this, &Actions::on_menu_view_viewer));
actionGroup->add(viewerPanelAction);
// Help Menu
actionGroup->add(Action::create("HelpMenu", _("_Help")) );
actionGroup->add(Action::create("HelpAbout", Stock::ABOUT),
sigc::mem_fun(*this, &Actions::on_menu_help_about) );
}
void
Actions::register_stock_items()
{
RefPtr<IconFactory> factory = IconFactory::create();
add_stock_item(factory, "assets-panel.png", "assets_panel", _("_Assets"));
add_stock_item(factory, "timeline-panel.png", "timeline_panel", _("_Timeline"));
add_stock_item(factory, "viewer-panel.png", "viewer_panel", _("_Viewer"));
factory->add_default(); //Add factory to list of factories.
}
void
Actions::add_stock_item(const Glib::RefPtr<IconFactory>& factory,
const Glib::ustring& filepath,
const Glib::ustring& id, const Glib::ustring& label)
{
Gtk::IconSource source;
try
{ {
register_stock_items(); //This throws an exception if the file is not found:
source.set_pixbuf( Gdk::Pixbuf::create_from_file(filepath) );
actionGroup = ActionGroup::create(); }
catch(const Glib::Exception& ex)
// File menu {
actionGroup->add(Action::create("FileMenu", _("_File"))); g_message(ex.what().c_str());
actionGroup->add(Action::create("FileNewProject", Stock::NEW, _("_New Project...")),
sigc::mem_fun(*this, &Actions::on_menu_file_new_project));
actionGroup->add(Action::create("FileOpenProject", Stock::OPEN, _("_Open Project...")),
sigc::mem_fun(*this, &Actions::on_menu_file_open_project));
actionGroup->add(Action::create("FileRender", _("_Render...")),
Gtk::AccelKey("<shift>R"),
sigc::mem_fun(*this, &Actions::on_menu_file_render));
actionGroup->add(Action::create("FileQuit", Stock::QUIT),
sigc::mem_fun(*this, &Actions::on_menu_file_quit));
// Edit menu
actionGroup->add(Action::create("EditMenu", _("_Edit")));
actionGroup->add(Action::create("EditCopy", Stock::COPY),
sigc::mem_fun(*this, &Actions::on_menu_others));
actionGroup->add(Action::create("EditPaste", Stock::PASTE),
sigc::mem_fun(*this, &Actions::on_menu_others));
actionGroup->add(Action::create("EditPreferences", Stock::PREFERENCES),
sigc::mem_fun(*this, &Actions::on_menu_edit_preferences));
// View Menu
actionGroup->add(Action::create("ViewMenu", _("_View")));
assetsPanelAction = ToggleAction::create("ViewAssets", Gtk::StockID("assets_panel"));
assetsPanelAction->signal_toggled().connect(
sigc::mem_fun(*this, &Actions::on_menu_view_assets));
actionGroup->add(assetsPanelAction);
timelinePanelAction = ToggleAction::create("ViewTimeline", Gtk::StockID("timeline_panel"));
timelinePanelAction->signal_toggled().connect(
sigc::mem_fun(*this, &Actions::on_menu_view_timeline));
actionGroup->add(timelinePanelAction);
viewerPanelAction = ToggleAction::create("ViewViewer", Gtk::StockID("viewer_panel"));
viewerPanelAction->signal_toggled().connect(
sigc::mem_fun(*this, &Actions::on_menu_view_viewer));
actionGroup->add(viewerPanelAction);
// Help Menu
actionGroup->add(Action::create("HelpMenu", _("_Help")) );
actionGroup->add(Action::create("HelpAbout", Stock::ABOUT),
sigc::mem_fun(*this, &Actions::on_menu_help_about) );
// Refresh the UI state
update_action_state();
} }
void source.set_size(Gtk::ICON_SIZE_SMALL_TOOLBAR);
Actions::register_stock_items() source.set_size_wildcarded(); //Icon may be scaled.
{
RefPtr<IconFactory> factory = IconFactory::create();
add_stock_item(factory, "assets-panel.png", "assets_panel", _("_Assets"));
add_stock_item(factory, "timeline-panel.png", "timeline_panel", _("_Timeline"));
add_stock_item(factory, "viewer-panel.png", "viewer_panel", _("_Viewer"));
factory->add_default(); //Add factory to list of factories.
}
void Gtk::IconSet icon_set;
Actions::add_stock_item(const Glib::RefPtr<IconFactory>& factory, icon_set.add_source(source); //More than one source per set is allowed.
const Glib::ustring& filepath,
const Glib::ustring& id, const Glib::ustring& label)
{
Gtk::IconSource source;
try
{
//This throws an exception if the file is not found:
source.set_pixbuf( Gdk::Pixbuf::create_from_file(filepath) );
}
catch(const Glib::Exception& ex)
{
g_message(ex.what().c_str());
}
source.set_size(Gtk::ICON_SIZE_SMALL_TOOLBAR); const Gtk::StockID stock_id(id);
source.set_size_wildcarded(); //Icon may be scaled. factory->add(stock_id, icon_set);
Gtk::Stock::add(Gtk::StockItem(stock_id, label));
}
Gtk::IconSet icon_set; void
icon_set.add_source(source); //More than one source per set is allowed. Actions::update_action_state()
{
REQUIRE(workspaceWindow.assets_panel);
REQUIRE(workspaceWindow.timeline_panel);
REQUIRE(workspaceWindow.viewer_panel);
const Gtk::StockID stock_id(id); is_updating_action_state = true;
factory->add(stock_id, icon_set); assetsPanelAction->set_active(workspaceWindow.assets_panel->is_shown());
Gtk::Stock::add(Gtk::StockItem(stock_id, label)); timelinePanelAction->set_active(workspaceWindow.timeline_panel->is_shown());
} viewerPanelAction->set_active(workspaceWindow.viewer_panel->is_shown());
is_updating_action_state = false;
}
void /* ===== File Menu Event Handlers ===== */
Actions::update_action_state()
{
assetsPanelAction->set_active(workspaceWindow.assets_panel.is_shown());
timelinePanelAction->set_active(workspaceWindow.timeline_panel.is_shown());
viewerPanelAction->set_active(workspaceWindow.viewer_panel.is_shown());
}
/* ===== File Menu Event Handlers ===== */ void
Actions::on_menu_file_new_project()
{
g_message("A File|New menu item was selecteda.");
}
void void
Actions::on_menu_file_new_project() Actions::on_menu_file_open_project()
{ {
g_message("A File|New menu item was selecteda."); g_message("A File|Open menu item was selecteda.");
} }
void void
Actions::on_menu_file_open_project() Actions::on_menu_file_render()
{ {
g_message("A File|Open menu item was selecteda."); dialogs::Render dialog(workspaceWindow);
} dialog.run();
}
void void
Actions::on_menu_file_render() Actions::on_menu_file_quit()
{ {
dialogs::Render dialog(workspaceWindow); workspaceWindow.hide(); // Closes the main window to stop the Gtk::Main::run().
dialog.run(); }
}
void /* ===== Edit Menu Event Handlers ===== */
Actions::on_menu_file_quit()
{
workspaceWindow.hide(); // Closes the main window to stop the Gtk::Main::run().
}
/* ===== Edit Menu Event Handlers ===== */ void
Actions::on_menu_edit_preferences()
{
dialogs::PreferencesDialog dialog(workspaceWindow);
dialog.run();
}
void /* ===== View Menu Event Handlers ===== */
Actions::on_menu_edit_preferences()
{
dialogs::PreferencesDialog dialog(workspaceWindow);
dialog.run();
}
/* ===== View Menu Event Handlers ===== */ void
Actions::on_menu_view_assets()
{
if(!is_updating_action_state)
workspaceWindow.assets_panel->show(assetsPanelAction->get_active());
}
void void
Actions::on_menu_view_assets() Actions::on_menu_view_timeline()
{ {
workspaceWindow.assets_panel.show(!workspaceWindow.assets_panel.is_shown()); if(!is_updating_action_state)
update_action_state(); workspaceWindow.timeline_panel->show(timelinePanelAction->get_active());
} }
void void
Actions::on_menu_view_timeline() Actions::on_menu_view_viewer()
{ {
workspaceWindow.timeline_panel.show(!workspaceWindow.timeline_panel.is_shown()); if(!is_updating_action_state)
update_action_state(); workspaceWindow.viewer_panel->show(viewerPanelAction->get_active());
} }
void void
Actions::on_menu_view_viewer() Actions::on_menu_help_about()
{ {
workspaceWindow.viewer_panel.show(!workspaceWindow.viewer_panel.is_shown()); // Configure the about dialog
update_action_state(); AboutDialog dialog;
}
void //dialog.set_program_name(AppTitle);
Actions::on_menu_help_about() dialog.set_version(AppVersion);
{ //dialog.set_version(Appconfig::get("version"));
// Configure the about dialog dialog.set_copyright(AppCopyright);
AboutDialog dialog; dialog.set_website(AppWebsite);
dialog.set_authors(StringArrayHandle(AppAuthors,
sizeof(AppAuthors) / sizeof(gchar*),
OWNERSHIP_NONE));
//dialog.set_program_name(AppTitle); dialog.set_transient_for(workspaceWindow);
dialog.set_version(AppVersion);
//dialog.set_version(Appconfig::get("version"));
dialog.set_copyright(AppCopyright);
dialog.set_website(AppWebsite);
dialog.set_authors(StringArrayHandle(AppAuthors,
sizeof(AppAuthors) / sizeof(gchar*),
OWNERSHIP_NONE));
dialog.set_transient_for(workspaceWindow); // Show the about dialog
dialog.run();
// Show the about dialog }
dialog.run();
}
//----- Temporary junk //----- Temporary junk
void void
Actions::on_menu_others() Actions::on_menu_others()
{ {
g_message("A menu item was selected."); g_message("A menu item was selected.");
} }
} // namespace workspace } // namespace workspace
} // namespace gui } // namespace gui

View file

@ -94,6 +94,10 @@ class WorkspaceWindow;
Glib::RefPtr<Gtk::ToggleAction> timelinePanelAction; Glib::RefPtr<Gtk::ToggleAction> timelinePanelAction;
Glib::RefPtr<Gtk::ToggleAction> viewerPanelAction; Glib::RefPtr<Gtk::ToggleAction> viewerPanelAction;
/* ===== Internals ===== */
private:
bool is_updating_action_state;
friend class WorkspaceWindow; friend class WorkspaceWindow;
}; };

View file

@ -128,7 +128,12 @@ WorkspaceWindow::create_ui()
toolbar->set_toolbar_style(TOOLBAR_ICONS); toolbar->set_toolbar_style(TOOLBAR_ICONS);
base_container.pack_start(*toolbar, Gtk::PACK_SHRINK); base_container.pack_start(*toolbar, Gtk::PACK_SHRINK);
//----- Create the dock -----// //----- Create the Panels -----//
assets_panel = Glib::RefPtr<AssetsPanel>(new AssetsPanel());
viewer_panel = Glib::RefPtr<ViewerPanel>(new ViewerPanel());
timeline_panel = Glib::RefPtr<TimelinePanel>(new TimelinePanel());
//----- Create the Dock -----//
dock = Glib::wrap(gdl_dock_new()); dock = Glib::wrap(gdl_dock_new());
layout = gdl_dock_layout_new((GdlDock*)dock->gobj()); layout = gdl_dock_layout_new((GdlDock*)dock->gobj());
@ -139,15 +144,15 @@ WorkspaceWindow::create_ui()
dock_container.pack_end(*dock, PACK_EXPAND_WIDGET); dock_container.pack_end(*dock, PACK_EXPAND_WIDGET);
base_container.pack_start(dock_container, PACK_EXPAND_WIDGET); base_container.pack_start(dock_container, PACK_EXPAND_WIDGET);
gdl_dock_add_item ((GdlDock*)dock->gobj(), assets_panel.get_dock_item(), GDL_DOCK_LEFT); gdl_dock_add_item ((GdlDock*)dock->gobj(), assets_panel->get_dock_item(), GDL_DOCK_LEFT);
gdl_dock_add_item ((GdlDock*)dock->gobj(), viewer_panel.get_dock_item(), GDL_DOCK_RIGHT); gdl_dock_add_item ((GdlDock*)dock->gobj(), viewer_panel->get_dock_item(), GDL_DOCK_RIGHT);
gdl_dock_add_item ((GdlDock*)dock->gobj(), timeline_panel.get_dock_item(), GDL_DOCK_BOTTOM); gdl_dock_add_item ((GdlDock*)dock->gobj(), timeline_panel->get_dock_item(), GDL_DOCK_BOTTOM);
// Manually dock and move around some of the items // Manually dock and move around some of the items
gdl_dock_item_dock_to (timeline_panel.get_dock_item(), assets_panel.get_dock_item(), gdl_dock_item_dock_to (timeline_panel->get_dock_item(),
GDL_DOCK_BOTTOM, -1); assets_panel->get_dock_item(), GDL_DOCK_BOTTOM, -1);
gdl_dock_item_dock_to (viewer_panel.get_dock_item(), assets_panel.get_dock_item(), gdl_dock_item_dock_to (viewer_panel->get_dock_item(),
GDL_DOCK_RIGHT, -1); assets_panel->get_dock_item(), GDL_DOCK_RIGHT, -1);
show_all_children(); show_all_children();

View file

@ -77,9 +77,9 @@ namespace workspace {
/* ===== Panels ===== */ /* ===== Panels ===== */
private: private:
AssetsPanel assets_panel; Glib::RefPtr<AssetsPanel> assets_panel;
ViewerPanel viewer_panel; Glib::RefPtr<ViewerPanel> viewer_panel;
TimelinePanel timeline_panel; Glib::RefPtr<TimelinePanel> timeline_panel;
/* ===== Helpers ===== */ /* ===== Helpers ===== */
private: private: