Usermode/AxWin4 - Shared buffers working, added DrawCtrl code
[tpg/acess2.git] / Usermode / Applications / axwin4_src / Server / include / draw_control.hpp
1 /*
2  */
3 #ifndef _DRAW_CONTROL_HPP_
4 #define _DRAW_CONTROL_HPP_
5
6 #include <vector>
7 #include <string>
8 #include <cstdint>
9 #include <CSurface.hpp>
10
11 namespace AxWin {
12
13 class CControl
14 {
15         unsigned int    m_edge_x;
16         unsigned int    m_edge_y;
17         unsigned int    m_fill_x;
18         unsigned int    m_fill_y;
19         unsigned int    m_inner_x;
20         unsigned int    m_inner_y;
21         ::std::vector<uint32_t> m_data;
22 public:
23         CControl(int EdgeX, int FillX, int InnerX, int EdgeY, int FillY, int InnerY, ::std::vector<uint32_t>&& data);
24         void Render(CSurface& dest, const CRect& rect) const;
25         
26         static const CControl*  GetByName(const ::std::string& name);
27         static const CControl*  GetByID(uint16_t id);
28         
29 private:
30         void renderLine(CSurface& dest, int y, ::std::vector<uint32_t>& scanline, const CRect& rect, const uint32_t* ctrl_line) const;
31 };
32
33
34 }
35
36 #endif
37

UCC git Repository :: git.ucc.asn.au