00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
#ifndef LIBGNOMEUIMM_UI_ITEMS_STOCK_H
00022
#define LIBGNOMEUIMM_UI_ITEMS_STOCK_H
00023
00024
#include <libgnomeuimm/ui-items-derived.h>
00025
00026
namespace Gnome
00027 {
00028
00029
namespace UI
00030 {
00031
00032
namespace Items
00033 {
00034
00035
00036 class ConfigureItem:
public Item
00037 {
00038
public:
00039 ~ConfigureItem() {}
00040
protected:
00041 ConfigureItem() {}
00042
void init(
const Callback &cv, GnomeUIInfoConfigurableTypes ct);
00043
void init(
const Callback &cv, GnomeUIInfoConfigurableTypes ct,
const Glib::ustring& strLabel,
const Glib::ustring& strHint);
00044
void init(
const CallbackWithWidget &cv, GnomeUIInfoConfigurableTypes ct);
00045
void init(
const CallbackWithWidget &cv, GnomeUIInfoConfigurableTypes ct,
const Glib::ustring& strLabel,
const Glib::ustring& strHint);
00046 };
00047
00048 }
00049
00050
00051
00052
00053
00054
00055
00056 namespace MenuItems
00057 {
00058
00059
00060 #define STOCK_MENU_ITEM(X, Y) \
00061
struct X : public Items::ConfigureItem \
00062
{ \
00063
X(const Callback& cb) \
00064
{ \
00065
init(cb, Y); \
00066
} \
00067
X(const CallbackWithWidget& cb = CallbackWithWidget()) \
00068
{ \
00069
init(cb, Y); \
00070
} \
00071
~X() {} \
00072
}
00073
00074
00075 #define STOCK_MENU_ITEM_EXTRA(X, Y) \
00076
struct X : public Items::ConfigureItem \
00077
{ \
00078
X(const Glib::ustring& strLabel, const Glib::ustring& strHint, const Callback& cb) \
00079
{ \
00080
init(cb, Y, strLabel, strHint); \
00081
} \
00082
X(const Glib::ustring& strLabel, const Glib::ustring& strHint, const CallbackWithWidget& cb = CallbackWithWidget()) \
00083
{ \
00084
init(cb, Y, strLabel, strHint); \
00085
} \
00086
~X() {} \
00087
}
00088
00089
00090
STOCK_MENU_ITEM_EXTRA(New,GNOME_APP_CONFIGURABLE_ITEM_NEW);
00091
00092
STOCK_MENU_ITEM(Open,GNOME_APP_CONFIGURABLE_ITEM_OPEN);
00093
STOCK_MENU_ITEM(Save,GNOME_APP_CONFIGURABLE_ITEM_SAVE);
00094
STOCK_MENU_ITEM(SaveAs,GNOME_APP_CONFIGURABLE_ITEM_SAVE_AS);
00095
STOCK_MENU_ITEM(Revert,GNOME_APP_CONFIGURABLE_ITEM_REVERT);
00096
STOCK_MENU_ITEM(Print,GNOME_APP_CONFIGURABLE_ITEM_PRINT);
00097
STOCK_MENU_ITEM(PrintSetup,GNOME_APP_CONFIGURABLE_ITEM_PRINT_SETUP);
00098
STOCK_MENU_ITEM(Close,GNOME_APP_CONFIGURABLE_ITEM_CLOSE);
00099
STOCK_MENU_ITEM(Exit,GNOME_APP_CONFIGURABLE_ITEM_EXIT);
00100
00101
00102
STOCK_MENU_ITEM(Cut,GNOME_APP_CONFIGURABLE_ITEM_CUT);
00103
STOCK_MENU_ITEM(Copy,GNOME_APP_CONFIGURABLE_ITEM_COPY);
00104
STOCK_MENU_ITEM(Paste,GNOME_APP_CONFIGURABLE_ITEM_PASTE);
00105
STOCK_MENU_ITEM(SelectAll,GNOME_APP_CONFIGURABLE_ITEM_SELECT_ALL);
00106
STOCK_MENU_ITEM(Clear,GNOME_APP_CONFIGURABLE_ITEM_CLEAR);
00107
STOCK_MENU_ITEM(Undo,GNOME_APP_CONFIGURABLE_ITEM_UNDO);
00108
STOCK_MENU_ITEM(Redo,GNOME_APP_CONFIGURABLE_ITEM_REDO);
00109
STOCK_MENU_ITEM(Find,GNOME_APP_CONFIGURABLE_ITEM_FIND);
00110
STOCK_MENU_ITEM(FindAgain,GNOME_APP_CONFIGURABLE_ITEM_FIND_AGAIN);
00111
STOCK_MENU_ITEM(Replace,GNOME_APP_CONFIGURABLE_ITEM_REPLACE);
00112
STOCK_MENU_ITEM(Properties,GNOME_APP_CONFIGURABLE_ITEM_PROPERTIES);
00113
00114
00115
STOCK_MENU_ITEM(Preferences,GNOME_APP_CONFIGURABLE_ITEM_PREFERENCES);
00116
00117
00118
STOCK_MENU_ITEM(NewWindow,GNOME_APP_CONFIGURABLE_ITEM_NEW_WINDOW);
00119
STOCK_MENU_ITEM(CloseWindow,GNOME_APP_CONFIGURABLE_ITEM_CLOSE_WINDOW);
00120
00121
00122
STOCK_MENU_ITEM(About,GNOME_APP_CONFIGURABLE_ITEM_ABOUT);
00123
00124
00125
STOCK_MENU_ITEM(NewGame,GNOME_APP_CONFIGURABLE_ITEM_NEW_GAME);
00126
STOCK_MENU_ITEM(PauseGame,GNOME_APP_CONFIGURABLE_ITEM_PAUSE_GAME);
00127
STOCK_MENU_ITEM(RestartGame,GNOME_APP_CONFIGURABLE_ITEM_RESTART_GAME);
00128
STOCK_MENU_ITEM(UndoMove,GNOME_APP_CONFIGURABLE_ITEM_UNDO_MOVE);
00129
STOCK_MENU_ITEM(RedoMove,GNOME_APP_CONFIGURABLE_ITEM_REDO_MOVE);
00130
STOCK_MENU_ITEM(Hint,GNOME_APP_CONFIGURABLE_ITEM_HINT);
00131
STOCK_MENU_ITEM(Scores,GNOME_APP_CONFIGURABLE_ITEM_SCORES);
00132
STOCK_MENU_ITEM(EndGame,GNOME_APP_CONFIGURABLE_ITEM_END_GAME);
00133
#undef STOCK_MENU_ITEM
00134
00135 }
00136
00137
00138 namespace Menus
00139 {
00140
00141
00142
00143
00144
00145 struct New :
public Items::Menu
00146 {
00147
New(
const Items::Array<Info>& tree);
00148 ~New() {}
00149 };
00150
00151
00152
00153 #define STOCK_MENU(X,Y) \
00154
struct X : public Items::Menu \
00155
{ \
00156
X(const Items::Array<Info>& tree = Items::Array<Info>()) \
00157
: Items::Menu(Y,tree) \
00158
{} \
00159
~X() \
00160
{} \
00161
}
00162
00163
STOCK_MENU(File,
"_File");
00164
STOCK_MENU(Files,
"Fi_les");
00165
STOCK_MENU(Edit,
"_Edit");
00166
STOCK_MENU(View,
"_View");
00167
STOCK_MENU(Help,
"_Help");
00168
STOCK_MENU(Game,
"_Game");
00169
STOCK_MENU(Settings,
"_Settings");
00170
STOCK_MENU(Windows,
"_Windows");
00171
#undef STOCK_MENU
00172
00173 }
00174
00175
00176 }
00177 }
00178
00179
#endif //LIBGNOMEUIMM_UI_ITEMS_STOCK_H