48template <
class Underlying>
61 WidgetsForm(
const std::string & formname, Underlying & under):
87 virtual void fill(
void) = 0;
90 virtual void dump(
void) = 0;
99 const std::string formname_;
101 Underlying & underlying_;
109 const std::string & place =
"")
const;
111 const std::string & place =
"")
const;
160 void * parms =
nullptr,
169 using TopicLink = std::pair<Topic,size_t>;
170 using Callbacks = std::vector<Callback>;
172 static bool comp(
const TopicLink & t1,
const TopicLink & t2)
noexcept
173 {
return(t1.first < t2.first); }
175 std::vector<TopicLink> topics_;
176 std::vector<Callbacks> subscribed_;
178 size_t findTopic(
Topic topic)
const;
196template <
class Underlying>
199 if (!populated_)
RUNTIMEEXCEP(
"WidgetsForm '" + formname_ +
200 "' not populated. " +
201 (place.empty() ?
"" : place));
204template <
class Underlying>
207 if (populated_)
RUNTIMEEXCEP(
"Cannot populate twice WidgetsForm '" +
209 (place.empty() ?
"" : place));
212template <
class Underlying>
#define RUNTIMEEXCEP(txt)
Raise a runtime exception with the given std::string TXT + additional info.
To insert widgets in a window in a depth-first fashion.
The main namespace of the library, that spans across all the zx modules.