root/_BF_GUI/BF_GUI_Edit.h

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

INCLUDED FROM


   1 #ifndef __BF_GUI_EDIT_h__
   2 #define __BF_GUI_EDIT_h__
   3 
   4 #include <String.h>
   5 #include <Message.h>
   6 #include <View.h>
   7 #include <Window.h>
   8 
   9 #include "BL_Tools.h"   
  10 #include "BF_GUI_Setup.h"       
  11 #include "BF_Msg.h"     
  12 
  13 class BF_GUI_ViewEdit:public BF_GUI_DialogView{
  14 public:
  15                 BL_String                               sValue;
  16                 bool                                    bSelected;              
  17                 
  18                 bool                                    bSysKeysHandle,bParentCall,bAlwaysCursor,bCursorActive;
  19                 rgb_color                               oColBack,oColSel;
  20                 int                                             iDisableCount;
  21         
  22                                                                 BF_GUI_ViewEdit(const BRect &o_Rect,
  23                                                                                                 const char*pc_Name,
  24                                                                                                 const char *pc_Value,
  25                                                                                                 uint32  i_FollowMode,
  26                                                                                                 uint32  i_Flags);       
  27                                                                 ~BF_GUI_ViewEdit();                                                                     
  28 virtual void                                    Draw(BRect o_Rect);             
  29 virtual void                                    KeyDown(const char *bytes, int32 numBytes);
  30 virtual bool                                    OnKeyDown(const char *bytes, int32 numBytes);
  31 virtual void                                    Pulse(void);
  32 virtual void                                    AttachedToWindow(void);
  33 virtual void                                    MakeFocus(bool focused = true);         
  34 virtual void                                    MessageReceived(BMessage* po_Message);  
  35 
  36 virtual void                                    Enable(bool b_Enable);
  37 virtual bool                                    Enabled();
  38 virtual void                                    OnEnable(bool b_Enable);
  39 
  40 
  41 virtual void                                    SetText(const char *pc_NewText,bool b_GoEnd=false);
  42 
  43 virtual void                                    SaveToMessage(BMessage *po_Message);
  44 private:
  45                 int32                                                   iNavIndex,iNavFirstChar;
  46                 bool                                                    bPulseCursorShow;
  47                 
  48                 thread_id                               idThreadPulse;
  49                 
  50                 void                                                    ClearSelecting(bool b_Remove = false);
  51                 void                                                    DrawCursor(bool b_Show);
  52                 void                                                    NavGo(int32 i_NewCursor,bool b_FullRedraw=false);
  53                 
  54                 void                                                    DrawBody(BRect o_Rect);
  55                                                                                                 
  56 };
  57 
  58 BF_GUI_ViewEdit*
  59 BF_GUI_ViewEdit_Create( const BRect &o_Rect,
  60                                                 const char*pc_Comment,
  61                                                 BView *po_Parent,
  62                                                 const char*pc_Name,
  63                                                 const char *pc_Value,
  64                                                 uint32  i_FollowMode,
  65                                                 uint32  i_Flags);
  66                                                 
  67                                                 
  68 #endif// __BF_GUI_EDIT_h__

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