Changeset 15 in flair-src for trunk/lib/FlairCore/src/Box.cpp
- Timestamp:
- Apr 8, 2016, 3:40:57 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairCore/src/Box.cpp
r2 r15 21 21 using std::string; 22 22 23 namespace flair 24 { 25 namespace gui 26 { 23 namespace flair { 24 namespace gui { 27 25 28 Box::Box(const LayoutPosition * position,string name,string type): Widget(position->getLayout(),name,type)29 {30 value_changed=true;31 SetVolatileXmlProp("row",position->Row());32 SetVolatileXmlProp("col",position->Col());33 26 Box::Box(const LayoutPosition *position, string name, string type) 27 : Widget(position->getLayout(), name, type) { 28 value_changed = true; 29 SetVolatileXmlProp("row", position->Row()); 30 SetVolatileXmlProp("col", position->Col()); 31 delete position; 34 32 } 35 33 36 Box::~Box() 37 { 38 core::Object::ObjectName(); 34 Box::~Box() { core::Object::ObjectName(); } 35 36 bool Box::ValueChanged(void) { 37 bool ret; 38 39 GetMutex(); 40 if (value_changed == true) { 41 value_changed = false; 42 ret = true; 43 } else { 44 ret = false; 45 } 46 ReleaseMutex(); 47 48 return ret; 39 49 } 40 50 41 bool Box::ValueChanged(void) 42 { 43 bool ret; 51 void Box::SetValueChanged(void) { value_changed = true; } 44 52 45 GetMutex(); 46 if(value_changed==true) 47 { 48 value_changed=false; 49 ret=true; 50 } 51 else 52 { 53 ret=false; 54 } 55 ReleaseMutex(); 53 void Box::GetMutex(void) const { ((Layout *)Parent())->mutex->GetMutex(); } 56 54 57 return ret; 58 } 59 60 void Box::SetValueChanged(void) 61 { 62 value_changed=true; 63 } 64 65 void Box::GetMutex(void) const 66 { 67 ((Layout*)Parent())->mutex->GetMutex(); 68 } 69 70 void Box::ReleaseMutex(void) const 71 { 72 ((Layout*)Parent())->mutex->ReleaseMutex(); 55 void Box::ReleaseMutex(void) const { 56 ((Layout *)Parent())->mutex->ReleaseMutex(); 73 57 } 74 58
Note:
See TracChangeset
for help on using the changeset viewer.