f0c104c5056a43dc4a9f4267fd08c8b521d2f660
Stefan Schuermans first version of canvas mod...

Stefan Schuermans authored 12 years ago

1) /* Blinker
2)    Copyright 2011 Stefan Schuermans <stefan@blinkenarea.org>
3)    Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html
4)    a blinkenarea.org project */
5) 
6) #ifndef CANVASINPUT_H
7) #define CANVASINPUT_H
8) 
9) #include <string>
10) 
11) #include <BlinkenLib/BlinkenFrame.h>
12) 
13) #include "Canvas.h"
14) #include "Directory.h"
15) #include "File.h"
Stefan Schuermans implemented specialized set...

Stefan Schuermans authored 12 years ago

16) #include "InStreamFile.h"
Stefan Schuermans first version of canvas mod...

Stefan Schuermans authored 12 years ago

17) #include "Position.h"
Stefan Schuermans implemented specialized set...

Stefan Schuermans authored 12 years ago

18) #include "PositionFile.h"
Stefan Schuermans first version of canvas mod...

Stefan Schuermans authored 12 years ago

19) #include "Size.h"
Stefan Schuermans implemented specialized set...

Stefan Schuermans authored 12 years ago

20) #include "SizeFile.h"
Stefan Schuermans first version of canvas mod...

Stefan Schuermans authored 12 years ago

21) #include "StreamMgr.h"
22) #include "StreamRecv.h"
23) 
24) namespace Blinker {
25) 
26) /// input to canvas
27) class Canvas::Input: public StreamRecv
28) {
29) public:
30)   /**
31)    * @brief constructor
32)    * @param[in] canvas owning canvas
33)    * @param[in] dirBase base directory
34)    */
35)   Input(Canvas &canvas, const Directory &dirBase);
36) 
37)   /// virtual destructor
38)   virtual ~Input();
39) 
40) private:
41)   /// copy constructor disabled
42)   Input(const Input &that);
43) 
44)   /// assignment operator disabled
45)   const Input & operator=(const Input &that);
46) 
47) public:
48)   /// check for update of configuration
49)   void updateConfig();
50) 
51)   /**
52)    * @brief set current frame
53)    * @param[in] stream stream name
Stefan Schuermans merged frame processing wit...

Stefan Schuermans authored 12 years ago

54)    * @param[in] pFrame current frame (NULL for none)
Stefan Schuermans first version of canvas mod...

Stefan Schuermans authored 12 years ago

55)    */
56)   virtual void setFrame(const std::string &stream, stBlinkenFrame *pFrame);
57) 
58)   /**
59)    * @brief draw current frame to canvas
60)    * @return if a frame was available and it was drawn
61)    */
62)   bool draw();
63) 
64) protected:
Stefan Schuermans changed canvas to be able t...

Stefan Schuermans authored 12 years ago

65)   /// (re-)get position of area to copy from stream
66)   void getSrcPos();
Stefan Schuermans first version of canvas mod...

Stefan Schuermans authored 12 years ago

67) 
Stefan Schuermans changed canvas to be able t...

Stefan Schuermans authored 12 years ago

68)   /// (re-)get size of area to copy from stream
Stefan Schuermans first version of canvas mod...

Stefan Schuermans authored 12 years ago

69)   void getSize();
70) 
Stefan Schuermans changed canvas to be able t...

Stefan Schuermans authored 12 years ago

71)   /// (re-)get destination position on canvas
72)   void getDestPos();
Stefan Schuermans first version of canvas mod...

Stefan Schuermans authored 12 years ago

73) 
74) protected:
Stefan Schuermans implemented specialized set...

Stefan Schuermans authored 12 years ago

75)   Canvas       &m_canvas;      ///< owning canvas
76)   InStreamFile m_fileInStream; ///< input stream name file
77)   PositionFile m_fileSrcPos;   ///< source position file
78)   SizeFile     m_fileSize;     ///< size file
79)   PositionFile m_fileDestPos;  ///< destination position file