Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

GTabView.h

Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 #ifndef _GTABVIEW_H_
00006 #define _GTABVIEW_H_
00007 
00008 // Tab control
00009 class GTabPage;
00010 typedef List<GTabPage> TabPageList;
00011 
00013 class LgiClass GTabView :
00014     public GView,
00015     public ResObject
00016 {
00017     friend class GTabPage;
00018     class GTabViewPrivate *d;
00019     int TabY();
00020 
00021 protected:
00022     List<GTabPage> Tabs;
00023 
00024 public:
00025     GTabView(int id, int x, int y, int cx, int cy, char *name, int Init = 0);
00026     ~GTabView();
00027 
00028     // Methods
00029     int Value();
00030     void Value(int i);
00031 
00032     // List modification
00033     bool Append(GTabPage *Page, int Where = -1);
00034     GTabPage *Append(char *name, int Where = -1);
00035     bool Delete(GTabPage *Page);
00036 
00037     // List access
00038     GTabPage *TabAt(int i) { return Tabs.ItemAt(i); }
00039     GTabPage *GetCurrent();
00040     int GetTabs() { return Tabs.GetItems(); }
00041     
00042     // Impl
00043     bool Attach(GView *parent);
00044     int OnEvent(GMessage *Msg);
00045     GView *FindControl(int Id);
00046     int OnNotify(GView *Ctrl, int Flags);
00047     void OnChildrenChanged(GView *Wnd, bool Attaching);
00048     GRect &GetTabClient();
00049 
00050     #if defined WIN32
00051     GView *FindControl(HWND hCtrl);
00052     #endif
00053 
00054     void OnPosChange();
00055     void OnPaint(GSurface *pDC);
00056     void OnMouseClick(GMouse &m);
00057     bool OnKey(GKey &k);
00058     void OnFocus(bool f);
00059 };
00060 
00061 class LgiClass GTabPage :
00062     public GView,
00063     public GLgiRes,
00064     public ResObject
00065 {
00066     friend class GTabView;
00067 
00068     // Vars
00069     GTabView *TabCtrl;
00070     GRect TabPos;
00071 
00072     // Methods
00073     void PaintTab(GSurface *pDC, bool Selected);
00074     bool Attach(GView *parent);
00075 
00076 public:
00077     GTabPage(char *name);
00078     ~GTabPage();
00079 
00080     char *Name();
00081     bool Name(char *n);
00082     GTabView *GetTabControl() { return TabCtrl; }
00083 
00084     int OnEvent(GMessage *Msg);
00085     void OnPaint(GSurface *pDC);
00086     bool OnKey(GKey &k);
00087     void OnFocus(bool b);
00088 
00089     void Append(GView *Wnd);
00090     bool Remove(GView *Wnd);
00091     bool AppendDialogFromResource(int Resource);
00092 };
00093 
00094 #endif

Generated on Wed Oct 26 14:46:50 2005 for Lgi by  doxygen 1.4.1