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