This source file includes following definitions.
- MouseUp
- MouseDown
- OnMouseDown
- OnMouseUp
- KeyDown
- OnBeforeKeyDown
- PrepareCmdLine
- Close
- OnKeyDown
- Draw_OpenTransaction
- Draw_CloseTransaction
- DrawBackground
- DrawPanel
- Path
- Draw
- SetHeader
- HeaderHeight
- DrawStringCheck
- DrawHeader
- BottomHeight
- BottomRect
- ClientRect
- DrawBottom
- ActionCopyFrom_Run
- PrepareTopMenuItem
- PrepareKeysMenu
- SetupUpdated
- MessageReceived
- Run_TopMenu
- FrameResized
- NavPressInHeader
- Enable
- Enabled
- OnEnable
- MakeFocus
- OnFocus
- OnClose
- SayFriend_About_CursorChanged
- Nodes_GetAll
- Nodes_SetSelectingByName
- StoreVars
- BF_GUI_Func_PanelsEnable
- BF_GUI_Func_PanelsShow
- BF_GUI_Func_RedrawDialogs
- BF_GUI_Func_EnableDialog
- BF_GUI_Func_CloseDialog
- BF_GUI_Func_AddChildToMainView
- BF_GUI_MakeFocusTo
1 #include <Autolock.h>
2
3 #include "BF_Msg.h"
4 #include "BF_GUI_Setup.h"
5 #include "BF_GUI_Func.h"
6 #include "BF_GUI_KeysMenu.h"
7 #include "BF_GUI_CmdLine.h"
8 #include "BF_GUI_WinMain.h"
9 #include "BF_GUI_OperRoster.h"
10
11 BF_GUI_Panel::BF_GUI_Panel(
12 const BRect& o_Rect,
13 const char* pc_FirstName,
14 bool b_WinPos_OnLeft)
15 :BView(o_Rect,"_panel",B_FOLLOW_NONE,B_WILL_DRAW|B_NAVIGABLE|B_FRAME_EVENTS)
16 {
17 bWinPos_OnLeft = b_WinPos_OnLeft;
18 SetViewColor(B_TRANSPARENT_COLOR);
19 iDisableCount = 0;
20 bFixedFocus = false;
21 poHeaderSIcon = NULL;
22
23 {
24 ASSERT(pc_FirstName);
25 BL_String s;
26 s<<pc_FirstName;
27 s<<"_panel";
28 s<<"_";
29 s<<(b_WinPos_OnLeft?"_left":"_right");
30 SetName(s.String());
31 }
32
33 poRender = this;
34 poRenderBitmap = NULL;
35 iRenderDeep = 0;
36 bNeedUpdateAfterEnable = false;
37 }
38
39 BF_GUI_Panel::~BF_GUI_Panel()
40 {
41 if(poHeaderSIcon) delete poHeaderSIcon;
42 }
43
44 void
45 BF_GUI_Panel::MouseUp(BPoint point)
46 {
47 OnMouseUp(point);
48 }
49
50 void
51 BF_GUI_Panel::MouseDown(BPoint point)
52 {
53 OnMouseDown(point);
54 }
55
56 bool
57 BF_GUI_Panel::OnMouseDown(BPoint & o_Point)
58 {
59
60 if(!Enabled()){
61 BRect oFrame = Frame();
62 BPoint oPoint;
63 oPoint.x = oFrame.left + o_Point.x;
64 oPoint.y = oFrame.top + o_Point.y;
65
66 BMessenger oMessenger(poWinView);
67 BMessage oMessage(BF_MSG_MAINVIEW_MOUSE_DOWN);
68 oMessage.AddPoint("bf_point",oPoint);
69 oMessage.AddPointer("bf_view",(void*)this);
70 oMessenger.SendMessage(&oMessage);
71 return true;
72 }
73
74 if(o_Point.y<=HeaderHeight()){
75 NavPressInHeader(o_Point);
76 return true;
77 }
78 return false;
79 }
80 bool
81 BF_GUI_Panel::OnMouseUp(BPoint & o_Point)
82 {
83 return false;
84 }
85
86
87 void
88 BF_GUI_Panel::KeyDown(const char *bytes, int32 numBytes)
89 {
90 if(OnBeforeKeyDown(bytes,numBytes)) return;
91 if(poCmdLine && poCmdLine->OnKeyDown(bytes,numBytes)) return;
92 if(poSysKeysMenu && poSysKeysMenu->OnKeyDown(bytes,numBytes)) return;
93 OnKeyDown(bytes,numBytes);
94 }
95
96 bool
97 BF_GUI_Panel::OnBeforeKeyDown(const char *bytes, int32 numBytes)
98 {
99 return false;
100 }
101
102 void
103 BF_GUI_Panel::PrepareCmdLine()
104 {
105 if(!poCmdLine) return;
106 poCmdLine->SetValues("","");
107 }
108
109 bool
110 BF_GUI_Panel::Close()
111 {
112 if(!OnClose()) return false;
113
114 poWinView->RemovePanel(this);
115
116 return true;
117 }
118
119 bool
120 BF_GUI_Panel::OnKeyDown(const char *bytes, int32 numBytes)
121 {
122 uint32 iKeysModifiers = modifiers();
123
124 if(numBytes==1 && bytes[0]==B_ESCAPE){
125 Close();
126 return true;
127 }
128
129 if(bytes[0] == B_FUNCTION_KEY){
130 int32 iKey;
131 BMessage *poMsg = Window()->CurrentMessage();
132 if(!poMsg) return false;
133 poMsg->FindInt32("key", &iKey);
134 if(iKeysModifiers & B_RIGHT_OPTION_KEY){
135 }else{
136
137
138
139
140
141
142
143
144
145
146
147 }
148 }
149 BView::KeyDown(bytes,numBytes);
150 return false;
151 }
152
153 void
154 BF_GUI_Panel::Draw_OpenTransaction()
155 {
156 iRenderDeep++;
157
158 if( iRenderDeep == 1){
159 BRect oRect(Bounds());
160 poRenderBitmap = new BBitmap(oRect,B_RGB16,true);
161 poRenderBitmap->AddChild( poRender = new BView(oRect,"",B_FOLLOW_ALL,B_WILL_DRAW) );
162 poRenderBitmap->Lock();
163 poRender->SetViewColor(B_TRANSPARENT_COLOR);
164 poRender->SetFont(&poSysSetup->oFontNode.oFont,B_FONT_ALL);
165 }
166 }
167
168 void
169 BF_GUI_Panel::Draw_CloseTransaction(BRect * po_RectDest)
170 {
171 iRenderDeep--;
172
173 if(iRenderDeep==0){
174 LOCK_WIN();
175 poRender->Sync();
176
177 SetDrawingMode(B_OP_COPY);
178 if(po_RectDest)
179 DrawBitmap(poRenderBitmap,*po_RectDest,*po_RectDest);
180 else
181 DrawBitmap(poRenderBitmap,Bounds());
182 if(poRender->RemoveSelf()) DELETE(poRender);
183 poRenderBitmap->Unlock();
184 DELETE(poRenderBitmap);
185 poRender = this;
186 }
187 }
188
189 void
190 BF_GUI_Panel::DrawBackground(const BRect & o_Rect) const
191 {
192 poRender->SetHighColor(SYS_COLOR(BF_COLOR_BACK));
193 poRender->FillRect(o_Rect);
194 }
195
196 void
197 BF_GUI_Panel::DrawPanel(BRect & o_Rect)
198 {
199 BRect oRect;
200 BPoint o1,o2;
201 float fHeight = poSysSetup->oFontNode.fHeight;
202
203 oRect = poRender->Bounds();
204
205
206 DrawBackground(oRect);
207
208 poRender->SetHighColor(SYS_COLOR(BF_COLOR_FRAME));
209 oRect = poRender->Bounds();
210 o1.Set(1,HeaderHeight()/2-1);
211 o2.Set(o1.x,oRect.bottom-fHeight/2+1);
212 poRender->StrokeLine(o1,o2);
213 o1.x+=2;o2.x=o1.x;
214 o1.y+=2;o2.y-=2;
215 poRender->StrokeLine(o1,o2);
216
217 poRender->SetHighColor(SYS_COLOR(BF_COLOR_FRAME));
218 o1.Set(oRect.right-1,HeaderHeight()/2-1);
219 o2.Set(o1.x,oRect.bottom-fHeight/2+1);
220 poRender->StrokeLine(o1,o2);
221 o1.x-=2;o2.x=o1.x;
222 o1.y+=2;o2.y-=2;
223 poRender->StrokeLine(o1,o2);
224
225
226 DrawHeader(IsFocus());
227 }
228
229 const BL_String
230 BF_GUI_Panel::Path() const
231 {
232 BL_String sResult("//");
233 return sResult;
234 }
235
236 void
237 BF_GUI_Panel::Draw(BRect o_Rect)
238 {
239 Draw_OpenTransaction();
240 DrawPanel(o_Rect);
241 Draw_CloseTransaction();
242 }
243
244 void
245 BF_GUI_Panel::SetHeader(const char *pc_Header,BBitmap * po_SIcon)
246 {
247 sHeader=pc_Header?pc_Header:"";
248 if(po_SIcon){
249 if(poHeaderSIcon) DELETE(poHeaderSIcon);
250 poHeaderSIcon = new BBitmap(po_SIcon);
251 }
252
253 if(Parent()) DrawHeader(IsFocus());
254 }
255
256 float
257 BF_GUI_Panel::HeaderHeight()
258 {
259 float fNodeHeight = poSysSetup->oFontNode.fHeight;
260 if(poSysSetup->MainStyle() & BF_SETUP_MAIN_FP_HEADERICON)
261 if(fNodeHeight<18) fNodeHeight = 18;
262 return fNodeHeight;
263 }
264
265 void
266 BF_GUI_Panel::DrawStringCheck(const char *pc_Text,float f_Width,BPoint & o_Point,BFont *po_Font)
267 {
268 ASSERT(pc_Text);
269
270 if(!po_Font) po_Font = &poSysSetup->oFontNode.oFont;
271
272 BRect oRect;
273 oRect.top = o_Point.y-1000;
274 oRect.bottom = o_Point.y+1000;
275 oRect.left = o_Point.x;
276 oRect.right = o_Point.x + f_Width;
277
278 BRegion oReg;
279 oReg.Set(oRect);
280 poRender->ConstrainClippingRegion(&oReg);
281 poRender->DrawString(pc_Text,o_Point);
282 poRender->ConstrainClippingRegion(NULL);
283
284
285
286 }
287
288 void
289 BF_GUI_Panel::DrawHeader(bool b_IsFocus)
290 {
291 BString s;
292 BRect oRect(poRender->Bounds());
293 float fPathWidth;
294 float fNodeHeight = HeaderHeight();
295 float fIconWidth = ((poSysSetup->MainStyle() & BF_SETUP_MAIN_FP_HEADERICON) && poHeaderSIcon)?18.0:0.0;
296
297 {
298 float fMax;
299 s = sHeader;
300 fMax = oRect.Width()-40-fIconWidth;
301 while(TRUE){
302 fPathWidth = poSysSetup->oFontNode.oFont.StringWidth(s.String());
303 if(fPathWidth<=fMax) break;
304 s.Remove(0,1);
305 }
306 }
307
308 float fWidth = poSysSetup->oFontNode.oFont.StringWidth(s.String()) + fIconWidth;
309 float fLeft = (oRect.Width() - fWidth)/2;
310
311
312 oRect = poRender->Bounds();
313 oRect.left+=5;
314 oRect.right-=5;
315 oRect.bottom = fNodeHeight;
316 poRender->SetHighColor(SYS_COLOR(BF_COLOR_PATH_BACK));
317 poRender->FillRect(oRect);
318
319
320 oRect = poRender->Bounds();
321 oRect.left=fLeft-2;
322 oRect.right=fLeft+fWidth+2;
323 oRect.bottom = fNodeHeight;
324 if(b_IsFocus)
325 poRender->SetHighColor(SYS_COLOR(BF_COLOR_PATH_FOCUSBACK));
326 else
327 poRender->SetHighColor(SYS_COLOR(BF_COLOR_PATH_BACK));
328 poRender->FillRect(oRect);
329
330 oRect = Bounds();
331
332 BPoint o1,o2;
333
334 o1.Set(1,fNodeHeight/2-1);
335 o2.Set(fLeft-3,o1.y);
336 poRender->SetHighColor(SYS_COLOR(BF_COLOR_FRAME));
337 poRender->StrokeLine(o1,o2);
338 o1.x+=2;
339 o1.y+=2;o2.y=o1.y;
340 poRender->StrokeLine(o1,o2);
341
342 o1.Set(fLeft+fWidth+3,fNodeHeight/2-1);
343 o2.Set(oRect.right-1,o1.y);
344 poRender->SetHighColor(SYS_COLOR(BF_COLOR_FRAME));
345 poRender->StrokeLine(o1,o2);
346 o2.x-=2;
347 o1.y+=2;o2.y=o1.y;
348 poRender->StrokeLine(o1,o2);
349 if(poSysSetup->MainStyle() & BF_SETUP_MAIN_FP_HEADERICON){
350 if(poHeaderSIcon){
351 BPoint o(fLeft,0);
352 poRender->SetDrawingMode(B_OP_ALPHA);
353 poRender->DrawBitmap(poHeaderSIcon,o);
354 poRender->SetDrawingMode(B_OP_COPY);
355 }
356 }
357
358 o1.Set(fLeft+fIconWidth,poSysSetup->oFontNode.fAscent);
359 if(b_IsFocus){
360 poRender->SetHighColor(SYS_COLOR(BF_COLOR_PATH_FOCUSTEXT));
361 poRender->SetLowColor(SYS_COLOR(BF_COLOR_PATH_FOCUSBACK));
362 }else{
363 poRender->SetHighColor(SYS_COLOR(BF_COLOR_PATH_TEXT));
364 poRender->SetLowColor(SYS_COLOR(BF_COLOR_PATH_BACK));
365 }
366 poRender->SetFont(&poSysSetup->oFontNode.oFont);
367 poRender->DrawString(s.String(),o1);
368 }
369
370
371 float
372 BF_GUI_Panel::BottomHeight()
373 {
374 return poSysSetup->oFontNode.fHeight;
375 }
376
377
378 BRect
379 BF_GUI_Panel::BottomRect()
380 {
381 BRect oRect;
382 oRect = poRender->Bounds();
383 oRect.left+=4;
384 oRect.right-=4;
385 oRect.top = oRect.bottom-BottomHeight();
386
387 return oRect;
388 }
389
390 BRect
391 BF_GUI_Panel::ClientRect()
392 {
393 BRect oRect(Bounds());
394 oRect.left = 6;
395 oRect.right -= 6;
396 oRect.top += HeaderHeight();
397 oRect.bottom -= BottomHeight();
398
399 return oRect;
400 }
401
402 void
403 BF_GUI_Panel::DrawBottom(const char *pc_Text,bool b_DrawBack)
404 {
405 BRect oRect;
406 float fNodeHeight = poSysSetup->oFontNode.fHeight;
407
408 if(b_DrawBack){
409 oRect = BottomRect();
410 poRender->SetHighColor(SYS_COLOR(BF_COLOR_BACK));
411 poRender->FillRect(oRect);
412 }
413
414 if(pc_Text && pc_Text[0]!='\0'){
415 BL_String s(pc_Text);
416 float fWidth = poSysSetup->oFontNode.oFont.StringWidth(s.String());
417 oRect = Bounds();
418 float fLeft = (oRect.Width() - fWidth)/2;
419
420 BPoint o1,o2;
421
422 o1.Set(1,oRect.bottom-fNodeHeight/2+1);
423 o2.Set(fLeft-(pc_Text?3.0:0.0),o1.y);
424 poRender->SetHighColor(SYS_COLOR(BF_COLOR_FRAME));
425 poRender->StrokeLine(o1,o2);
426 o1.x+=2;
427 o1.y-=2;o2.y=o1.y;
428 poRender->StrokeLine(o1,o2);
429
430 o1.Set(fLeft+fWidth+3.0,oRect.bottom-fNodeHeight/2+1);
431 o2.Set(oRect.right-1,o1.y);
432 poRender->SetHighColor(SYS_COLOR(BF_COLOR_FRAME));
433 poRender->StrokeLine(o1,o2);
434 o2.x-=2;
435 o1.y-=2;o2.y=o1.y;
436 poRender->StrokeLine(o1,o2);
437
438 o1.Set(fLeft,oRect.bottom-poSysSetup->oFontNode.fDescent);
439 poRender->SetHighColor(SYS_COLOR(BF_COLOR_PANEL_INFO_TEXT));
440 poRender->SetLowColor(SYS_COLOR(BF_COLOR_BACK));
441 poRender->DrawString(s.String(),o1);
442 }else{
443
444 BPoint o1,o2;
445 oRect = poRender->Bounds();
446
447 o1.Set(1,oRect.bottom-fNodeHeight/2+1);
448 o2.Set(oRect.right-1,o1.y);
449 poRender->SetHighColor(SYS_COLOR(BF_COLOR_FRAME));
450 poRender->StrokeLine(o1,o2);
451 o1.x+=2;
452 o2.x-=2;
453 o1.y-=2;o2.y=o1.y;
454 poRender->StrokeLine(o1,o2);
455 }
456 }
457
458 void
459 BF_GUI_Panel::ActionCopyFrom_Run(BL_String & s_Path,BF_NodeCollection & lo_Node,bool b_Move)
460 {
461 }
462
463 void
464 BF_GUI_Panel::PrepareTopMenuItem(BF_GUI_TopMenu_HItem *po_HItem)
465 {
466
467 }
468
469 void
470 BF_GUI_Panel::PrepareKeysMenu()
471 {
472 poSysKeysMenu->Clear();
473 uint32 iKeysModifiers = modifiers();
474
475 if(iKeysModifiers & B_OPTION_KEY){
476 poSysKeysMenu->SetText(9,"SaveSetup");
477 poSysKeysMenu->SetMessage(9,new BMessage(BF_MSG_MAINVIEW_MAINSETUP_SAVE),poWinView);
478 }else{
479 poSysKeysMenu->SetText(1,"LeftVol");
480 poSysKeysMenu->SetMessage(1,new BMessage(BF_MSG_MAINVIEW_SELVOL_LEFT),poWinView);
481
482 poSysKeysMenu->SetText(2,"RightVol");
483 poSysKeysMenu->SetMessage(2,new BMessage(BF_MSG_MAINVIEW_SELVOL_RIGHT),poWinView);
484
485 poSysKeysMenu->SetText(9,"Menu");
486 poSysKeysMenu->SetMessage(9,new BMessage(BF_MSG_PANEL_TOPMENU),this);
487
488 poSysKeysMenu->SetText(10,"Exit");
489 poSysKeysMenu->SetMessage(10,new BMessage(BF_MSG_MAINVIEW_ASK_QUIT),poWinView);
490 }
491 }
492
493 void
494 BF_GUI_Panel::SetupUpdated()
495 {
496 SetFont(&poSysSetup->oFontNode.oFont);
497 Draw(Bounds());
498 }
499
500 void
501 BF_GUI_Panel::MessageReceived(BMessage* po_Message)
502 {
503 switch(po_Message->what) {
504
505 case BF_MSG_TO_PANEL_SET_PATH:{
506 BF_GUI_Panel *poPrevPanel = poWinView->PanelByIndex(bWinPos_OnLeft,-1);
507 if(!Close()) break;
508 if(!poPrevPanel) break;
509 BMessenger oMessenger(poPrevPanel);
510 oMessenger.SendMessage(po_Message);
511 break;}
512
513 case BF_MSG_TO_PANEL_FRIEND_NEWCURSOR:{
514 const char *pcNodePath;
515 if(B_OK!=po_Message->FindString("bf_pcNodePath",&pcNodePath) || !pcNodePath) return;
516 const char *pcNodeName;
517 if(B_OK!=po_Message->FindString("bf_pcNodeName",&pcNodeName) || !pcNodeName) return;
518 int32 iNodeType = po_Message->FindInt32("bf_iNodeType");
519
520 Action_Friend_NewCursor(pcNodePath,pcNodeName,iNodeType);
521
522 break;}
523 case BF_MSG_MAKEFOCUS:
524 MakeFocus();
525 break;
526 case BF_MSG_SETUP_UPDATED:
527 SetupUpdated();
528 break;
529
530 case B_COPY:{
531 Action_CopyToBuffer();
532 break;}
533 case B_PASTE:{
534 Action_PasteFromBuffer();
535 break;}
536
537 case 1599425348:
538 case 1599425365:
539 if(poSysKeysMenu) PrepareKeysMenu();
540 break;
541
542 case BF_MSG_TOTAL_WIN_RECEIVE_FOCUS:
543 if(poSysKeysMenu) PrepareKeysMenu();
544 break;
545 case BF_MSG_PANEL_FOCUS_AND_ENABLE:
546 BF_GUI_Func_PanelsEnable(true);
547 MakeFocus();
548 break;
549 case BF_MSG_MAINVIEW_MAINSETUP_CLOSE:
550 BF_GUI_Func_PanelsEnable(true);
551 MakeFocus();
552 break;
553 case BF_MSG_PANEL_TOPMENU:{
554 Run_TopMenu();
555 break;}
556 case BF_MSG_PANEL_TOPMENU_INVOKED:{
557 MakeFocus();
558 break;}
559
560 case BF_MSG_VIEW_MAINWIN_RESIZED:{
561 if(!Parent()) break;
562
563 BRect oParRect = Parent()->Bounds();
564 float fBotHeight = poSysSetup->oFontNode.fHeight + poSysSetup->oFontCMDLine.fHeight;
565 fBotHeight += poOperRoster->fHeightInWinMain();
566
567 if(bWinPos_OnLeft){
568 ResizeTo(oParRect.Width()/2-1,oParRect.Height()- fBotHeight );
569 }else{
570 MoveTo(oParRect.Width()/2,0);
571 ResizeTo(oParRect.Width()/2,oParRect.Height()- fBotHeight);
572 }
573
574 break;}
575 default:{
576 BView::MessageReceived(po_Message);
577 break;}
578 }
579 };
580
581 void
582 BF_GUI_Panel::Run_TopMenu()
583 {
584 BF_GUI_TopMenu_Run();
585 }
586
587 void
588 BF_GUI_Panel::FrameResized(float width, float height)
589 {
590 Invalidate();
591 BView::FrameResized(width,height);
592 }
593 void
594 BF_GUI_Panel::NavPressInHeader(const BPoint & o_Point)
595 {
596 BMessage oMessage(bWinPos_OnLeft?BF_MSG_MAINVIEW_SELVOL_LEFT:BF_MSG_MAINVIEW_SELVOL_RIGHT);
597 BMessenger oMessenger(poWinView);
598 oMessenger.SendMessage(&oMessage);
599 }
600
601 void
602 BF_GUI_Panel::Enable(bool b_Enable)
603 {
604 if(b_Enable && iDisableCount==1){
605 bFixedFocus = false;
606 SetFlags(B_WILL_DRAW|B_FRAME_EVENTS|B_NAVIGABLE);
607 }else
608 if(!b_Enable && iDisableCount==0){
609
610 SetFlags(B_WILL_DRAW|B_FRAME_EVENTS);
611 }
612
613 iDisableCount += !b_Enable?+1:-1;
614 ASSERT(iDisableCount>=0);
615
616 if(iDisableCount==0 && b_Enable) OnEnable(true);
617 if(iDisableCount==1 && !b_Enable) OnEnable(false);
618 }
619
620 bool
621 BF_GUI_Panel::Enabled()
622 {
623 return iDisableCount==0 ;
624 }
625
626 void
627 BF_GUI_Panel::OnEnable(bool b_Enable)
628 {
629 if(b_Enable && bNeedUpdateAfterEnable){
630 Draw(Bounds());
631 bNeedUpdateAfterEnable = false;
632 }
633 }
634
635 void
636 BF_GUI_Panel::MakeFocus(bool focused)
637 {
638 BView::MakeFocus(focused);
639 OnFocus(focused);
640 }
641 void
642 BF_GUI_Panel::OnFocus(bool b_Focused)
643 {
644
645 if(b_Focused){
646 if(poSysKeysMenu) PrepareKeysMenu();
647 if(poCmdLine) PrepareCmdLine();
648 }else{
649 if(poSysKeysMenu) poSysKeysMenu->Clear();
650 }
651
652
653 DrawHeader(bFixedFocus || b_Focused);
654 }
655
656 bool
657 BF_GUI_Panel::OnClose(){
658 return true;
659 }
660
661 void
662 BF_GUI_Panel::SayFriend_About_CursorChanged(
663 const char *pc_NodePath,
664 const char *pc_NodeName,
665 int i_NodeType)
666 {
667
668 BF_GUI_Panel *po = poWinView->PanelOnTop(!bWinPos_OnLeft);
669 if(!po) return;
670
671 BMessenger oMessenger(po);
672 BMessage oMessage(BF_MSG_TO_PANEL_FRIEND_NEWCURSOR);
673 if(pc_NodePath) oMessage.AddString("bf_pcNodePath",pc_NodePath);
674 if(pc_NodeName) oMessage.AddString("bf_pcNodeName",pc_NodeName);
675 oMessage.AddInt32("bf_iNodeType",i_NodeType);
676 oMessenger.SendMessage(&oMessage);
677 }
678
679 void
680 BF_GUI_Panel::Nodes_GetAll(BF_NodeList& lo_ResultNode,bool b_ReqIcons)
681 {
682 lo_ResultNode.DeleteItems();
683 }
684
685 void
686 BF_GUI_Panel::Nodes_SetSelectingByName( BF_NodeList* plo_ReqNode,uint i_SelAction,bool b_ReqUpdate)
687 {
688 }
689
690 void
691 BF_GUI_Panel::StoreVars(BF_GUI_Setup_Vars_Panel & o_Setup) const
692 {
693 }
694
695 void
696 BF_GUI_Func_PanelsEnable(bool b_Enable,bool b_OperRosterAlso)
697 {
698 BMessenger oMessenger(poWinView);
699 BMessage oMessage(BF_MSG_ENABLEPANELS);
700 oMessage.AddBool("bf_bEnable",b_Enable);
701 oMessage.AddBool("bf_bOperRoster",b_OperRosterAlso);
702 oMessenger.SendMessage(&oMessage);
703 }
704
705 void
706 BF_GUI_Func_PanelsShow(bool b_Show)
707 {
708 BMessenger oMessenger(poWinView);
709 BMessage oMessage(BF_MSG_SHOWPANELS);
710 oMessage.AddBool("bf_bShow",b_Show);
711 oMessenger.SendMessage(&oMessage);
712 }
713
714 void
715 BF_GUI_Func_RedrawDialogs()
716 {
717 BMessage oMessage(BF_MSG_REDRAWDIALOGS);
718
719 if(poWinView->CountChildren()<5) return;
720
721 for(int i=0;i<poWinView->CountChildren();i++){
722 BMessenger oMessenger(poWinView->ChildAt(i));
723 oMessenger.SendMessage(&oMessage);
724 }
725 }
726
727
728 bool
729 BF_GUI_Func_EnableDialog(const char *pc_Name,bool b_Enable)
730 {
731 ASSERT(pc_Name);
732 BView *poView = poWin->FindView(pc_Name);
733 if(!poView) return false;
734
735 BMessage oMessage(BF_MSG_DIALOG_ENABLE);
736 BMessenger oMessenger(poView);
737 oMessage.AddBool("bf_bEnable",b_Enable);
738 oMessenger.SendMessage(&oMessage);
739
740 return true;
741 }
742
743 void
744 BF_GUI_Func_CloseDialog(BView *po_Dialog)
745 {
746 BMessage oMessage(BF_MSG_DIALOG_CLOSE_NOW);
747 BMessenger oMessenger(po_Dialog);
748 oMessenger.SendMessage(&oMessage);
749 }
750
751 bool
752 BF_GUI_Func_AddChildToMainView(BView *po_View)
753 {
754 ASSERT(po_View);
755 LOCK_WIN();
756
757 poWinView->AddChild(po_View);
758 return true;
759 }
760
761 void
762 BF_GUI_MakeFocusTo(BView *po_View)
763 {
764 ASSERT(po_View);
765 BMessage oMessage(BF_MSG_MAKEFOCUS);
766 BMessenger oMessenger(po_View);
767 oMessenger.SendMessage(&oMessage);
768 }