root/BF_GUI_KeysMenu.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 #ifndef _BF_GUI_KeysMenu_Item_
   2 #define _BF_GUI_KeysMenu_Item_
   3 
   4 #include <InterfaceKit.h>
   5 #include "BF_GUI_Setup.h"
   6 
   7 class BF_GUI_KeysMenu_Item : public BView
   8 {
   9 public:
  10                                                                 BF_GUI_KeysMenu_Item(BRect o_frame, const char *pc_ButtonNum,const char *pc_ButtonText, BMessage *po_Message = NULL, BHandler *po_Handler = NULL);
  11                                                                 ~BF_GUI_KeysMenu_Item();
  12                                                                 
  13 virtual void                                    Draw(BRect oRect);
  14                 
  15                 void                                    SetText(const char *pc_Text);
  16                                                                 /* po_Message  will be store in object and destroyed in destructor */
  17                 void                                    SetMessage(BMessage *po_Message = NULL, BHandler *po_Handler = NULL);
  18 virtual void                                    MouseDown(BPoint point);
  19                 bool                                    Invoke();
  20 private:                
  21                 BL_String                                       sNum;
  22                 BL_String                               sText;
  23                 BMessage                                *poMessage;
  24                 BHandler                                *poHandler;
  25 };
  26 
  27  
  28 class BF_GUI_KeysMenu : public BView
  29 {
  30 public:
  31         
  32                                                                 BF_GUI_KeysMenu(BRect o_frame);
  33 virtual void                                    FrameResized(float f_width, float f_height);
  34                                                 
  35                                                                 // i_Index in [1..10]
  36                 void                                    SetText(uint8 i_Index,const char *pc_Text);
  37                 void                                    Clear();   
  38                 void                                    SetMessage(uint8 i_Index, BMessage *po_Message = NULL, BHandler *po_Handler = NULL);
  39 virtual bool                                    OnKeyDown(const char *bytes, int32 numBytes);
  40 virtual void                                    MessageReceived(BMessage* po_Message);  
  41                 
  42 private:
  43                 BF_GUI_KeysMenu_Item    *poButtonList[10];
  44 };
  45  
  46  
  47 extern BF_GUI_KeysMenu                  *poSysKeysMenu;
  48  
  49 #endif

/* [previous][next][first][last][top][bottom][index][help] */