Geant4 Cross Reference |
1 // Copyright (C) 2010, Guy Barrand. All rights 1 // Copyright (C) 2010, Guy Barrand. All rights reserved. 2 // See the file tools.license for terms. 2 // See the file tools.license for terms. 3 3 4 #ifndef tools_sg_win_action 4 #ifndef tools_sg_win_action 5 #define tools_sg_win_action 5 #define tools_sg_win_action 6 6 7 #include "action" 7 #include "action" 8 8 9 namespace tools { 9 namespace tools { 10 namespace sg { 10 namespace sg { 11 11 12 class win_action : public action { 12 class win_action : public action { 13 TOOLS_ACTION(win_action,tools::sg::win_actio 13 TOOLS_ACTION(win_action,tools::sg::win_action,action) 14 public: 14 public: 15 win_action(std::ostream& a_out,unsigned int 15 win_action(std::ostream& a_out,unsigned int a_ww,unsigned int a_wh) 16 :parent(a_out) 16 :parent(a_out) 17 ,m_ww(a_ww) //WARNING : we assume that we re 17 ,m_ww(a_ww) //WARNING : we assume that we receive a not zero value. 18 ,m_wh(a_wh) //WARNING : we assume that we re 18 ,m_wh(a_wh) //WARNING : we assume that we receive a not zero value. 19 {} 19 {} 20 virtual ~win_action(){} 20 virtual ~win_action(){} 21 protected: 21 protected: 22 win_action(const win_action& a_from) 22 win_action(const win_action& a_from) 23 :parent(a_from) 23 :parent(a_from) 24 ,m_ww(a_from.m_ww) 24 ,m_ww(a_from.m_ww) 25 ,m_wh(a_from.m_wh) 25 ,m_wh(a_from.m_wh) 26 {} 26 {} 27 win_action& operator=(const win_action& a_fr 27 win_action& operator=(const win_action& a_from){ 28 parent::operator=(a_from); 28 parent::operator=(a_from); 29 m_ww = a_from.m_ww; 29 m_ww = a_from.m_ww; 30 m_wh = a_from.m_wh; 30 m_wh = a_from.m_wh; 31 return *this; 31 return *this; 32 } 32 } 33 public: 33 public: 34 unsigned int ww() const {return m_ww;} 34 unsigned int ww() const {return m_ww;} 35 unsigned int wh() const {return m_wh;} 35 unsigned int wh() const {return m_wh;} 36 protected: 36 protected: 37 unsigned int m_ww; //window width 37 unsigned int m_ww; //window width 38 unsigned int m_wh; //window height 38 unsigned int m_wh; //window height 39 }; 39 }; 40 40 41 }} 41 }} 42 42 43 #endif 43 #endif