27 HasUnsavedChanges::HasUnsavedChanges(
string&& title)
28 : m_title(move(title))
38 return m_children.begin();
43 return m_children.begin();
48 return m_children.end();
53 return m_children.end();
61 for (
auto child : m_children) {
78 for (
auto child : m_children) {
79 if (!child->IsClean())
88 for (
auto child : m_children) {
111 m_children.push_back(move(v));
116 m_children = move(c);
virtual bool InternalIsClean() const =0
The result should be true only if THIS widget is in clean state.
virtual void InternalForceClose()=0
Implementation should only close THIS widget, not its children.
bool Save()
Try to save this widget's (and its children's) changes.
ChildrenType::iterator end()
Get iterator to one position after last child.
ChildrenType::iterator begin()
Get iterator to first child.
virtual bool IsOpened() const =0
void ForceClose()
Force this object and its children to go back to unopened state so it can be safely deleted...
const std::string & GetTitle()
Get title of this object.
Interface for HasUnsavedChanges.
void AddChild(ChildrenType::value_type &&v)
Add child.
void SetChildren(ChildrenType &&c)
Set children.
bool SaveAndClose()
Try to save this object (and its children) and, if successful, close them all.
virtual ~HasUnsavedChanges()
Virtual destructor.
Namespace for generic graphical shell for simulators.
virtual void InternalPreForceClose()
Additional things to do before closing children of this widget.
virtual bool InternalSave()=0
Implementation should only save THIS widget.