00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00028 #ifndef DIALOGS_H
00029 #define DIALOGS_H
00030
00031 #include <cwidget/widgets/editline.h>
00032
00033 #include <cwidget/generic/util/slotarg.h>
00034
00035 #include <string>
00036
00037 namespace cwidget
00038 {
00039 class fragment;
00040 class style;
00041
00042 namespace widgets
00043 {
00044 class pager;
00045 class widget;
00046 }
00047
00049 namespace dialogs
00050 {
00051
00052
00064 widgets::widget_ref ok(const widgets::widget_ref &widget,
00065 util::slot0arg okslot, const std::wstring &label,
00066 const style &st);
00067
00068 widgets::widget_ref ok(fragment *msg, util::slot0arg okslot=NULL, bool scrollbar=false);
00069 widgets::widget_ref ok(fragment *msg, util::slot0arg okslot, const style &st, bool scrollbar=false);
00070 widgets::widget_ref ok(fragment *msg, util::slot0arg okslot, const std::wstring &label,
00071 const style &st, bool scrollbar=false);
00072
00073 widgets::widget_ref ok(const std::wstring &msg, util::slot0arg okslot=NULL);
00074 widgets::widget_ref ok(const std::wstring &msg, util::slot0arg okslot,
00075 const style &st);
00076 widgets::widget_ref ok(const std::wstring &msg, util::slot0arg okslot, const std::wstring &label,
00077 const style &st);
00078
00097 widgets::widget_ref yesno(const widgets::widget_ref &widget,
00098 util::slot0arg yesslot,
00099 const std::wstring &yeslabel,
00100 util::slot0arg noslot,
00101 const std::wstring &nolabel,
00102 const style &st,
00103 bool deflt=true);
00104
00105 widgets::widget_ref yesno(fragment *msg,
00106 util::slot0arg yesslot,
00107 util::slot0arg noslot,
00108 bool scrollbar=false,
00109 bool deflt=true);
00110 widgets::widget_ref yesno(fragment *msg,
00111 util::slot0arg yesslot,
00112 util::slot0arg noslot,
00113 const style &st,
00114 bool scrollbar=false,
00115 bool deflt=true);
00116 widgets::widget_ref yesno(fragment *msg,
00117 util::slot0arg yesslot,
00118 const std::wstring &yeslabel,
00119 util::slot0arg noslot,
00120 const std::wstring &nolabel,
00121 const style &st,
00122 bool scrollbar=false,
00123 bool deflt=true);
00124
00125 widgets::widget_ref yesno(const std::wstring &msg,
00126 util::slot0arg yesslot,
00127 util::slot0arg noslot,
00128 bool deflt=true);
00129 widgets::widget_ref yesno(const std::wstring &msg,
00130 util::slot0arg yesslot,
00131 util::slot0arg noslot,
00132 const style &st,
00133 bool deflt=true);
00134 widgets::widget_ref yesno(const std::wstring &msg,
00135 util::slot0arg yesslot,
00136 const std::wstring &yeslabel,
00137 util::slot0arg noslot,
00138 const std::wstring &nolabel,
00139 const style &st,
00140 bool deflt=true);
00141
00142 widgets::widget_ref fileview(const std::string &fn,
00143 util::slot0arg okslot=NULL,
00144 util::slotarg<sigc::slot1<void, widgets::pager &> > search_slot=NULL,
00145 util::slotarg<sigc::slot1<void, widgets::pager &> > repeat_search_slot=NULL,
00146 util::slotarg<sigc::slot1<void, widgets::pager &> > repeat_search_back_slot=NULL,
00147 const char *encoding=NULL);
00148 widgets::widget_ref fileview(const std::string &fn,
00149 util::slot0arg okslot,
00150 util::slotarg<sigc::slot1<void, widgets::pager &> > search_slot,
00151 util::slotarg<sigc::slot1<void, widgets::pager &> > repeat_search_slot,
00152 util::slotarg<sigc::slot1<void, widgets::pager &> > repeat_search_back_slot,
00153 const style &st,
00154 const char *encoding=NULL);
00155
00156 widgets::widget_ref string(fragment *msg,
00157 const std::wstring &deflt,
00158 util::slotarg<sigc::slot1<void, std::wstring> > okslot,
00159 util::slotarg<sigc::slot0<void> > cancel_slot,
00160 util::slotarg<sigc::slot1<void, std::wstring> > changed_slot,
00161 widgets::editline::history_list *history,
00162 const style &st);
00163
00164 widgets::widget_ref string(const std::wstring &msg,
00165 const std::wstring &deflt,
00166 util::slotarg<sigc::slot1<void, std::wstring> > okslot,
00167 util::slotarg<sigc::slot0<void> > cancel_slot,
00168 util::slotarg<sigc::slot1<void, std::wstring> > changed_slot,
00169 widgets::editline::history_list *history,
00170 const style &st);
00171
00172 widgets::widget_ref string(const std::wstring &msg,
00173 const std::wstring &deflt,
00174 util::slotarg<sigc::slot1<void, std::wstring> > slot,
00175 util::slotarg<sigc::slot0<void> > cancel_slot,
00176 util::slotarg<sigc::slot1<void, std::wstring> > changed_slot,
00177 widgets::editline::history_list *history);
00178 }
00179 }
00180
00181 #endif