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) Lumiera.org
5  2008, Joel Holdsworth <joel@airwebreathe.org.uk>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 * *****************************************************/
22 
23 
28 #include "stage/gtk-base.hpp"
30 
32 #include "stage/ui-bus.hpp"
34 
35 
36 using namespace Gtk;
37 using namespace stage::widget;
38 using namespace stage::controller;
39 
40 namespace stage {
41 namespace panel {
42 
43  ViewerPanel::ViewerPanel (workspace::PanelManager& panelManager
44  ,Gdl::DockItem& dockItem)
45  : Panel(panelManager, dockItem, getTitle(), getStockID())
46  , playbackController_{}
47  {
48  //----- Pack in the Widgets -----//
49  pack_start(display_, PACK_EXPAND_WIDGET);
50 
51  FrameDestination outputDestination (sigc::mem_fun(this, &ViewerPanel::on_frame));
52  playbackController_.useDisplay (DisplayService::setUp (outputDestination));
53  }
54 
55  const char*
56  ViewerPanel::getTitle()
57  {
58  return _("Viewer");
59  }
60 
61  const gchar*
62  ViewerPanel::getStockID()
63  {
64  return "panel_viewer";
65  }
66 
67  void
68  ViewerPanel::on_frame (void* buffer)
69  {
70  Displayer *displayer = display_.getDisplayer();
71  REQUIRE(displayer);
72 
73  displayer->put(buffer);
74  }
75 
76 
77 }}// 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:49
Lumiera custom widgets.
Definition: gtk-base.hpp:163
Lumiera GTK UI implementation root.
Definition: guifacade.cpp:46
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:74