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 };
00045
00046 }
00047
00048
00049
00050
00051
00052
00053
00054 namespace MenuItems
00055 {
00056
00057
00058 #define STOCK_MENU_ITEM(X, Y) \
00059
struct X : public Items::ConfigureItem \
00060
{ \
00061
X(const Callback& cb = Callback()) \
00062
{ \
00063
init(cb, Y); \
00064
} \
00065
~X() {} \
00066
}
00067
00068
00069 #define STOCK_MENU_ITEM_EXTRA(X, Y) \
00070
struct X : public Items::ConfigureItem \
00071
{ \
00072
X(const Glib::ustring& strLabel, const Glib::ustring& strHint, const Callback& cb = Callback()) \
00073
{ \
00074
init(cb, Y, strLabel, strHint); \
00075
} \
00076
~X() {} \
00077
}
00078
00079
00080
STOCK_MENU_ITEM_EXTRA(New,GNOME_APP_CONFIGURABLE_ITEM_NEW);
00081
00082
STOCK_MENU_ITEM(Open,GNOME_APP_CONFIGURABLE_ITEM_OPEN);
00083
STOCK_MENU_ITEM(Save,GNOME_APP_CONFIGURABLE_ITEM_SAVE);
00084
STOCK_MENU_ITEM(SaveAs,GNOME_APP_CONFIGURABLE_ITEM_SAVE_AS);
00085
STOCK_MENU_ITEM(Revert,GNOME_APP_CONFIGURABLE_ITEM_REVERT);
00086
STOCK_MENU_ITEM(Print,GNOME_APP_CONFIGURABLE_ITEM_PRINT);
00087
STOCK_MENU_ITEM(PrintSetup,GNOME_APP_CONFIGURABLE_ITEM_PRINT_SETUP);
00088
STOCK_MENU_ITEM(Close,GNOME_APP_CONFIGURABLE_ITEM_CLOSE);
00089
STOCK_MENU_ITEM(Exit,GNOME_APP_CONFIGURABLE_ITEM_EXIT);
00090
00091
00092
STOCK_MENU_ITEM(Cut,GNOME_APP_CONFIGURABLE_ITEM_CUT);
00093
STOCK_MENU_ITEM(Copy,GNOME_APP_CONFIGURABLE_ITEM_COPY);
00094
STOCK_MENU_ITEM(Paste,GNOME_APP_CONFIGURABLE_ITEM_PASTE);
00095
STOCK_MENU_ITEM(SelectAll,GNOME_APP_CONFIGURABLE_ITEM_SELECT_ALL);
00096
STOCK_MENU_ITEM(Clear,GNOME_APP_CONFIGURABLE_ITEM_CLEAR);
00097
STOCK_MENU_ITEM(Undo,GNOME_APP_CONFIGURABLE_ITEM_UNDO);
00098
STOCK_MENU_ITEM(Redo,GNOME_APP_CONFIGURABLE_ITEM_REDO);
00099
STOCK_MENU_ITEM(Find,GNOME_APP_CONFIGURABLE_ITEM_FIND);
00100
STOCK_MENU_ITEM(FindAgain,GNOME_APP_CONFIGURABLE_ITEM_FIND_AGAIN);
00101
STOCK_MENU_ITEM(Replace,GNOME_APP_CONFIGURABLE_ITEM_REPLACE);
00102
STOCK_MENU_ITEM(Properties,GNOME_APP_CONFIGURABLE_ITEM_PROPERTIES);
00103
00104
00105
STOCK_MENU_ITEM(Preferences,GNOME_APP_CONFIGURABLE_ITEM_PREFERENCES);
00106
00107
00108
STOCK_MENU_ITEM(NewWindow,GNOME_APP_CONFIGURABLE_ITEM_NEW_WINDOW);
00109
STOCK_MENU_ITEM(CloseWindow,GNOME_APP_CONFIGURABLE_ITEM_CLOSE_WINDOW);
00110
00111
00112
STOCK_MENU_ITEM(About,GNOME_APP_CONFIGURABLE_ITEM_ABOUT);
00113
00114
00115
STOCK_MENU_ITEM(NewGame,GNOME_APP_CONFIGURABLE_ITEM_NEW_GAME);
00116
STOCK_MENU_ITEM(PauseGame,GNOME_APP_CONFIGURABLE_ITEM_PAUSE_GAME);
00117
STOCK_MENU_ITEM(RestartGame,GNOME_APP_CONFIGURABLE_ITEM_RESTART_GAME);
00118
STOCK_MENU_ITEM(UndoMove,GNOME_APP_CONFIGURABLE_ITEM_UNDO_MOVE);
00119
STOCK_MENU_ITEM(RedoMove,GNOME_APP_CONFIGURABLE_ITEM_REDO_MOVE);
00120
STOCK_MENU_ITEM(Hint,GNOME_APP_CONFIGURABLE_ITEM_HINT);
00121
STOCK_MENU_ITEM(Scores,GNOME_APP_CONFIGURABLE_ITEM_SCORES);
00122
STOCK_MENU_ITEM(EndGame,GNOME_APP_CONFIGURABLE_ITEM_END_GAME);
00123
#undef STOCK_MENU_ITEM
00124
00125 }
00126
00127
00128 namespace Menus
00129 {
00130
00131
00132
00133
00134
00135 struct New :
public Items::Menu
00136 {
00137
New(
const Items::Array<Info>& tree);
00138 ~New() {}
00139 };
00140
00141
00142
00143 #define STOCK_MENU(X,Y) \
00144
struct X : public Items::Menu \
00145
{ \
00146
X(const Items::Array<Info>& tree = Items::Array<Info>()) \
00147
: Items::Menu(Y,tree) \
00148
{} \
00149
~X() \
00150
{} \
00151
}
00152
00153
STOCK_MENU(File,
"_File");
00154
STOCK_MENU(Files,
"Fi_les");
00155
STOCK_MENU(Edit,
"_Edit");
00156
STOCK_MENU(View,
"_View");
00157
STOCK_MENU(Help,
"_Help");
00158
STOCK_MENU(Game,
"_Game");
00159
STOCK_MENU(Settings,
"_Settings");
00160
STOCK_MENU(Windows,
"_Windows");
00161
#undef STOCK_MENU
00162
00163 }
00164
00165
00166 }
00167 }
00168
00169
#endif //LIBGNOMEUIMM_UI_ITEMS_STOCK_H