Go to the
documentation of this file.
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #pragma once
00015
00016 #include "..\kernel\value.h"
00017
00018 class RCMenu;
00019 class HashTable;
00020
00021 #define MF_SUBMENU_START (MF_SEPARATOR+10)
00022 #define MF_SUBMENU_END (MF_SEPARATOR+11)
00023
00024 visible_class_debug_ok (MenuItem)
00025
00026 class MenuItem : public Value
00027 {
00028 public:
00029 Value *name, *caption, *flt_fn;
00030 Value **keyparms;
00031 RCMenu *menu;
00032 HMENU hmenu;
00033 UINT hmenu_index;
00034
00035 int keyparm_count;
00036 UINT flags;
00037
00038 MenuItem (RCMenu *m, Value* n, Value* c, Value **keyparms, int keyparm_count, UINT f=0);
00039 MenuItem () {menu= NULL; name=caption=NULL; keyparms=NULL; flags=keyparm_count=hmenu_index=0; hmenu = NULL;}
00040 ~MenuItem ();
00041
00042 ScripterExport void setup_params();
00043 void collect() { delete this; }
00044 void gc_trace();
00045 ScripterExport void sprin1(CharStream* s);
00046
00047 virtual Value* get_property(Value** arg_list, int count);
00048 virtual Value* set_property(Value** arg_list, int count);
00049 };
00050
00051
00052 class MSRightClickMenu : public RightClickMenu
00053 {
00054 public:
00055 RCMenu *menu;
00056 void Init(RightClickMenuManager* manager, HWND hWnd, IPoint2 m);
00057 void Selected(UINT id);
00058 Value* call_filt_fn(Value* fn);
00059 };
00060
00061
00062 visible_class_debug_ok (RCMenu)
00063
00064 class RCMenu : public Value
00065 {
00066 public:
00067 Value* name;
00068 HashTable* local_scope;
00069 MenuItem** items;
00070 int item_count;
00071 Value** locals;
00072 Value** local_inits;
00073 int local_count;
00074 HashTable* handlers;
00075 short flags;
00076 BOOL init_values;
00077 BOOL end_rcmenu_mode;
00078 MSRightClickMenu msmenu;
00079
00080 Value* result;
00081 MSPlugin* plugin;
00082
00083 RCMenu(short iflags);
00084 void init(Value* name, int local_count, Value** inits, HashTable* local_scope, MenuItem** iitems, int iitem_count, HashTable* handlers);
00085 ~RCMenu();
00086
00087 # define is_RCMenu(o) ((o)->tag == class_tag(RCMenu)) // LAM - defect 307069
00088 classof_methods (RCMenu, Value);
00089 void collect() { delete this; }
00090 void gc_trace();
00091 ScripterExport void sprin1(CharStream* s);
00092
00093 Value* get_event_handler(Value* name, Value* event);
00094 BOOL call_event_handler(Value* name, Value* event, Value** arg_list, int count);
00095
00096
00097 virtual Value* get_property(Value** arg_list, int count);
00098 virtual Value* set_property(Value** arg_list, int count);
00099
00100
00101 void dump_local_vars_and_externals(int indentLevel);
00102 };
00103
00104
00105
00106
00107
00108
00109
00110
00111 class MSSelectFilterCallback : public SelectFilterCallback
00112 {
00113
00114 public:
00115 MSSelectFilterCallback()
00116 {
00117 selectFilter_call_back_on = FALSE;
00118 in_selectfilter_callback = FALSE;
00119
00120 }
00121 MCHAR dname[128];
00122 MCHAR* GetName() {return dname;};
00123 BOOL IsFiltered(SClass_ID isid, Class_ID icid, INode *node);
00124 Value* selectFilters_fns;
00125 BOOL selectFilter_call_back_on;
00126 BOOL in_selectfilter_callback;
00127
00128 };
00129
00130 class MSDisplayFilterCallback : public DisplayFilterCallback
00131 {
00132
00133 public:
00134 MSDisplayFilterCallback()
00135 {
00136 displayFilter_call_back_on = FALSE;
00137 in_displayfilter_callback = FALSE;
00138
00139 }
00140 MCHAR dname[128];
00141 MCHAR* GetName() {return dname;};
00142
00143 BOOL IsVisible(SClass_ID isid, Class_ID icid, INode *node);
00144 Value* displayFilters_fns;
00145 BOOL displayFilter_call_back_on;
00146 BOOL in_displayfilter_callback;
00147 };
00148
00149
00150