00001 #ifndef _GVIEW_PRIV_
00002 #define _GVIEW_PRIV_
00003
00004 #define PAINT_VIRTUAL_CHILDREN 1
00005
00006 extern bool In_SetWindowPos;
00007 extern GMouse &lgi_adjust_click(GMouse &Info, GViewI *Wnd, bool Debug = false);
00008
00009 class GViewIter : public GViewIterator
00010 {
00011 GView *v;
00012 List<GViewI>::I i;
00013
00014 public:
00015 GViewIter(GView *view);
00016 ~GViewIter() {}
00017 GViewI *First();
00018 GViewI *Last();
00019 GViewI *Next();
00020 GViewI *Prev();
00021 int Length();
00022 int IndexOf(GViewI *view);
00023 GViewI *operator [](int Idx);
00024 };
00025
00026 #if !WIN32NATIVE
00027 class GPulseThread : public GThread
00028 {
00029 GView *View;
00030 int Length;
00031
00032 public:
00033 bool Loop;
00034
00035 GPulseThread(GView *view, int len)
00036 {
00037 LgiAssert(view);
00038
00039 Loop = true;
00040 View = view;
00041 Length = len;
00042
00043 Run();
00044 }
00045
00046 ~GPulseThread()
00047 {
00048 LgiAssert(Loop == false);
00049 }
00050
00051 void Delete()
00052 {
00053 DeleteOnExit = true;
00054 Loop = false;
00055 }
00056
00057 int Main()
00058 {
00059 while (Loop)
00060 {
00061 LgiSleep(Length);
00062 if (Loop && View)
00063 {
00064 View->PostEvent(M_PULSE);
00065 }
00066 }
00067
00068 return 0;
00069 }
00070 };
00071 #endif
00072
00073 class GViewPrivate
00074 {
00075 public:
00076
00077 int CtrlId;
00078 GDragDropTarget *DropTarget;
00079
00080
00081 GViewI *ParentI;
00082 GView *Parent;
00083 GViewI *Notify;
00084
00085
00086 GdcPt2 MinimumSize;
00087
00088
00089 GAutoPtr<GViewFill> Foreground, Background;
00090
00091
00092 GFont *Font;
00093 bool FontOwn;
00094
00095
00096 #if WIN32NATIVE
00097
00098 static OsView hPrevCapture;
00099 int WndStyle;
00100 int WndExStyle;
00101 int WndDlgCode;
00102 const char *WndClass;
00103 UINT TimerId;
00104
00105 #else
00106
00107
00108 int CursorId;
00109 static bool CursorSet;
00110 static GView *LastCursor;
00111
00112 GPulseThread *Pulse;
00113 GView *Popup;
00114 bool TabStop;
00115
00116 #if defined __GTK_H__
00117 GView::MappingState MapState;
00118 #elif defined MAC
00119 static HIObjectClassRef BaseClass;
00120 #endif
00121
00122 #endif
00123
00124 GViewPrivate();
00125 ~GViewPrivate();
00126
00127 GView *GetParent()
00128 {
00129 if (Parent)
00130 return Parent;
00131
00132 if (ParentI)
00133 return ParentI->GetGView();
00134
00135 return 0;
00136 }
00137 };
00138
00139 #endif