123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
- #ifndef __PATHPICKER_H
- #define __PATHPICKER_H
- #include <api/wnd/wndclass/guiobjwnd.h>
- #include <api/script/objects/c_script/h_guiobject.h>
- #include <api/script/objects/c_script/h_button.h>
- #define PATHPICKER_PARENT GuiObjectWnd
- class PPClicksCallback;
- extern int __id;
- /**
- Class
- @short
- @author Nullsoft
- @ver 1.0
- @see
- */
- class PathPicker : public PATHPICKER_PARENT {
-
- public:
-
- /**
- Method
-
- @see
- @ret
- @param
- */
- PathPicker();
-
- virtual ~PathPicker();
-
- /**
- Method
-
- @see
- @ret
- @param
- */
- virtual int onInit();
-
- /**
- Method
-
- @see
- @ret
- @param
- */
- void clickCallback();
-
- #ifdef WASABI_COMPILE_CONFIG
- /**
- Method
-
- @see
- @ret
- @param
- */
- virtual int onReloadConfig();
- #endif
-
- /**
- Method
-
- @see
- @ret
- @param
- */
- virtual void abstract_onNewContent();
- void setPath(const wchar_t *newpath);
- const wchar_t *getPath() { return curpath; }
-
- /**
- Method
-
- @see
- @ret
- @param
- */
- virtual void onPathChanged(const wchar_t *newpath);
-
-
- /**
- Method
-
- @see
- @ret
- @param
- */
- virtual void setDefault();
- private:
-
- /**
- Method
-
- @see
- @ret
- @param
- */
- void updatePathInControl();
-
- /**
- Method
-
- @see
- @ret
- @param
- */
- #ifdef WASABI_COMPILE_CONFIG
- void updatePathFromConfig();
- #endif
- /**
- Method
-
- @see
- @ret
- @param
- */
- void trapControls();
- PPClicksCallback *clicks_button;
- StringW curpath;
- int disable_cfg_event;
- };
- /**
- Class
- @short
- @author Nullsoft
- @ver 1.0
- @see
- */
- class PPClicksCallback : public H_GuiObject {
- public:
-
- /**
- Method
-
- @see
- @ret
- @param
- */
- PPClicksCallback(ScriptObject *trap, PathPicker *_callback) :
-
- /**
- Method
-
- @see
- @ret
- @param
- */
- callback(_callback), H_GuiObject(trap) {
- }
-
- /**
- Method
-
- @see
- @ret
- @param
- */
- virtual void hook_onLeftButtonDown(int x, int y) {
- callback->clickCallback();
- }
- private:
- PathPicker *callback;
- };
- #endif
|