587ae25b84177c5af73d1794bba555c6643b39bd
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) 
Stefan Schuermans namespace for preprocessor...

Stefan Schuermans authored 12 years ago

6) #ifndef BLINKER_CANVASINPUT_H
7) #define BLINKER_CANVASINPUT_H
Stefan Schuermans first version of canvas mod...

Stefan Schuermans authored 12 years ago

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
Stefan Schuermans converted canvas module to...

Stefan Schuermans authored 12 years ago

33)    * @param[in] name name of input
Stefan Schuermans first version of canvas mod...

Stefan Schuermans authored 12 years ago

34)    * @param[in] dirBase base directory
35)    */
Stefan Schuermans converted canvas module to...

Stefan Schuermans authored 12 years ago

36)   Input(Canvas &canvas, const std::string &name, const Directory &dirBase);
Stefan Schuermans first version of canvas mod...

Stefan Schuermans authored 12 years ago

37) 
38)   /// virtual destructor
39)   virtual ~Input();
40) 
41) private:
42)   /// copy constructor disabled
43)   Input(const Input &that);
44) 
45)   /// assignment operator disabled
46)   const Input & operator=(const Input &that);
47) 
48) public:
49)   /// check for update of configuration
50)   void updateConfig();
51) 
52)   /**
53)    * @brief set current frame
54)    * @param[in] stream stream name
Stefan Schuermans merged frame processing wit...

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

76)   Canvas       &m_canvas;      ///< owning canvas
Stefan Schuermans converted canvas module to...

Stefan Schuermans authored 12 years ago

77)   std::string  m_name;         ///< name of input
Stefan Schuermans implemented specialized set...

Stefan Schuermans authored 12 years ago

78)   InStreamFile m_fileInStream; ///< input stream name file
79)   PositionFile m_fileSrcPos;   ///< source position file
80)   SizeFile     m_fileSize;     ///< size file
81)   PositionFile m_fileDestPos;  ///< destination position file
Stefan Schuermans first version of canvas mod...

Stefan Schuermans authored 12 years ago

82) }; // class Canvas::Input
83) 
84) } // namespace Blinker
85) 
Stefan Schuermans namespace for preprocessor...

Stefan Schuermans authored 12 years ago

86) #endif // #ifndef BLINKER_CANVASINPUT_H