VideoTools
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
gvviewerwindow_curses.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2017 Graeme Walker
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
16 // ===
17 ///
18 /// \file gvviewerwindow_curses.h
19 ///
20 
21 #ifndef GV_VIEWERWINDOW_CURSES__H
22 #define GV_VIEWERWINDOW_CURSES__H
23 
24 #include "gdef.h"
25 #include "gvviewerwindow.h"
26 #include "gvmask.h"
27 
28 namespace Gv
29 {
30  class ViewerWindowCurses ;
31 }
32 
33 /// \class Gv::ViewerWindowCurses
34 /// A pimple-pattern implementation class for ViewerWindow that uses curses.
35 ///
37 {
38 public:
40  ///< Constructor.
41 
42  virtual ~ViewerWindowCurses() ;
43  ///< Destructor.
44 
45  virtual void init() override ;
46  ///< Override from ViewerWindow.
47 
48  virtual void display( int , int , int , const char * , size_t ) override ;
49  ///< Override from ViewerWindow.
50 
51  virtual int dx() const override ;
52  ///< Override from ViewerWindow.
53 
54  virtual int dy() const override ;
55  ///< Override from ViewerWindow.
56 
57 private:
59  void operator=( const ViewerWindowCurses & ) ;
60 
61 private:
62  ViewerWindowHandler & m_handler ;
63  ViewerWindowConfig m_config ;
64  Gv::Mask m_mask ;
65 } ;
66 
67 #endif
ViewerWindowCurses(ViewerWindowHandler &, ViewerWindowConfig, int dx, int dy)
Constructor.
virtual ~ViewerWindowCurses()
Destructor.
Implements a binary mask over an image that can be edited by mouse actions, and that can be stored on...
Definition: gvmask.h:41
An abstract base class for a viewer window.
virtual void init() override
Override from ViewerWindow.
A configuration structure for Gv::ViewerWindow.
virtual void display(int, int, int, const char *, size_t) override
Override from ViewerWindow.
virtual int dy() const override
Override from ViewerWindow.
A callback interface for Gv::ViewerWindow.
virtual int dx() const override
Override from ViewerWindow.
A pimple-pattern implementation class for ViewerWindow that uses curses.