#include <sgframe.h>
Inheritance diagram for SGFrameGroup:
Public Member Functions | |
SGFrameGroup (SuperGallery *ParentGal, Document *ParentDoc=NULL, Library *ParentLib=NULL, BOOL IsForeground=TRUE) | |
SGFrameGroup constructor. Initialises the Group's parent pointers to point at its parent(s). Note that generally speaking, one of ParentDoc, ParentLib will be NULL, and the other will be non-NULL. | |
virtual BOOL | HandleEvent (SGEventType EventType, void *EventInfo, SGMiscInfo *MiscInfo) |
Handles a SuperGallery DisplayTree event. | |
BOOL | IsForeground () |
Private Member Functions | |
CC_DECLARE_DYNAMIC (SGFrameGroup) | |
Private Attributes | |
BOOL | Foreground |
Definition at line 182 of file sgframe.h.
|
SGFrameGroup constructor. Initialises the Group's parent pointers to point at its parent(s). Note that generally speaking, one of ParentDoc, ParentLib will be NULL, and the other will be non-NULL.
Definition at line 185 of file sgframe.cpp. 00187 : SGLayerGroup(ParentGal, ParentDoc, ParentLib, IsForeground) 00188 { 00189 Foreground = IsForeground; 00190 }
|
|
|
|
Handles a SuperGallery DisplayTree event.
Reimplemented from SGLayerGroup. Definition at line 217 of file sgframe.cpp. 00219 { 00220 // And handle the specific event 00221 switch (EventType) 00222 { 00223 case SGEVENT_REDRAW: 00224 { 00225 DocRect MyRect(FormatRect); // Rely on cached format info being correct 00226 00227 SGRedrawInfo *RedrawInfo = GetRedrawInfo(EventType, EventInfo); 00228 00229 if (IMustRedraw(RedrawInfo)) 00230 { 00231 StartRendering(RedrawInfo, MiscInfo); 00232 00233 DocColour Col(192L, 192L, 192L); //128, 128, 128); 00234 00235 RedrawInfo->Renderer->SetLineWidth(0); 00236 RedrawInfo->Renderer->SetLineColour(RedrawInfo->Transparent); 00237 RedrawInfo->Renderer->SetFillColour(Col); 00238 RedrawInfo->Renderer->DrawRect(&MyRect); 00239 00240 ReadGroupTitle(); // (Re)Cache the title text 00241 00242 // Line up above indented items below 00243 MyRect.lo.x += IndentWidth + MiscInfo->PixelSize; 00244 00245 // Render column titles above the 'locked' and 'invisible' columns 00246 DocRect VisibleBtn; 00247 DocRect LockedBtn; 00248 DocRect SnapBtn; 00249 SGDisplayFrame::CalculateButtonRects(MiscInfo, &MyRect, 00250 &VisibleBtn, &LockedBtn, &SnapBtn); 00251 00252 DrawBitmap(RedrawInfo->Renderer, &VisibleBtn, _R(IDB_FGAL_SOLID)); 00253 DrawBitmap(RedrawInfo->Renderer, &LockedBtn, _R(IDB_FGAL_OVERLAY)); 00254 00255 // And finally, render the title text 00256 MyRect.lo.x += SG_GapBeforeText; // Leave a small gap before text 00257 if (MyRect.lo.x < MyRect.hi.x) // If still room left, draw title 00258 { 00259 RedrawInfo->Renderer->SetFixedSystemTextColours(&RedrawInfo->Foreground, &Col); 00260 00261 String_256 NewTitleText; 00262 00263 UINT32 IDS = _R(IDS_FRAMEGAL_FRAMES); 00264 00265 NewTitleText.MakeMsg(IDS, (TCHAR *)TitleText); 00266 RedrawInfo->Renderer->DrawFixedSystemText(&NewTitleText, MyRect); 00267 } 00268 00269 StopRendering(RedrawInfo, MiscInfo); 00270 } 00271 00272 // Check if the cliprect overlaps any of our children - if not, then we 00273 // can return now, passing the event on quickly without bothering to give 00274 // it to our children. 00275 if (GetChild() == NULL || 00276 !ChildArea.IsIntersectedWith(RedrawInfo->Bounds)) 00277 { 00278 return(FALSE); 00279 } 00280 } 00281 break; 00282 00283 00284 case SGEVENT_MOUSECLICK: 00285 // Mouse clicks on this group type are ignored - but we claim them so that the 00286 // event is not passed on around the tree unnecessarily. 00287 { 00288 SGMouseInfo *MouseInfo = GetMouseInfo(EventType, EventInfo); 00289 if (FormatRect.ContainsCoord(MouseInfo->Position)) 00290 return(TRUE); 00291 } 00292 break; 00293 00294 00295 default: 00296 // For all other purposes (formatting etc), let the base class handle the event 00297 return(SGDisplayGroup::HandleEvent(EventType, EventInfo, MiscInfo)); 00298 break; 00299 } 00300 00301 // Pass the event on to my children, as appropriate, and return the result 00302 return(GiveEventToMyChildren(EventType, EventInfo, MiscInfo)); 00303 }
|
|
Reimplemented from SGLayerGroup. Definition at line 195 of file sgframe.h. 00195 { return Foreground; }
|
|
Reimplemented from SGLayerGroup. |