00001
00008 #ifndef __LGI_WIDGETS_H
00009 #define __LGI_WIDGETS_H
00010
00012 #ifdef IDM_STATIC
00013 #undef IDM_STATIC
00014 #endif
00015 #define IDM_STATIC -1
00016
00018 class GDialog;
00019 #if defined WIN32
00020 class GDlgFunc;
00021 #endif
00022 class GListItem;
00023 class GTreeItem;
00024
00025 class GButton;
00026 class GEdit;
00027 class GCheckBox;
00028 class GText;
00029 class GRadioGroup;
00030 class GRadioButton;
00031 class GTabView;
00032 class GTabPage;
00033 class GSlider;
00034 class GCombo;
00035 class GBitmap;
00036 class GList;
00037 class GTree;
00038
00040
00042 class LgiClass GLgiRes
00043 {
00044 public:
00046 bool LoadFromResource
00047 (
00049 int Resource,
00051 List<GViewI> &Children,
00053 GRect *Pos = 0,
00055 char *Name = 0
00056 );
00057 };
00058
00206 class LgiClass GDialog :
00207 public GWindow,
00208 public GLgiRes,
00209 public ResObject
00210 {
00211 friend class GControl;
00212
00213 private:
00214 bool IsModal;
00215 int ModalStatus;
00216
00217 #if defined WIN32
00218
00219 GMem *Mem;
00220
00221 #elif defined BEOS
00222
00223 sem_id ModalSem;
00224 int ModalRet;
00225
00226 #endif
00227
00228 protected:
00230 bool LoadFromResource
00231 (
00233 int Resource
00234 );
00235
00236 public:
00238 GDialog();
00239
00241 ~GDialog();
00242
00246 virtual int DoModal
00247 (
00249 OsView ParentHnd = 0
00250 );
00251
00256 virtual int DoModeless();
00257
00259 virtual void EndModal(int Code = 0);
00260
00262 virtual void EndModeless(int Code = 0);
00263
00264 int OnEvent(GMessage *Msg);
00265 bool OnRequestClose(bool OsClose);
00266 void OnPosChange();
00267 };
00268
00270 class LgiClass GControl :
00271 public GView
00272 {
00273 friend class GDialog;
00274
00275 protected:
00276 #if defined BEOS
00277 bigtime_t Sys_LastClick;
00278 void MouseClickEvent(bool Down);
00279 #elif defined WIN32
00280 GWin32Class *SubClass;
00281 #endif
00282
00283 GdcPt2 SizeOfStr(char *Str);
00284
00285 public:
00286 #if defined WIN32
00287
00288 GControl(char *SubClassName = 0);
00289
00290 #else
00291
00292 GControl(OsView view = 0);
00293
00294 #endif
00295
00296 ~GControl();
00297
00298 int OnEvent(GMessage *Msg);
00299
00300 #if defined BEOS // FIXME: Should be in GView?
00301 bool Attach(GViewI *parent);
00302 #endif
00303 };
00304
00306
00307 #if defined WIN32
00308 #define LGI_BUTTON "LGI_Button"
00309 #define LGI_EDITBOX "LGI_Editbox"
00310 #define LGI_CHECKBOX "LGI_CheckBox"
00311 #define LGI_TEXT "LGI_Text"
00312 #define LGI_RADIOGROUP "LGI_RadioGroup"
00313 #define LGI_TABCONTROL "LGI_TabControl"
00314 #define LGI_TABPAGE "LGI_TabPage"
00315 #define LGI_SLIDER "LGI_Slider"
00316 #define LGI_COMBO "LGI_Combo"
00317 #define LGI_BITMAP "LGI_Bitmap"
00318 #define LGI_LIST "LGI_ListView"
00319 #define LGI_TREE "LGI_TreeView"
00320 #define LGI_PROGRESS "LGI_Progress"
00321 #define LGI_SCROLLBAR "LGI_ScrollBar"
00322 #endif
00323
00324
00325
00326
00327
00328
00329
00330
00331
00332
00333
00334
00335
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350
00351 #endif
00352