Logo ROOT  
Reference Guide
TGTextEntry.h
Go to the documentation of this file.
1 // @(#)root/gui:$Id$
2 // Author: Fons Rademakers 08/01/98
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2021, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TGTextEntry
13 #define ROOT_TGTextEntry
14 
15 
16 #include "TGFrame.h"
17 #include "TGWidget.h"
18 #include "TGTextBuffer.h"
19 
20 class TBlinkTimer;
21 class TGToolTip;
22 class TColor;
23 
24 class TGTextEntry : public TGFrame, public TGWidget {
25 
26 public:
29 
30 protected:
31  TGTextBuffer *fText; // text buffer
32  Int_t fStartX; // selection begin in pixels
33  Int_t fEndX; // selection end in pixels
34  Int_t fStartIX; // selection begin in characters
35  Int_t fEndIX; // selection end in characters
36  Bool_t fSelectionOn; // selection status (on/off)
37  Int_t fOffset; // start position of text (in pixels)
38  Int_t fCursorX; // cursor position in pixels
39  Int_t fCursorIX; // cursor position in characters
40  Bool_t fCursorOn; // cursor status (on/off)
41  FontStruct_t fFontStruct; // text font
42  TGGC fNormGC; // normal drawing context
43  TGGC fSelGC; // selected text drawing context
44  GContext_t fSelbackGC; // selected background drawing context
45  Atom_t fClipboard; // clipboard property
46  TBlinkTimer *fCurBlink; // cursor blink timer
47  TGToolTip *fTip; // associated tooltip
48  Int_t fMaxLen; // maximum length of text
49  Bool_t fEdited; // kFALSE, if the line edit's contents have not been changed since the construction
50  Bool_t fFrameDrawn; // kTRUE draw itself inside a two-pixel frame, kFALSE draw without any frame
51  EEchoMode fEchoMode; // *OPTION={GetMethod="GetEchoMode";SetMethod="SetEchoMode";Items=(kNormal="Normal",kNoEcho="No Echo",kPassword="Password")}*
52  EInsertMode fInsertMode; // *OPTION={GetMethod="GetInsertMode";SetMethod="SetInsertMode";Items=(kInsert="Insert",kReplace="Replace")}*
53  ETextJustification fAlignment; // *OPTION={GetMethod="GetAlignment";SetMethod="SetAlignment";Items=(kTextLeft="Left",kTextCenterX="Center",kTextRight="Right")}*
54  Bool_t fHasOwnFont; // kTRUE - font defined locally, kFALSE - globally
55  UInt_t fDefWidth; // default width
56  UInt_t fDefHeight; // default height
57 
58  void CopyText() const;
59  virtual void DoRedraw();
61  virtual void Init();
62  virtual Bool_t IsCursorOutOfFrame();
63  void Paste();
64  virtual void PastePrimary(Window_t wid, Atom_t property, Bool_t del);
65  virtual void ScrollByChar();
66  virtual void UpdateOffset();
67 
68  static TString *fgClipboardText; // application clipboard text
69  static const TGFont *fgDefaultFont;
70  static const TGGC *fgDefaultSelectedGC;
72  static const TGGC *fgDefaultGC;
73 
74  static const TGGC &GetDefaultSelectedGC();
75  static const TGGC &GetDefaultSelectedBackgroundGC();
76 
77 private:
78  TGTextEntry(const TGTextEntry&) = delete;
79  TGTextEntry& operator=(const TGTextEntry&) = delete;
80 
81 public:
83  static const TGGC &GetDefaultGC();
84 
85  TGTextEntry(const TGWindow *p, TGTextBuffer *text, Int_t id = -1,
86  GContext_t norm = GetDefaultGC()(),
89  Pixel_t back = GetWhitePixel());
90 
91  TGTextEntry(const TGWindow *parent = 0, const char *text = 0, Int_t id = -1);
92  TGTextEntry(const TString &contents, const TGWindow *parent, Int_t id = -1);
93 
94  virtual ~TGTextEntry();
95 
96  virtual TGDimension GetDefaultSize() const;
97  virtual void SetDefaultSize(UInt_t w, UInt_t h);
98 
99  virtual void AppendText(const char *text);
100  void Backspace();
101  void Clear(Option_t *option="");
102  void CursorLeft(Bool_t mark = kFALSE , Int_t steps = 1);
103  void CursorRight(Bool_t mark = kFALSE , Int_t steps = 1);
106  void Cut();
107  void Del();
108  void Deselect();
109  virtual void DrawBorder();
110  void End(Bool_t mark = kFALSE);
112  TGTextBuffer *GetBuffer() const { return fText; }
113  Int_t GetCursorPosition() const { return fCursorIX; }
114  TString GetDisplayText() const;
115  EEchoMode GetEchoMode() const { return fEchoMode; }
117  TString GetMarkedText() const;
118  Int_t GetMaxLength() const { return fMaxLen; }
119  const char *GetText() const { return fText->GetString(); }
120  virtual TGToolTip *GetToolTip() const { return fTip; }
121  virtual const char *GetTitle() const { return GetText(); }
122  Bool_t HasMarkedText() const { return fSelectionOn && (fStartIX != fEndIX); }
125  void Home(Bool_t mark = kFALSE);
126  virtual void Insert(const char *);
127  virtual void InsertText(const char *text, Int_t pos);
128  Bool_t IsFrameDrawn() const { return fFrameDrawn; }
129  Bool_t IsEdited() const { return fEdited; }
130  virtual void Layout() { UpdateOffset(); }
131  void MarkWord(Int_t pos);
132  Int_t MaxMark() const { return fStartIX > fEndIX ? fStartIX : fEndIX; }
133  Int_t MinMark() const { return fStartIX < fEndIX ? fStartIX : fEndIX; }
134  void NewMark(Int_t pos);
135  void Remove();
136  virtual void RemoveText(Int_t start, Int_t end);
137  virtual void SetFont(TGFont *font, Bool_t local = kTRUE);
138  virtual void SetFont(FontStruct_t font, Bool_t local = kTRUE);
139  virtual void SetFont(const char *fontName, Bool_t local = kTRUE);
140  virtual void SetTextColor(Pixel_t color, Bool_t local = kTRUE);
141  virtual void SetTextColor(TColor *color, Bool_t local = kTRUE);
142  virtual void SetText(const char *text, Bool_t emit = kTRUE); //*MENU*
143  virtual void SetToolTipText(const char *text, Long_t delayms = 500); //*MENU*
144  virtual void SetMaxLength(Int_t maxlen); //*MENU*
145  virtual void SelectAll();
146  virtual void SetAlignment(ETextJustification mode = kTextLeft); //*SUBMENU*
147  virtual void SetInsertMode(EInsertMode mode = kInsert); //*SUBMENU*
148  virtual void SetEchoMode(EEchoMode mode = kNormal); //*SUBMENU*
149  void SetEnabled(Bool_t flag = kTRUE) { SetState( flag ); } //*TOGGLE* *GETTER=IsEnabled
150  virtual void SetCursorPosition(Int_t pos);
151  void SetEdited(Bool_t flag = kTRUE) { fEdited = flag; }
152  virtual void SetFocus();
153  virtual void SetFrameDrawn(Bool_t flag = kTRUE);
154  virtual void SetState(Bool_t state);
155  virtual void SetTitle(const char *label) { SetText(label); }
156  virtual void SetForegroundColor(Pixel_t fore) { SetTextColor(fore, kFALSE); }
158  Bool_t HasOwnFont() const { return fHasOwnFont; }
159 
160  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
161 
162  virtual Bool_t HandleButton(Event_t *event);
163  virtual Bool_t HandleDoubleClick(Event_t *event);
164  virtual Bool_t HandleCrossing(Event_t *event);
165  virtual Bool_t HandleMotion(Event_t *event);
166  virtual Bool_t HandleKey(Event_t *event);
167  virtual Bool_t HandleFocusChange(Event_t *event);
168  virtual Bool_t HandleSelection(Event_t *event);
169  virtual Bool_t HandleSelectionClear(Event_t *event);
170  virtual Bool_t HandleSelectionRequest(Event_t *event);
171  virtual Bool_t HandleTimer(TTimer *t);
172  virtual Bool_t HandleConfigureNotify(Event_t *event);
173 
174  virtual void TextChanged(const char *text = nullptr);//*SIGNAL*
175  virtual void ReturnPressed(); //*SIGNAL*
176  virtual void TabPressed(); //*SIGNAL*
177  virtual void ShiftTabPressed(); //*SIGNAL*
178  virtual void CursorOutLeft(); //*SIGNAL*
179  virtual void CursorOutRight(); //*SIGNAL*
180  virtual void CursorOutUp(); //*SIGNAL*
181  virtual void CursorOutDown(); //*SIGNAL*
182  virtual void DoubleClicked(); //*SIGNAL*
183 
184  ClassDef(TGTextEntry,0) // The TGTextEntry widget is a simple line editor for inputting text
185 };
186 
187 #endif
TGTextEntry::kNoEcho
@ kNoEcho
Definition: TGTextEntry.h:27
TGTextEntry::SetTextColor
virtual void SetTextColor(Pixel_t color, Bool_t local=kTRUE)
Changes text color.
Definition: TGTextEntry.cxx:1763
TGTextEntry::fgClipboardText
static TString * fgClipboardText
Definition: TGTextEntry.h:68
TGTextEntry::fHasOwnFont
Bool_t fHasOwnFont
Definition: TGTextEntry.h:54
mark
#define mark(osub)
Definition: triangle.c:1206
TGTextEntry::ShiftTabPressed
virtual void ShiftTabPressed()
This signal is emitted when SHIFT and TAB keys are pressed.
Definition: TGTextEntry.cxx:404
TGWindow
ROOT GUI Window base class.
Definition: TGWindow.h:23
TGTextEntry::HandleSelectionClear
virtual Bool_t HandleSelectionClear(Event_t *event)
Handle selection clear event.
Definition: TGTextEntry.cxx:1487
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:100
TGTextEntry::SetText
virtual void SetText(const char *text, Bool_t emit=kTRUE)
Sets text entry to text, clears the selection and moves the cursor to the end of the line.
Definition: TGTextEntry.cxx:611
TGTextEntry::fEndIX
Int_t fEndIX
Definition: TGTextEntry.h:35
TGTextEntry::AppendText
virtual void AppendText(const char *text)
Appends text to the end of text entry, clears the selection and moves the cursor to the end of the li...
Definition: TGTextEntry.cxx:1691
TGTextEntry::fgDefaultSelectedBackgroundGC
static const TGGC * fgDefaultSelectedBackgroundGC
Definition: TGTextEntry.h:71
TGTextEntry::fNormGC
TGGC fNormGC
Definition: TGTextEntry.h:42
TGGC::GetForeground
Pixel_t GetForeground() const
Definition: TGGC.h:73
TGDimension
Definition: TGDimension.h:18
Option_t
const char Option_t
Definition: RtypesCore.h:66
TGTextEntry::GetTextColor
Pixel_t GetTextColor() const
Definition: TGTextEntry.h:123
TGTextEntry::HasOwnFont
Bool_t HasOwnFont() const
Definition: TGTextEntry.h:158
TGTextEntry::SetAlignment
virtual void SetAlignment(ETextJustification mode=kTextLeft)
Sets the alignment of the text entry.
Definition: TGTextEntry.cxx:566
Pixel_t
ULong_t Pixel_t
Pixel value.
Definition: GuiTypes.h:40
TGTextEntry::GetMarkedText
TString GetMarkedText() const
Returns the text marked by the user (e.g.
Definition: TGTextEntry.cxx:681
TGTextEntry::TabPressed
virtual void TabPressed()
This signal is emitted when the <TAB> key is pressed.
Definition: TGTextEntry.cxx:412
TGTextEntry::SetState
virtual void SetState(Bool_t state)
Set state of widget. If kTRUE=enabled, kFALSE=disabled.
Definition: TGTextEntry.cxx:498
TGTextEntry::CursorRight
void CursorRight(Bool_t mark=kFALSE, Int_t steps=1)
Moves the cursor rightwards one or more characters.
Definition: TGTextEntry.cxx:813
FontStruct_t
Handle_t FontStruct_t
Pointer to font structure.
Definition: GuiTypes.h:39
TGTextEntry::fOffset
Int_t fOffset
Definition: TGTextEntry.h:37
TGTextEntry::HasMarkedText
Bool_t HasMarkedText() const
Definition: TGTextEntry.h:122
TGTextEntry::Deselect
void Deselect()
Deselects all text (i.e.
Definition: TGTextEntry.cxx:1040
TGTextEntry::fCursorOn
Bool_t fCursorOn
Definition: TGTextEntry.h:40
TGTextEntry::SetToolTipText
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
Definition: TGTextEntry.cxx:1649
TGTextEntry::UpdateOffset
virtual void UpdateOffset()
Updates start text offset according GetAlignment() mode, if cursor is out of frame => scroll the text...
Definition: TGTextEntry.cxx:1627
TGTextEntry::kInsert
@ kInsert
Definition: TGTextEntry.h:28
TGTextEntry::TGTextEntry
TGTextEntry(const TGTextEntry &)=delete
TGTextEntry::MarkWord
void MarkWord(Int_t pos)
Marks the word nearest to cursor position.
Definition: TGTextEntry.cxx:758
TGTextBuffer.h
TGTextEntry::fDefHeight
UInt_t fDefHeight
Definition: TGTextEntry.h:56
TGTextEntry::HandleConfigureNotify
virtual Bool_t HandleConfigureNotify(Event_t *event)
Handles resize events for this widget.
Definition: TGTextEntry.cxx:1436
TGTextEntry::GetDefaultSelectedGC
static const TGGC & GetDefaultSelectedGC()
Return selection graphics context.
Definition: TGTextEntry.cxx:1809
TGTextEntry::fFontStruct
FontStruct_t fFontStruct
Definition: TGTextEntry.h:41
TGTextEntry::fMaxLen
Int_t fMaxLen
Definition: TGTextEntry.h:48
TGTextEntry::Init
virtual void Init()
Do default initialization.
Definition: TGTextEntry.cxx:315
TGTextEntry::GetDefaultSelectedBackgroundGC
static const TGGC & GetDefaultSelectedBackgroundGC()
Return graphics context for highlighted frame background.
Definition: TGTextEntry.cxx:1819
Int_t
int Int_t
Definition: RtypesCore.h:45
TGWidget
The widget base class.
Definition: TGWidget.h:43
TGTextEntry::GetInsertMode
EInsertMode GetInsertMode() const
Definition: TGTextEntry.h:116
TGToolTip
Definition: TGToolTip.h:24
TGTextEntry::GetBuffer
TGTextBuffer * GetBuffer() const
Definition: TGTextEntry.h:112
TGTextEntry::fClipboard
Atom_t fClipboard
Definition: TGTextEntry.h:45
TGTextEntry::CursorWordBackward
void CursorWordBackward(Bool_t mark=kFALSE)
Moves the cursor one word to the left.
Definition: TGTextEntry.cxx:858
TString
Basic string class.
Definition: TString.h:136
TGFrame
Definition: TGFrame.h:80
TGTextEntry::HandleMotion
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion event in the text entry widget.
Definition: TGTextEntry.cxx:1396
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
TGTextEntry::fEdited
Bool_t fEdited
Definition: TGTextEntry.h:49
kDoubleBorder
@ kDoubleBorder
Definition: GuiTypes.h:385
TGTextEntry::SetTitle
virtual void SetTitle(const char *label)
Definition: TGTextEntry.h:155
text
TText * text
Definition: entrylist_figure1.C:10
TGTextEntry::HandleTimer
virtual Bool_t HandleTimer(TTimer *t)
Handle cursor blink timer.
Definition: TGTextEntry.cxx:1560
TGTextEntry::Del
void Del()
Deletes the character on the right side of the text cursor.
Definition: TGTextEntry.cxx:890
bool
TGTextBuffer
A text buffer is used in several widgets, like TGTextEntry, TGFileDialog, etc.
Definition: TGTextBuffer.h:19
TGTextEntry::fInsertMode
EInsertMode fInsertMode
Definition: TGTextEntry.h:52
TGTextEntry::fgDefaultSelectedGC
static const TGGC * fgDefaultSelectedGC
Definition: TGTextEntry.h:70
TGTextEntry::operator=
TGTextEntry & operator=(const TGTextEntry &)=delete
TGTextEntry::NewMark
void NewMark(Int_t pos)
New character mark at position pos.
Definition: TGTextEntry.cxx:693
TGTextEntry::SelectAll
virtual void SelectAll()
Selects all text (i.e.
Definition: TGTextEntry.cxx:1028
TGTextEntry::fFrameDrawn
Bool_t fFrameDrawn
Definition: TGTextEntry.h:50
TGTextEntry::RemoveText
virtual void RemoveText(Int_t start, Int_t end)
Removes text at the range, clears the selection and moves the cursor to the end of the line.
Definition: TGTextEntry.cxx:1701
TGTextEntry::SetDefaultSize
virtual void SetDefaultSize(UInt_t w, UInt_t h)
Set the default / minimal size of the widget.
Definition: TGTextEntry.cxx:384
TGTextEntry::fEndX
Int_t fEndX
Definition: TGTextEntry.h:33
GContext_t
Handle_t GContext_t
Graphics context handle.
Definition: GuiTypes.h:38
TGTextEntry::fEchoMode
EEchoMode fEchoMode
Definition: TGTextEntry.h:51
TGTextEntry::SetInsertMode
virtual void SetInsertMode(EInsertMode mode=kInsert)
Sets the mode how characters are entered to the text entry.
Definition: TGTextEntry.cxx:596
TGTextEntry::fCurBlink
TBlinkTimer * fCurBlink
Definition: TGTextEntry.h:46
kTextLeft
@ kTextLeft
Definition: TGWidget.h:23
TGTextEntry::fStartX
Int_t fStartX
Definition: TGTextEntry.h:32
TGTextEntry::SetEdited
void SetEdited(Bool_t flag=kTRUE)
Definition: TGTextEntry.h:151
TGTextEntry::Layout
virtual void Layout()
Definition: TGTextEntry.h:130
TGTextEntry::fSelGC
TGGC fSelGC
Definition: TGTextEntry.h:43
TTimer
Handles synchronous and a-synchronous timer events.
Definition: TTimer.h:51
TGTextEntry::GetCharacterIndex
Int_t GetCharacterIndex(Int_t xcoord)
Returns the index of the character to whose left edge xcoord is closest.
Definition: TGTextEntry.cxx:515
TGTextEntry::HandleDoubleClick
virtual Bool_t HandleDoubleClick(Event_t *event)
Handle mouse double click event in the text entry widget.
Definition: TGTextEntry.cxx:1415
kSunkenFrame
@ kSunkenFrame
Definition: GuiTypes.h:383
TGTextEntry::HandleButton
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event in text entry widget.
Definition: TGTextEntry.cxx:1344
TGTextEntry::fStartIX
Int_t fStartIX
Definition: TGTextEntry.h:34
TGTextEntry::kReplace
@ kReplace
Definition: TGTextEntry.h:28
TGTextEntry::CursorOutRight
virtual void CursorOutRight()
This signal is emitted when cursor is going out of right side.
Definition: TGTextEntry.cxx:442
TGTextEntry::GetAlignment
ETextJustification GetAlignment() const
Definition: TGTextEntry.h:111
TGTextEntry::fDefWidth
UInt_t fDefWidth
Definition: TGTextEntry.h:55
TColor
The color creation and management class.
Definition: TColor.h:19
TGTextEntry::ReturnPressed
virtual void ReturnPressed()
This signal is emitted when the return or enter key is pressed.
Definition: TGTextEntry.cxx:393
TGTextEntry::fSelbackGC
GContext_t fSelbackGC
Definition: TGTextEntry.h:44
h
#define h(i)
Definition: RSha256.hxx:106
TGTextEntry::GetToolTip
virtual TGToolTip * GetToolTip() const
Definition: TGTextEntry.h:120
TGGC
Encapsulate a graphics context used in the low level graphics.
Definition: TGGC.h:22
TGTextEntry::fAlignment
ETextJustification fAlignment
Definition: TGTextEntry.h:53
TGTextEntry::SavePrimitive
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a text entry widget as a C++ statement(s) on output stream out.
Definition: TGTextEntry.cxx:1829
TGTextEntry
A TGTextEntry is a one line text input widget.
Definition: TGTextEntry.h:24
Atom_t
Handle_t Atom_t
WM token.
Definition: GuiTypes.h:37
TGTextEntry::fTip
TGToolTip * fTip
Definition: TGTextEntry.h:47
TGTextEntry::Cut
void Cut()
Copies the marked text to the clipboard and deletes it, if there is any.
Definition: TGTextEntry.cxx:961
TGTextEntry::SetFocus
virtual void SetFocus()
Set focus to this text entry.
Definition: TGTextEntry.cxx:1663
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:101
TGTextEntry::fCursorIX
Int_t fCursorIX
Definition: TGTextEntry.h:39
TGTextEntry::IsCursorOutOfFrame
virtual Bool_t IsCursorOutOfFrame()
Returns kTRUE if cursor is out of frame.
Definition: TGTextEntry.cxx:1570
TGFrame.h
TGTextEntry::Remove
void Remove()
Deletes all characters on the right side of the cursor.
Definition: TGTextEntry.cxx:919
Long_t
long Long_t
Definition: RtypesCore.h:54
TGTextEntry::DoRedraw
virtual void DoRedraw()
Draw the text entry widget.
Definition: TGTextEntry.cxx:1075
TGTextEntry::CursorOutDown
virtual void CursorOutDown()
This signal is emitted when cursor is going out of bottom side.
Definition: TGTextEntry.cxx:458
TGTextEntry::fgDefaultFont
static const TGFont * fgDefaultFont
Definition: TGTextEntry.h:69
TGTextEntry::fgDefaultGC
static const TGGC * fgDefaultGC
Definition: TGTextEntry.h:72
TGTextEntry::kPassword
@ kPassword
Definition: TGTextEntry.h:27
TGTextEntry::End
void End(Bool_t mark=kFALSE)
Moves the text cursor to the right end of the line.
Definition: TGTextEntry.cxx:1003
TGTextEntry::fText
TGTextBuffer * fText
Definition: TGTextEntry.h:31
TGTextEntry::SetMaxLength
virtual void SetMaxLength(Int_t maxlen)
Set the maximum length of the text in the editor.
Definition: TGTextEntry.cxx:636
TGTextEntry::GetEchoMode
EEchoMode GetEchoMode() const
Definition: TGTextEntry.h:115
Window_t
Handle_t Window_t
Window handle.
Definition: GuiTypes.h:29
TGTextEntry::HandleKey
virtual Bool_t HandleKey(Event_t *event)
The key press event handler converts a key press to some line editor action.
Definition: TGTextEntry.cxx:1216
TGTextEntry::GetTitle
virtual const char * GetTitle() const
Returns title of object.
Definition: TGTextEntry.h:121
TGTextEntry::EEchoMode
EEchoMode
Definition: TGTextEntry.h:27
TGTextEntry::CursorOutUp
virtual void CursorOutUp()
This signal is emitted when cursor is going out of upper side.
Definition: TGTextEntry.cxx:450
TGTextEntry::PastePrimary
virtual void PastePrimary(Window_t wid, Atom_t property, Bool_t del)
Paste text from selection (either primary or cut buffer) into text entry widget.
Definition: TGTextEntry.cxx:1544
TGTextEntry::TextChanged
virtual void TextChanged(const char *text=nullptr)
This signal is emitted every time the text has changed.
Definition: TGTextEntry.cxx:423
TGTextEntry::MaxMark
Int_t MaxMark() const
Definition: TGTextEntry.h:132
TGTextEntry::MinMark
Int_t MinMark() const
Definition: TGTextEntry.h:133
TGTextEntry::GetDefaultFontStruct
static FontStruct_t GetDefaultFontStruct()
Return default font structure in use.
Definition: TGTextEntry.cxx:1789
TGTextEntry::CursorLeft
void CursorLeft(Bool_t mark=kFALSE, Int_t steps=1)
Moves the cursor leftwards one or more characters.
Definition: TGTextEntry.cxx:835
TGTextEntry::Insert
virtual void Insert(const char *)
Removes any currently selected text, inserts newText, sets it as the new contents of the text entry.
Definition: TGTextEntry.cxx:779
TGTextEntry::SetFrameDrawn
virtual void SetFrameDrawn(Bool_t flag=kTRUE)
Sets the text entry to draw itself inside a two-pixel frame if enable is kTRUE, and to draw itself wi...
Definition: TGTextEntry.cxx:552
TGWidget.h
TGTextEntry::SetFont
virtual void SetFont(TGFont *font, Bool_t local=kTRUE)
Changes text font specified by pointer to TGFont object.
Definition: TGTextEntry.cxx:1752
TGTextEntry::EInsertMode
EInsertMode
Definition: TGTextEntry.h:28
TGTextEntry::InsertText
virtual void InsertText(const char *text, Int_t pos)
Inserts text at position pos, clears the selection and moves the cursor to the end of the line.
Definition: TGTextEntry.cxx:1677
TGTextEntry::GetFontStruct
FontStruct_t GetFontStruct() const
Definition: TGTextEntry.h:124
unsigned int
TGTextEntry::kNormal
@ kNormal
Definition: TGTextEntry.h:27
TGTextEntry::HandleFocusChange
virtual Bool_t HandleFocusChange(Event_t *event)
Handle focus change event in text entry widget.
Definition: TGTextEntry.cxx:1454
TGTextEntry::DoubleClicked
virtual void DoubleClicked()
This signal is emitted when widget is double clicked.
Definition: TGTextEntry.cxx:466
TGTextEntry::Paste
void Paste()
Inserts text at the cursor position, deleting any previous marked text.
Definition: TGTextEntry.cxx:947
TGTextEntry::Home
void Home(Bool_t mark=kFALSE)
Moves the text cursor to the left end of the line.
Definition: TGTextEntry.cxx:983
TGTextEntry::CopyText
void CopyText() const
Copies the marked text to the clipboard, if there is any and GetEchoMode() is kNormal.
Definition: TGTextEntry.cxx:933
TGTextEntry::SetEnabled
void SetEnabled(Bool_t flag=kTRUE)
Definition: TGTextEntry.h:149
TGTextEntry::GetForeground
Pixel_t GetForeground() const
Return frame foreground color.
Definition: TGTextEntry.h:157
ETextJustification
ETextJustification
Definition: TGWidget.h:22
TGTextEntry::GetDefaultSize
virtual TGDimension GetDefaultSize() const
Return the default / minimal size of the widget.
Definition: TGTextEntry.cxx:374
TGTextEntry::SetEchoMode
virtual void SetEchoMode(EEchoMode mode=kNormal)
The echo modes available are:
Definition: TGTextEntry.cxx:662
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
Event_t
Event structure.
Definition: GuiTypes.h:174
TGTextEntry::fSelectionOn
Bool_t fSelectionOn
Definition: TGTextEntry.h:36
TGFrame::GetWhitePixel
static Pixel_t GetWhitePixel()
Get white pixel value.
Definition: TGFrame.cxx:709
TGTextEntry::GetDisplayText
TString GetDisplayText() const
Returns the text that's currently displayed.
Definition: TGTextEntry.cxx:477
TGTextEntry::GetText
const char * GetText() const
Definition: TGTextEntry.h:119
TGTextEntry::SetForegroundColor
virtual void SetForegroundColor(Pixel_t fore)
Definition: TGTextEntry.h:156
TGTextEntry::IsFrameDrawn
Bool_t IsFrameDrawn() const
Definition: TGTextEntry.h:128
TGTextEntry::HandleSelectionRequest
virtual Bool_t HandleSelectionRequest(Event_t *event)
Handle request to send current clipboard contents to requestor window.
Definition: TGTextEntry.cxx:1498
TGTextEntry::GetCursorPosition
Int_t GetCursorPosition() const
Definition: TGTextEntry.h:113
TGTextEntry::SetCursorPosition
virtual void SetCursorPosition(Int_t pos)
Set the cursor position to newPos.
Definition: TGTextEntry.cxx:718
TGTextEntry::GetMaxLength
Int_t GetMaxLength() const
Definition: TGTextEntry.h:118
TGFont
Encapsulate fonts used in the GUI system.
Definition: TGFont.h:140
TGTextEntry::CursorOutLeft
virtual void CursorOutLeft()
This signal is emitted when cursor is going out of left side.
Definition: TGTextEntry.cxx:434
TGTextEntry::DrawBorder
virtual void DrawBorder()
Draw the border of the text entry widget.
Definition: TGTextEntry.cxx:1050
TGTextEntry::Backspace
void Backspace()
Deletes the character on the left side of the text cursor and moves the cursor one position to the le...
Definition: TGTextEntry.cxx:873
TGTextEntry::CursorWordForward
void CursorWordForward(Bool_t mark=kFALSE)
Moves the cursor one word to the right.
Definition: TGTextEntry.cxx:845
TGTextEntry::fCursorX
Int_t fCursorX
Definition: TGTextEntry.h:38
TGTextEntry::~TGTextEntry
virtual ~TGTextEntry()
Delete a text entry widget.
Definition: TGTextEntry.cxx:303
TGTextEntry::IsEdited
Bool_t IsEdited() const
Definition: TGTextEntry.h:129
TGTextEntry::GetDefaultGC
static const TGGC & GetDefaultGC()
Return default graphics context.
Definition: TGTextEntry.cxx:1799
TGTextBuffer::GetString
const char * GetString() const
Definition: TGTextBuffer.h:34
TGTextEntry::Clear
void Clear(Option_t *option="")
Clears up the text entry.
Definition: TGTextEntry.cxx:972
TGTextEntry::ScrollByChar
virtual void ScrollByChar()
Shift position of cursor by one character.
Definition: TGTextEntry.cxx:1585
int
TGTextEntry::HandleCrossing
virtual Bool_t HandleCrossing(Event_t *event)
Handle mouse crossing event.
Definition: TGTextEntry.cxx:1382
TGTextEntry::HandleSelection
virtual Bool_t HandleSelection(Event_t *event)
Handle text selection event.
Definition: TGTextEntry.cxx:1478