1 #ifndef __BF_GUI_IMAGEPANEL_H__
2 #define __BF_GUI_IMAGEPANEL_H__
3
4 #include "BF_GUI_Func.h"
5
6 class BF_GUI_ImagePanel;
7 class BF_GUI_ImagePanel_Viewer:public BL_Object{
8 public:
9 BF_GUI_ImagePanel_Viewer();
10 void Load(BL_String & s_NodePath);
11 void Draw(BView *po_Render,const BRect & o_Rect);
12 private:
13 BBitmap* mpBitmap;
14
15 void DrawOffscreen(BView *po_Render, BRect updateRect);
16 BL_String sNodePath;
17
18 friend class BF_GUI_ImagePanel;
19 };
20
21 class BF_GUI_ImagePanel:public BF_GUI_Panel{
22 public:
23 BF_GUI_ImagePanel(
24 const BRect& o_Rect,
25 const char* pc_FirstName,
26 bool b_WinPos_OnLeft);
27
28 virtual void Action_Friend_NewCursor(const char *pc_NodePath,const char *pc_NodeName,int32 i_NodeType);
29 virtual void MessageReceived(BMessage* po_Message);
30 virtual void FrameResized(float width, float height);
31 virtual bool OnMouseDown(BPoint & o_Point);
32 virtual bool OnMouseUp(BPoint & o_Point);
33 virtual bool OnKeyDown(const char *bytes, int32 numBytes);
34 virtual void DrawPanel(BRect & o_Rect);
35
36 virtual void PrepareKeysMenu();
37 virtual void PrepareCmdLine();
38 virtual void PrepareTopMenuItem(BF_GUI_TopMenu_HItem *po_HItem);
39
40 private:
41 BL_String sNodePath;
42 BF_GUI_ImagePanel_Viewer oViewer;
43 void LoadImage(const char *pc_NodePath);
44
45 friend class BF_GUI_ImagePanel_Viewer;
46 };
47
48