12 #ifndef ROOT_TGTextEntry
13 #define ROOT_TGTextEntry
37 #ifndef ROOT_TGTextBuffer
147 virtual void Insert(
const char *);
void CursorRight(Bool_t mark=kFALSE, Int_t steps=1)
Moves the cursor rightwards one or more characters.
static const TGGC & GetDefaultGC()
Return default graphics context.
static const TGGC * fgDefaultSelectedBackgroundGC
virtual Bool_t HandleSelectionRequest(Event_t *event)
Handle request to send current clipboard contents to requestor window.
virtual void DrawBorder()
Draw the border of the text entry widget.
static const TGGC & GetDefaultSelectedBackgroundGC()
Return graphics context for highlighted frame background.
virtual void Init()
Do default initialization.
virtual void ShiftTabPressed()
This signal is emitted when and keys are pressed.
virtual void SetAlignment(ETextJustification mode=kTextLeft)
Sets the alignment of the text entry.
virtual void TabPressed()
This signal is emitted when the key is pressed.
virtual Bool_t HandleSelectionClear(Event_t *event)
Handle selection clear event.
EInsertMode GetInsertMode() const
virtual TGDimension GetDefaultSize() const
Return the default / minimal size of the widget.
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
virtual Bool_t HandleSelection(Event_t *event)
Handle text selection event.
Pixel_t GetForeground() const
Return frame foreground color.
static Pixel_t GetWhitePixel()
Get white pixel value.
virtual Bool_t HandleConfigureNotify(Event_t *event)
Handles resize events for this widget.
virtual void SetTextColor(Pixel_t color, Bool_t local=kTRUE)
Changes text color.
virtual void SetTitle(const char *label)
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...
virtual void UpdateOffset()
Updates start text offset according GetAlignment() mode, if cursor is out of frame => scroll the text...
Int_t GetMaxLength() const
virtual void SetInsertMode(EInsertMode mode=kInsert)
Sets the mode how characters are entered to the text entry.
Int_t GetCursorPosition() const
static const TGGC & GetDefaultSelectedGC()
Return selection graphics context.
void CursorWordBackward(Bool_t mark=kFALSE)
Moves the cursor one word to the left.
virtual void SetState(Bool_t state)
Set state of widget. If kTRUE=enabled, kFALSE=disabled.
virtual TGToolTip * GetToolTip() const
virtual void SelectAll()
Selects all text (i.e.
void Deselect()
Deselects all text (i.e.
#define ClassDef(name, id)
void MarkWord(Int_t pos)
Marks the word nearest to cursor position.
virtual void ReturnPressed()
This signal is emitted when the return or enter key is pressed.
ETextJustification fAlignment
void CopyText() const
Copies the marked text to the clipboard, if there is any and GetEchoMode() is kNormal.
const char * GetText() const
void Cut()
Copies the marked text to the clipboard and deletes it, if there is any.
virtual void SetFocus()
Set focus to this text entry.
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion event in the text entry widget.
const char * GetString() const
EEchoMode GetEchoMode() const
virtual Bool_t HandleTimer(TTimer *t)
Handle cursor blink timer.
void Del()
Deletes the character on the right side of the text cursor.
static const TGGC * fgDefaultSelectedGC
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event in text entry widget.
void NewMark(Int_t pos)
New character mark at position pos.
void End(Bool_t mark=kFALSE)
Moves the text cursor to the right end of the line.
virtual void SetMaxLength(Int_t maxlen)
Set the maximum length of the text in the editor.
virtual void SetDefaultSize(UInt_t w, UInt_t h)
Set the default / minimal size of the widget.
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...
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...
virtual Bool_t HandleKey(Event_t *event)
The key press event handler converts a key press to some line editor action.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a text entry widget as a C++ statement(s) on output stream out.
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.
void SetEdited(Bool_t flag=kTRUE)
static FontStruct_t GetDefaultFontStruct()
Return default font structure in use.
Int_t GetCharacterIndex(Int_t xcoord)
Returns the index of the character to whose left edge xcoord is closest.
FontStruct_t GetFontStruct() const
virtual Bool_t HandleDoubleClick(Event_t *event)
Handle mouse double click event in the text entry widget.
Pixel_t GetTextColor() const
Handles synchronous and a-synchronous timer events.
virtual void TextChanged(const char *text=0)
This signal is emitted every time the text has changed.
void Remove()
Deletes all characters on the right side of the cursor.
static const TGGC * fgDefaultGC
virtual const char * GetTitle() const
Returns title of object.
Pixel_t GetForeground() const
virtual void CursorOutRight()
This signal is emitted when cursor is going out of right side.
static const TGFont * fgDefaultFont
TString GetDisplayText() const
Returns the text that's currently displayed.
virtual Bool_t HandleFocusChange(Event_t *event)
Handle focus change event in text entry widget.
virtual void CursorOutUp()
This signal is emitted when cursor is going out of upper side.
virtual void SetForegroundColor(Pixel_t fore)
void SetEnabled(Bool_t flag=kTRUE)
void CursorLeft(Bool_t mark=kFALSE, Int_t steps=1)
Moves the cursor leftwards one or more characters.
virtual Bool_t IsCursorOutOfFrame()
Returns kTRUE if cursor is out of frame.
virtual void Insert(const char *)
Removes any currently selected text, inserts newText, sets it as the new contents of the text entry...
virtual void SetCursorPosition(Int_t pos)
Set the cursor position to newPos.
virtual void CursorOutDown()
This signal is emitted when cursor is going out of bottom side.
virtual void DoRedraw()
Draw the text entry widget.
virtual void DoubleClicked()
This signal is emitted when widget is double clicked.
virtual void CursorOutLeft()
This signal is emitted when cursor is going out of left side.
The color creation and management class.
ETextJustification GetAlignment() const
TGTextEntry & operator=(const TGTextEntry &)
Bool_t HasOwnFont() const
virtual void SetFont(TGFont *font, Bool_t local=kTRUE)
Changes text font specified by pointer to TGFont object.
Bool_t HasMarkedText() const
virtual void ScrollByChar()
Shift position of cursor by one character.
TGTextEntry(const TGTextEntry &)
virtual Bool_t HandleCrossing(Event_t *event)
Handle mouse crossing event.
void Backspace()
Deletes the character on the left side of the text cursor and moves the cursor one position to the le...
TGTextBuffer * GetBuffer() const
void CursorWordForward(Bool_t mark=kFALSE)
Moves the cursor one word to the right.
void Paste()
Inserts text at the cursor position, deleting any previous marked text.
virtual ~TGTextEntry()
Delete a text entry widget.
TString GetMarkedText() const
Returns the text marked by the user (e.g.
void Home(Bool_t mark=kFALSE)
Moves the text cursor to the left end of the line.
Bool_t IsFrameDrawn() const
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...
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...
void Clear(Option_t *option="")
Clears up the text entry.
virtual void SetEchoMode(EEchoMode mode=kNormal)
The echo modes available are: Begin_Html.
double norm(double *x, double *p)
static TString * fgClipboardText