Changeset 15 in flair-src for trunk/lib/FlairCore/src/PushButton.cpp
- Timestamp:
- 04/08/16 15:40:57 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairCore/src/PushButton.cpp
r2 r15 22 22 using std::string; 23 23 24 namespace flair 25 { 26 namespace gui 27 { 24 namespace flair { 25 namespace gui { 28 26 29 PushButton::PushButton(const LayoutPosition * position,string name): Widget(position->getLayout(),name,"PushButton")30 {31 SetVolatileXmlProp("row",position->Row());32 SetVolatileXmlProp("col",position->Col());33 27 PushButton::PushButton(const LayoutPosition *position, string name) 28 : Widget(position->getLayout(), name, "PushButton") { 29 SetVolatileXmlProp("row", position->Row()); 30 SetVolatileXmlProp("col", position->Col()); 31 delete position; 34 32 35 33 SendXml(); 36 34 37 clicked=false;35 clicked = false; 38 36 } 39 37 40 PushButton::~PushButton() 41 { 38 PushButton::~PushButton() {} 42 39 40 void PushButton::XmlEvent(void) { 41 int clic = 0; 42 GetPersistentXmlProp("value", clic); 43 44 if (clic == 1) 45 clicked = true; 43 46 } 44 47 45 void PushButton::XmlEvent(void) 46 { 47 int clic=0; 48 GetPersistentXmlProp("value",clic); 49 50 if(clic==1) clicked=true; 51 } 52 53 bool PushButton::Clicked(void) 54 { 55 if(clicked==true) 56 { 57 clicked=false; 58 return true; 59 } 60 else 61 { 62 return false; 63 } 48 bool PushButton::Clicked(void) { 49 if (clicked == true) { 50 clicked = false; 51 return true; 52 } else { 53 return false; 54 } 64 55 } 65 56
Note:
See TracChangeset
for help on using the changeset viewer.