objcmd.h
Go to the documentation of this file.00001 #ifndef objcmd_h
00002 #define objcmd_h
00003
00004 #include <OS/string.h>
00005 #include <InterViews/observe.h>
00006 #if HAVE_IV
00007 #include <InterViews/action.h>
00008 #include "rubband.h"
00009 #endif
00010
00011 struct Object;
00012
00013
00014
00015 class HocCommand : public Observer{
00016 public:
00017 HocCommand(const char*);
00018 HocCommand(const char*, Object*);
00019 HocCommand(Object* paction);
00020 virtual ~HocCommand();
00021 int execute(boolean notify = true);
00022 int execute(const char*, boolean notify = true);
00023 int exec_strret(char* buf, int size, boolean notify = true);
00024 const char* name();
00025 virtual void update(Observable*);
00026 virtual void audit();
00027 virtual void help();
00028 double func_call(int narg);
00029 Object* object() { return obj_; }
00030 Object* pyobject() { return po_; }
00031 private:
00032 void init(const char*, Object*);
00033 private:
00034 Object* obj_;
00035 CopyString* s_;
00036 Object* po_;
00037 };
00038
00039 #if HAVE_IV
00040 class HocCommandAction : public Action {
00041 public:
00042 HocCommandAction(HocCommand*);
00043 virtual ~HocCommandAction();
00044 virtual void execute();
00045 private:
00046 HocCommand* hc_;
00047 };
00048
00049 class HocCommandTool : public Rubberband {
00050 public:
00051 HocCommandTool(HocCommand*);
00052 virtual ~HocCommandTool();
00053 virtual boolean event(Event&);
00054 HocCommand* hc_;
00055 };
00056 #endif
00057
00058 #endif