1 #ifndef __BF_GUI_WINMAIN_H__
2 #define __BF_GUI_WINMAIN_H__
3
4 #include <Window.h>
5 #include "BF_GUI_Setup.h"
6 #include "BF_GUI_Func.h"
7 #include "BF_GUI_DlgViews.h"
8
9 #define BF_MSG_GUI_LP_SELVOLUME '_SLV'
10 #define BF_MSG_GUI_RP_SELVOLUME '_SRV'
11
12 class BF_GUI_ViewMain : public BView {
13 public:
14 BF_GUI_ViewMain(const BRect & o_Rect);
15
16 void MessageReceived(BMessage * message);
17 virtual void FrameResized(float width, float height);
18 virtual void AttachedToWindow(void);
19
20 void AddPanel(BF_GUI_Panel* po_Panel);
21 void RemovePanel(BF_GUI_Panel* po_Panel);
22
23 BF_GUI_Panel* PanelOnTop(bool b_Left) const ;
24 BF_GUI_Panel* PanelByIndex(bool b_Left,int i_Index) const;
25 BF_GUI_Panel* FocusedPanel() const;
26 const BRect PanelRect(bool b_LeftPos) const;
27
28 BView *poLastFocus;
29 private:
30 BView *poBackground;
31 BL_Collection loLeftPanel,loRightPanel,loAllPanel;
32
33 void InitViews();
34 void EnablePanels(bool b_Enable,bool bOperRoster=true);
35 void ShowPanels(bool b_Show);
36
37 void Spec_MouseDown(const BPoint & o_Point,BView *po_FromView);
38
39 void Action_SelVolume_Start(bool b_LeftPos);
40
41 virtual void MouseDown(BPoint point);
42
43 void Action_EmptyTrash();
44 void Action_Compare_Panels();
45
46 void Action_LoadSavePalete(bool b_Load);
47 void Action_SavePalete_1(BMessage * po_Message);
48 void Action_LoadPalete_1(BMessage * po_Message);
49
50 void Action_Open_FtpPanel(bool b_PosLeft);
51
52 void Action_SelectDict();
53 void Action_SelectDict_1(BMessage *po_Message);
54
55 void Action_MountVolumes();
56
57 BF_GUI_Panel* PanelByIndexFromList(const BL_Collection & lo_Panel,int i_Index) const;
58
59 };
60
61 class BF_GUI_WinMain : public BWindow {
62 public:
63
64 BF_GUI_WinMain();
65 ~BF_GUI_WinMain();
66
67 void MessageReceived(BMessage * message);
68 virtual bool QuitRequested();
69 virtual void WindowActivated(bool b_Active);
70 virtual void FrameResized(float width, float height);
71
72 private:
73 BF_GUI_ViewMain *poView;
74
75 };
76
77 extern BWindow *poWin;
78 extern BF_GUI_ViewMain *poWinView;
79
80 #define LOCK_WIN() BAutolock oLock(poWin)
81