cwidget
0.5.17
|
Routines to construct simple dialog boxes. More...
Functions | |
widget_ref | ok (const widgets::widget_ref &widget, util::slot0arg okslot, const std::wstring &label, const style &st) |
Create a dialog box with a single button. More... | |
widget_ref | ok (fragment *msg, slot0arg okslot, const std::wstring &label, const style &st, bool scrollbar) |
widget_ref | ok (fragment *msg, slot0arg okslot, const style &st, bool scrollbar) |
widget_ref | ok (fragment *msg, slot0arg okslot, bool scrollbar) |
widget_ref | ok (const std::wstring &msg, slot0arg okslot, const style &st) |
widget_ref | ok (const std::wstring &msg, slot0arg okslot) |
widget_ref | yesno (const widgets::widget_ref &widget, util::slot0arg yesslot, const std::wstring &yeslabel, util::slot0arg noslot, const std::wstring &nolabel, const style &st, bool deflt=true) |
Create a dialog box with two buttons, labelled "yes" and "no". More... | |
widget_ref | yesno (const std::wstring &msg, slot0arg yesslot, const std::wstring &yeslabel, slot0arg noslot, const std::wstring &nolabel, const style &st, bool deflt) |
widget_ref | yesno (const std::wstring &msg, slot0arg yesslot, slot0arg noslot, const style &st, bool deflt) |
widget_ref | yesno (const std::wstring &msg, slot0arg yesslot, slot0arg noslot, bool deflt) |
widget_ref | yesno (fragment *msg, slot0arg yesslot, slot0arg noslot, bool scrollbar, bool deflt) |
widget_ref | yesno (fragment *msg, slot0arg yesslot, slot0arg noslot, const style &st, bool scrollbar, bool deflt) |
widget_ref | yesno (fragment *msg, slot0arg yesslot, const std::wstring &yeslabel, slot0arg noslot, const std::wstring &nolabel, const style &st, bool scrollbar, bool deflt) |
widget_ref | fileview (const std::string &fn, slot0arg okslot, slotarg< sigc::slot1< void, pager &> > search_slot, slotarg< sigc::slot1< void, pager &> > repeat_search_slot, slotarg< sigc::slot1< void, pager &> > repeat_search_back_slot, const style &st, const char *encoding) |
widget_ref | fileview (const std::string &fn, slot0arg okslot, slotarg< sigc::slot1< void, pager &> > search_slot, slotarg< sigc::slot1< void, pager &> > repeat_search_slot, slotarg< sigc::slot1< void, pager &> > repeat_search_back_slot, const char *encoding) |
widget_ref | string (const widget_ref &msg, std::wstring deflt, slotarg< sigc::slot1< void, std::wstring > > slot, slotarg< sigc::slot0< void > > cancel_slot, slotarg< sigc::slot1< void, std::wstring > > changed_slot, editline::history_list *history, const style &st) |
widget_ref | string (fragment *msg, const std::wstring &deflt, slotarg< sigc::slot1< void, std::wstring > > slot, slotarg< sigc::slot0< void > > cancel_slot, slotarg< sigc::slot1< void, std::wstring > > changed_slot, editline::history_list *history, const style &st) |
widget_ref | string (const std::wstring &msg, const std::wstring &deflt, slotarg< sigc::slot1< void, std::wstring > > slot, slotarg< sigc::slot0< void > > cancel_slot, slotarg< sigc::slot1< void, std::wstring > > changed_slot, editline::history_list *history, const style &st) |
widget_ref | string (const std::wstring &msg, const std::wstring &deflt, slotarg< sigc::slot1< void, std::wstring > > slot, slotarg< sigc::slot0< void > > cancel_slot, slotarg< sigc::slot1< void, std::wstring > > changed_slot, editline::history_list *history) |
widgets::widget_ref | ok (const std::wstring &msg, util::slot0arg okslot, const std::wstring &label, const style &st) |
widgets::widget_ref | fileview (const std::string &fn, util::slot0arg okslot=NULL, util::slotarg< sigc::slot1< void, widgets::pager &> > search_slot=NULL, util::slotarg< sigc::slot1< void, widgets::pager &> > repeat_search_slot=NULL, util::slotarg< sigc::slot1< void, widgets::pager &> > repeat_search_back_slot=NULL, const char *encoding=NULL) |
widgets::widget_ref | fileview (const std::string &fn, util::slot0arg okslot, util::slotarg< sigc::slot1< void, widgets::pager &> > search_slot, util::slotarg< sigc::slot1< void, widgets::pager &> > repeat_search_slot, util::slotarg< sigc::slot1< void, widgets::pager &> > repeat_search_back_slot, const style &st, const char *encoding=NULL) |
Routines to construct simple dialog boxes.
widgets::widget_ref cwidget::dialogs::ok | ( | const widgets::widget_ref & | widget, |
util::slot0arg | okslot, | ||
const std::wstring & | label, | ||
const style & | st | ||
) |
Create a dialog box with a single button.
widget | the widget to place above the button. |
okslot | the slot to be triggered when the button is pressed. |
label | the label of the button |
attr | the attributes to use for the background of the dialog box, defaults to reverse-video of DefaultWidgetBackground. |
widgets::widget_ref cwidget::dialogs::yesno | ( | const widgets::widget_ref & | widget, |
util::slot0arg | yesslot, | ||
const std::wstring & | yeslabel, | ||
util::slot0arg | noslot, | ||
const std::wstring & | nolabel, | ||
const style & | st, | ||
bool | deflt = true |
||
) |
Create a dialog box with two buttons, labelled "yes" and "no".
widget | the widget to place above the buttons |
yesslot | the callback to be triggered when "yes" is selected |
yeslabel | the label of the "yes" button |
noslot | the callback to be triggered when "no" is selected |
yeslabel | the label of the "no" button |
attr | the attribute to use as the background of widgets created by this routine |
deflt | if true, the "yes" button will be selected by default; otherwise, the "no" button will be selected by default. |
References cwidget::widgets::text_layout::create(), cwidget::config::global_bindings, cwidget::widgets::text_layout::scroll(), cwidget::style_attrs_flip(), cwidget::util::ref_ptr< T >::unsafe_get_ref(), and yesno().
Referenced by yesno().