Lumiera  0.pre.03
»edit your freedom«
viewer-panel.cpp
Go to the documentation of this file.
1 /*
2  ViewerPanel - Dockable panel to hold the video display widgets and controls
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"
21 
23 #include "stage/ui-bus.hpp"
25 
26 
27 using namespace Gtk;
28 using namespace stage::widget;
29 using namespace stage::controller;
30 
31 namespace stage {
32 namespace panel {
33 
34  ViewerPanel::ViewerPanel (workspace::PanelManager& panelManager
35  ,Gdl::DockItem& dockItem)
36  : Panel(panelManager, dockItem, getTitle(), getStockID())
37  , playbackController_{}
38  {
39  //----- Pack in the Widgets -----//
40  pack_start(display_, PACK_EXPAND_WIDGET);
41 
42  FrameDestination outputDestination (sigc::mem_fun(this, &ViewerPanel::on_frame));
43  playbackController_.useDisplay (DisplayService::setUp (outputDestination));
44  }
45 
46  const char*
47  ViewerPanel::getTitle()
48  {
49  return _("Viewer");
50  }
51 
52  const gchar*
53  ViewerPanel::getStockID()
54  {
55  return "panel_viewer";
56  }
57 
58  void
59  ViewerPanel::on_frame (void* buffer)
60  {
61  Displayer *displayer = display_.getDisplayer();
62  REQUIRE(displayer);
63 
64  displayer->put(buffer);
65  }
66 
67 
68 }}// namespace stage::panel
virtual void put(void *const)=0
Put an image of a given width and height with the expected input format (as indicated by the format m...
A public service provided by the GUI, implementing the lumiera::Display facade interface.
Under construction: the top level UI controller.
static LumieraDisplaySlot setUp(FrameDestination const &)
open a new display, sending frames to the given output destination
The base class for all dockable panels.
Definition: panel.hpp:40
Lumiera custom widgets.
Definition: gtk-base.hpp:155
Lumiera GTK UI implementation root.
Definition: guifacade.cpp:37
Definition of a dockable panel to hold the video viewers.
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.
A Displayer is a class which is responsible for rendering an image in some way (ie: Xvideo...
Definition: displayer.hpp:65