ROOT » GUI » GUI » TGTextEntry

class TGTextEntry: public TGFrame, public TGWidget


TGTextEntry

A TGTextEntry is a one line text input widget.

Changing text in the text entry widget will generate the event:
kC_TEXTENTRY, kTE_TEXTCHANGED, widget id, 0.
Hitting the enter key will generate:
kC_TEXTENTRY, kTE_ENTER, widget id, 0.
Hitting the tab key will generate:
kC_TEXTENTRY, kTE_TAB, widget id, 0.

This widget has the behaviour e.g. of the "Location" field in
netscape. That includes handling Control/Shift key modifiers and
scrolling the text.


 enum TGTextEntry::EEchoMode

 This enum type describes the ways in which TGTextEntry can display
 its contents. The currently defined values are:

/*
  • kNormal - display characters as they are entered. This is the default.
  • kNoEcho - do not display anything.
  • kPassword - display asterisks instead of the characters actually entered.
*/
 See also SetEchoMode(), GetEchoMode().

 enum TGTextEntry::EInsertMode

 This enum type describes the way how typed characters are
 inserted in the text entry. This mode is switched by "Insert" key.

/*
  • kInsert - typed character are inserted (cursor has shape of short line).
  • kReplace - typed characters substitute already typed ones (cursor has the shape of filled rectangle).
*/

 enum TGWidget::ETextJustification

 This enum type (defined in TGWidget.h) describes the text alignment modes.
 These modes are valid untill text fits the frame width

/*
  • kTextLeft - left-side text alignment
  • kTextRight - right-side text alignment
  • kTextCenterX - center text alignment
*/


 The key press event handler converts a key press to some line editor action.
 Here are the default key bindings:

/*
  • Left Arrow Move the cursor one character leftwards. Scroll the text when cursor is out of frame.
  • Right Arrow Move the cursor one character rightwards Scroll the text when cursor is out of frame.
  • Backspace Deletes the character on the left side of the text cursor and moves the cursor one position to the left. If a text has been marked by the user (e.g. by clicking and dragging) the cursor will be put at the beginning of the marked text and the marked text will be removed.
  • Home Moves the text cursor to the left end of the line. If mark is TRUE text will be marked towards the first position, if not any marked text will be unmarked if the cursor is moved.
  • End Moves the text cursor to the right end of the line. If mark is TRUE text will be marked towards the last position, if not any marked text will be unmarked if the cursor is moved.
  • Delete Deletes the character on the right side of the text cursor. If a text has been marked by the user (e.g. by clicking and dragging) the cursor will be put at the beginning of the marked text and the marked text will be removed.
  • Insert Switches character insert mode.
  • Shift - Left Arrow Mark text one character leftwards
  • Shift - Right Arrow Mark text one character rightwards
  • Control - Left Arrow Move the cursor one word leftwards
  • Control - Right Arrow Move the cursor one word rightwards.
  • Control - Shift - Left Arrow Mark text one word leftwards
  • Control - Shift - Right Arrow Mark text one word rightwards
  • Control-A Move the cursor to the beginning of the line
  • Control-B Move the cursor one character leftwards
  • Control-C Copy the marked text to the clipboard.
  • Control-D Delete the character to the right of the cursor
  • Control-E Move the cursor to the end of the line
  • Control-F Move the cursor one character rightwards
  • Control-H Delete the character to the left of the cursor
  • Control-K Delete marked text if any or delete all characters to the right of the cursor
  • Control-U Delete all characters on the line
  • Control-V Paste the clipboard text into line edit.
  • Control-X Cut the marked text, copy to clipboard.
  • Control-Y Paste the clipboard text into line edit.
All other keys with valid ASCII codes insert themselves into the line. */


Function Members (Methods)

public:
virtual~TGTextEntry()
voidTObject::AbstractMethod(const char* method) const
virtual voidTGFrame::Activate(Bool_t)
voidTGFrame::AddInput(UInt_t emask)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidAppendText(const char* text)
static Bool_tTQObject::AreAllSignalsBlocked()
Bool_tTQObject::AreSignalsBlocked() const
virtual voidTGWidget::Associate(const TGWindow* w)
voidBackspace()
static Bool_tTQObject::BlockAllSignals(Bool_t b)
Bool_tTQObject::BlockSignals(Bool_t b)
virtual voidTObject::Browse(TBrowser* b)
virtual voidTGFrame::ChangeBackground(Pixel_t back)
virtual voidTQObject::ChangedBy(const char* method)SIGNAL
virtual voidTGFrame::ChangeOptions(UInt_t options)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidClear(Option_t* option = "")
virtual TObject*TObject::Clone(const char* newname = "") const
voidTQObject::CollectClassSignalLists(TList& list, TClass* cls)
virtual Int_tTObject::Compare(const TObject* obj) const
Bool_tTQObject::Connect(const char* signal, const char* receiver_class, void* receiver, const char* slot)
static Bool_tTQObject::Connect(TQObject* sender, const char* signal, const char* receiver_class, void* receiver, const char* slot)
static Bool_tTQObject::Connect(const char* sender_class, const char* signal, const char* receiver_class, void* receiver, const char* slot)
virtual voidTQObject::Connected(const char*)
Bool_tTGFrame::Contains(Int_t x, Int_t y) const
virtual voidTObject::Copy(TObject& object) const
voidCursorLeft(Bool_t mark = kFALSE, Int_t steps = 1)
virtual voidCursorOutDown()SIGNAL
virtual voidCursorOutLeft()SIGNAL
virtual voidCursorOutRight()SIGNAL
virtual voidCursorOutUp()SIGNAL
voidCursorRight(Bool_t mark = kFALSE, Int_t steps = 1)
voidCursorWordBackward(Bool_t mark = kFALSE)
voidCursorWordForward(Bool_t mark = kFALSE)
voidCut()
voidDel()
virtual voidTGFrame::Delete(Option_t* = "")
virtual voidTGFrame::DeleteWindow()
voidDeselect()
virtual voidTQObject::Destroyed()SIGNAL
virtual voidTGWindow::DestroySubwindows()
virtual voidTGWindow::DestroyWindow()
Bool_tTQObject::Disconnect(const char* signal = 0, void* receiver = 0, const char* slot = 0)
static Bool_tTQObject::Disconnect(TQObject* sender, const char* signal = 0, void* receiver = 0, const char* slot = 0)
static Bool_tTQObject::Disconnect(const char* class_name, const char* signal, void* receiver = 0, const char* slot = 0)
virtual voidTQObject::Disconnected(const char*)
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidDoubleClicked()SIGNAL
virtual voidTObject::Draw(Option_t* option = "")
virtual voidDrawBorder()
virtual voidTGFrame::DrawClass() const
virtual TObject*TGFrame::DrawClone(Option_t* = "") const
virtual voidTGFrame::DrawCopy(Handle_t, Int_t, Int_t)
virtual voidTGFrame::Dump() const
voidTQObject::Emit(const char* signal)
voidTQObject::Emit(const char* signal, Long_t* paramArr)
voidTQObject::Emit(const char* signal, const char* params)
voidTQObject::Emit(const char* signal, Double_t param)
voidTQObject::Emit(const char* signal, Long_t param)
voidTQObject::Emit(const char* signal, Long64_t param)
voidTQObject::Emit(const char* signal, Bool_t param)
voidTQObject::Emit(const char* signal, Char_t param)
voidTQObject::Emit(const char* signal, UChar_t param)
voidTQObject::Emit(const char* signal, Short_t param)
voidTQObject::Emit(const char* signal, UShort_t param)
voidTQObject::Emit(const char* signal, Int_t param)
voidTQObject::Emit(const char* signal, UInt_t param)
voidTQObject::Emit(const char* signal, ULong_t param)
voidTQObject::Emit(const char* signal, ULong64_t param)
voidTQObject::Emit(const char* signal, Float_t param)
voidTQObject::EmitVA(const char* signal, Int_t nargs, va_list va)
voidTQObject::EmitVA<>(const char* signal_name, Int_t)
voidEnd(Bool_t mark = kFALSE)
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
ETextJustificationGetAlignment() const
virtual Pixel_tTGFrame::GetBackground() const
static const TGGC&TGFrame::GetBckgndGC()
static const TGGC&TGFrame::GetBlackGC()
static Pixel_tTGFrame::GetBlackPixel()
Int_tTGFrame::GetBorderWidth() const
TGTextBuffer*GetBuffer() const
TGClient*TGObject::GetClient() const
const char*TGWidget::GetCommand() const
static Int_tTGWindow::GetCounter()
Int_tGetCursorPosition() const
static FontStruct_tGetDefaultFontStruct()
static Pixel_tTGFrame::GetDefaultFrameBackground()
static const TGGC&GetDefaultGC()
virtual UInt_tTGFrame::GetDefaultHeight() const
static Pixel_tTGFrame::GetDefaultSelectedBackground()
virtual TGDimensionGetDefaultSize() const
virtual UInt_tTGFrame::GetDefaultWidth() const
TStringGetDisplayText() const
virtual TDNDData*TGFrame::GetDNDData(Atom_t)
virtual Int_tTGFrame::GetDragType() const
virtual Option_t*TObject::GetDrawOption() const
virtual Int_tTGFrame::GetDropType() const
static Long_tTObject::GetDtorOnly()
TGTextEntry::EEchoModeGetEchoMode() const
virtual UInt_tTGWindow::GetEditDisabled() const
UInt_tTGFrame::GetEventMask() const
FontStruct_tGetFontStruct() const
virtual Pixel_tGetForeground() const
TGFrameElement*TGFrame::GetFrameElement() const
virtual TGFrame*TGFrame::GetFrameFromPoint(Int_t x, Int_t y)
UInt_tTGFrame::GetHeight() const
static const TGGC&TGFrame::GetHilightGC()
virtual const char*TObject::GetIconName() const
Handle_tTGObject::GetId() const
TGTextEntry::EInsertModeGetInsertMode() const
TList*TQObject::GetListOfClassSignals() const
TList*TQObject::GetListOfConnections() const
TList*TQObject::GetListOfSignals() const
virtual const TGWindow*TGWindow::GetMainFrame() const
TStringGetMarkedText() const
UInt_tTGFrame::GetMaxHeight() const
Int_tGetMaxLength() const
UInt_tTGFrame::GetMaxWidth() const
UInt_tTGFrame::GetMinHeight() const
UInt_tTGFrame::GetMinWidth() const
virtual const char*TGWindow::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual UInt_tTGFrame::GetOptions() const
const TGWindow*TGWindow::GetParent() const
static const TGGC&TGFrame::GetShadowGC()
TGDimensionTGFrame::GetSize() const
const char*GetText() const
Pixel_tGetTextColor() const
virtual const char*GetTitle() const
virtual TGToolTip*GetToolTip() const
virtual UInt_tTObject::GetUniqueID() const
static const TGGC&TGFrame::GetWhiteGC()
static Pixel_tTGFrame::GetWhitePixel()
UInt_tTGFrame::GetWidth() const
Int_tTGFrame::GetX() const
Int_tTGFrame::GetY() const
virtual Bool_tHandleButton(Event_t* event)
virtual Bool_tTGFrame::HandleClientMessage(Event_t* event)
virtual Bool_tTGFrame::HandleColormapChange(Event_t*)
virtual Bool_tHandleConfigureNotify(Event_t* event)
virtual Bool_tHandleCrossing(Event_t* event)
virtual Bool_tTGFrame::HandleDNDDrop(TDNDData*)
virtual Atom_tTGFrame::HandleDNDEnter(Atom_t*)
virtual Bool_tTGFrame::HandleDNDFinished()
virtual Bool_tTGFrame::HandleDNDLeave()
virtual Atom_tTGFrame::HandleDNDPosition(Int_t, Int_t, Atom_t, Int_t, Int_t)
virtual Bool_tHandleDoubleClick(Event_t* event)
virtual Bool_tTGFrame::HandleDragDrop(TGFrame*, Int_t, Int_t, TGLayoutHints*)
virtual Bool_tTGFrame::HandleDragEnter(TGFrame*)
virtual Bool_tTGFrame::HandleDragLeave(TGFrame*)
virtual Bool_tTGFrame::HandleDragMotion(TGFrame*)
virtual Bool_tTGFrame::HandleEvent(Event_t* event)
virtual Bool_tTGWindow::HandleExpose(Event_t* event)
virtual Bool_tHandleFocusChange(Event_t* event)
virtual Bool_tTGWindow::HandleIdleEvent(TGIdleHandler*)
virtual Bool_tHandleKey(Event_t* event)
virtual Bool_tHandleMotion(Event_t* event)
virtual Bool_tHandleSelection(Event_t* event)
virtual Bool_tHandleSelectionClear(Event_t* event)
virtual Bool_tHandleSelectionRequest(Event_t* event)
virtual Bool_tHandleTimer(TTimer* t)
virtual Bool_tTQObject::HasConnection(const char* signal_name) const
Bool_tTGWidget::HasFocus() const
virtual ULong_tTGObject::Hash() const
Bool_tHasMarkedText() const
Bool_tHasOwnFont() const
virtual voidTQObject::HighPriority(const char* signal_name, const char* slot_name = 0)
voidHome(Bool_t mark = kFALSE)
virtual voidTGWindow::IconifyWindow()
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidInsert(const char*)
virtual voidInsertText(const char* text, Int_t pos)
virtual voidTGFrame::Inspect() const
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTGFrame::IsActive() const
virtual Bool_tTGFrame::IsComposite() const
Bool_tTGFrame::IsDNDSource() const
Bool_tTGFrame::IsDNDTarget() const
virtual Bool_tTGFrame::IsEditable() const
Bool_tIsEdited() const
Bool_tTGWidget::IsEnabled() const
virtual Bool_tTGObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tIsFrameDrawn() const
virtual Bool_tTGFrame::IsLayoutBroken() const
virtual Bool_tTGWindow::IsMapped()
virtual Bool_tTGWindow::IsMapSubwindows() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidLayout()
virtual voidTGWindow::LowerWindow()
virtual voidTQObject::LowPriority(const char* signal_name, const char* slot_name = 0)
virtual voidTObject::ls(Option_t* option = "") const
virtual voidTGFrame::MapRaised()
virtual voidTGFrame::MapSubwindows()
virtual voidTGFrame::MapWindow()
voidMarkWord(Int_t pos)
Int_tMaxMark() const
voidTObject::MayNotUse(const char* method) const
virtual voidTQObject::Message(const char* msg)SIGNAL
Int_tMinMark() const
virtual voidTGFrame::Move(Int_t x, Int_t y)
virtual voidTGFrame::MoveResize(Int_t x, Int_t y, UInt_t w = 0, UInt_t h = 0)
virtual Int_tTGWindow::MustCleanup() const
voidNewMark(Int_t pos)
virtual Bool_tTObject::Notify()
virtual Int_tTQObject::NumberOfConnections() const
virtual Int_tTQObject::NumberOfSignals() const
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
voidTObject::operator delete(void* ptr)
voidTObject::operator delete(void* ptr, void* vp)
voidTObject::operator delete[](void* ptr)
voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTGFrame::Print(Option_t* option = "") const
virtual voidTGFrame::ProcessedConfigure(Event_t* event)SIGNAL
virtual voidTGFrame::ProcessedEvent(Event_t* event)SIGNAL
virtual Bool_tTGFrame::ProcessMessage(Long_t, Long_t, Long_t)
virtual voidTGWindow::RaiseWindow()
virtual Int_tTObject::Read(const char* name)
virtual voidTGFrame::ReallyDelete()
virtual voidTObject::RecursiveRemove(TObject* obj)
voidRemove()
voidTGFrame::RemoveInput(UInt_t emask)
virtual voidRemoveText(Int_t start, Int_t end)
virtual voidTGFrame::ReparentWindow(const TGWindow* p, Int_t x = 0, Int_t y = 0)
virtual voidTGWindow::RequestFocus()
voidTObject::ResetBit(UInt_t f)
virtual voidTGFrame::Resize(TGDimension size)
virtual voidTGFrame::Resize(UInt_t w = 0, UInt_t h = 0)
virtual voidReturnPressed()SIGNAL
virtual voidTGObject::SaveAs(const char* filename = "", Option_t* option = "") const
virtual voidSavePrimitive(ostream& out, Option_t* option = "")
voidTGFrame::SaveUserColor(ostream& out, Option_t*)
virtual voidSelectAll()
virtual voidTGFrame::SendMessage(const TGWindow* w, Long_t msg, Long_t parm1, Long_t parm2)
virtual voidSetAlignment(ETextJustification mode = kTextLeft)
virtual voidTGFrame::SetBackgroundColor(Pixel_t back)
virtual voidTGWindow::SetBackgroundPixmap(Pixmap_t pixmap)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTGFrame::SetCleanup(Int_t = kLocalCleanup)
virtual voidTGWidget::SetCommand(const char* command)
virtual voidSetCursorPosition(Int_t pos)
virtual voidSetDefaultSize(UInt_t w, UInt_t h)
voidTGFrame::SetDNDSource(Bool_t onoff)
voidTGFrame::SetDNDTarget(Bool_t onoff)
virtual voidTGFrame::SetDragType(Int_t type)
virtual voidTGFrame::SetDrawOption(Option_t* = "")
virtual voidTGFrame::SetDropType(Int_t type)
static voidTObject::SetDtorOnly(void* obj)
virtual voidSetEchoMode(TGTextEntry::EEchoMode mode = kNormal)
virtual voidTGFrame::SetEditable(Bool_t)
virtual voidTGWindow::SetEditDisabled(UInt_t on = kEditDisable)
voidSetEdited(Bool_t flag = kTRUE)
voidSetEnabled(Bool_t flag = kTRUE)TOGGLE GETTER
virtual voidSetFocus()
virtual voidSetFont(TGFont* font, Bool_t local = kTRUE)
virtual voidSetFont(FontStruct_t font, Bool_t local = kTRUE)
virtual voidSetFont(const char* fontName, Bool_t local = kTRUE)
virtual voidSetForegroundColor(Pixel_t fore)
virtual voidSetFrameDrawn(Bool_t flag = kTRUE)
voidTGFrame::SetFrameElement(TGFrameElement* fe)
virtual voidTGFrame::SetHeight(UInt_t h)
virtual voidSetInsertMode(TGTextEntry::EInsertMode mode = kInsert)
virtual voidTGFrame::SetLayoutBroken(Bool_t = kTRUE)
virtual voidTGWindow::SetMapSubwindows(Bool_t)
virtual voidTGFrame::SetMaxHeight(UInt_t h)
virtual voidSetMaxLength(Int_t maxlen)MENU
virtual voidTGFrame::SetMaxWidth(UInt_t w)
virtual voidTGFrame::SetMinHeight(UInt_t h)
virtual voidTGFrame::SetMinWidth(UInt_t w)
virtual voidTGWindow::SetName(const char* name)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTGFrame::SetSize(const TGDimension& s)
virtual voidSetState(Bool_t state)
virtual voidSetText(const char* text, Bool_t emit = kTRUE)MENU
virtual voidSetTextColor(Pixel_t color, Bool_t local = kTRUE)
virtual voidSetTextColor(TColor* color, Bool_t local = kTRUE)
virtual voidSetTitle(const char* label)
virtual voidSetToolTipText(const char* text, Long_t delayms = 500)MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidTGFrame::SetWidth(UInt_t w)
virtual voidTGWindow::SetWindowName(const char* name = 0)
virtual voidTGFrame::SetX(Int_t x)
virtual voidTGFrame::SetY(Int_t y)
virtual voidShiftTabPressed()SIGNAL
virtual voidShowMembers(TMemberInspector& insp) const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
virtual voidTabPressed()SIGNAL
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTextChanged(const char* text = 0)SIGNAL
TGTextEntry(const TGWindow* parent = 0, const char* text = 0, Int_t id = -1)
TGTextEntry(const TString& contents, const TGWindow* parent, Int_t id = -1)
TGTextEntry(const TGWindow* p, TGTextBuffer* text, Int_t id = -1, GContext_t norm = GetDefaultGC()(), FontStruct_t font = GetDefaultFontStruct(), UInt_t option = kSunkenFrame | kDoubleBorder, Pixel_t back = GetWhitePixel())
virtual voidTGFrame::UnmapWindow()
virtual voidTObject::UseCurrentStyle()
Bool_tTGWidget::WantFocus() const
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
Int_tTGWidget::WidgetId() const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
static Int_tTQObject::CheckConnectArgs(TQObject* sender, TClass* sender_class, const char* signal, TClass* receiver_class, const char* slot)
Int_tTGWidget::ClearFlags(Int_t flags)
static TStringTQObject::CompressName(const char* method_name)
static Bool_tTQObject::ConnectToClass(TQObject* sender, const char* signal, TClass* receiver_class, void* receiver, const char* slot)
static Bool_tTQObject::ConnectToClass(const char* sender_class, const char* signal, TClass* receiver_class, void* receiver, const char* slot)
voidCopyText() const
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
virtual voidDoRedraw()
virtual voidTGFrame::Draw3dRectangle(UInt_t type, Int_t x, Int_t y, UInt_t w, UInt_t h)
Int_tGetCharacterIndex(Int_t xcoord)
static const TGGC&GetDefaultSelectedBackgroundGC()
static const TGGC&GetDefaultSelectedGC()
static Time_tTGFrame::GetLastClick()
TStringTGFrame::GetOptionString() const
const TGResourcePool*TGFrame::GetResourcePool() const
virtual void*TGFrame::GetSender()
virtual const char*TQObject::GetSenderClassName() const
virtual voidInit()
virtual Bool_tIsCursorOutOfFrame()
voidTObject::MakeZombie()
voidPaste()
virtual voidPastePrimary(Window_t wid, Atom_t property, Bool_t del)
virtual voidScrollByChar()
Int_tTGWidget::SetFlags(Int_t flags)
virtual voidTGFrame::StartGuiBuilding(Bool_t on = kTRUE)
virtual voidUpdateOffset()

Data Members

public:
static TObject::(anonymous)TObject::kBitMask
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static TGWindow::EEditModeTGWindow::kEditDisable
static TGWindow::EEditModeTGWindow::kEditDisableBtnEnable
static TGWindow::EEditModeTGWindow::kEditDisableEvents
static TGWindow::EEditModeTGWindow::kEditDisableGrab
static TGWindow::EEditModeTGWindow::kEditDisableHeight
static TGWindow::EEditModeTGWindow::kEditDisableKeyEnable
static TGWindow::EEditModeTGWindow::kEditDisableLayout
static TGWindow::EEditModeTGWindow::kEditDisableResize
static TGWindow::EEditModeTGWindow::kEditDisableWidth
static TGWindow::EEditModeTGWindow::kEditEnable
static TObject::EStatusBitsTObject::kHasUUID
static TGTextEntry::EInsertModekInsert
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::(anonymous)TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static TObject::EStatusBitsTObject::kMustCleanup
static TObject::EStatusBitsTObject::kNoContextMenu
static TGTextEntry::EEchoModekNoEcho
static TGTextEntry::EEchoModekNormal
static TObject::(anonymous)TObject::kNotDeleted
static TObject::EStatusBitsTObject::kObjInCanvas
static TObject::(anonymous)TObject::kOverwrite
static TGTextEntry::EEchoModekPassword
static TGTextEntry::EInsertModekReplace
static TObject::(anonymous)TObject::kSingleKey
static TObject::(anonymous)TObject::kWriteDelete
static TObject::(anonymous)TObject::kZombie
protected:
ETextJustificationfAlignment*OPTION={GetMethod="GetAlignment";SetMethod="SetAlignment";Items=(kTextLeft="Left",kTextCenterX="Center",kTextRight="Right")}*
Pixel_tTGFrame::fBackgroundframe background color
Int_tTGFrame::fBorderWidthframe border width
TGClient*TGObject::fClientConnection to display server
Atom_tfClipboardclipboard property
TStringTGWidget::fCommandcommand to be executed
TBlinkTimer*fCurBlinkcursor blink timer
Int_tfCursorIXcursor position in characters
Bool_tfCursorOncursor status (on/off)
Int_tfCursorXcursor position in pixels
Int_tTGFrame::fDNDStateEDNDFlags
UInt_tfDefHeightdefault height
UInt_tfDefWidthdefault width
TGTextEntry::EEchoModefEchoMode*OPTION={GetMethod="GetEchoMode";SetMethod="SetEchoMode";Items=(kNormal="Normal",kNoEcho="No Echo",kPassword="Password")}*
UInt_tTGWindow::fEditDisabledflags used for "guibuilding"
Bool_tfEditedkFALSE, if the line edit's contents have not been changed since the construction
Int_tfEndIXselection end in characters
Int_tfEndXselection end in pixels
UInt_tTGFrame::fEventMaskcurrenty active event mask
TGFrameElement*TGFrame::fFEpointer to frame element
FontStruct_tfFontStructtext font
Bool_tfFrameDrawnkTRUE draw itself inside a two-pixel frame, kFALSE draw without any frame
Bool_tfHasOwnFontkTRUE - font defined locally, kFALSE - globally
UInt_tTGFrame::fHeightframe height
Handle_tTGObject::fIdX11/Win32 Window identifier
TGTextEntry::EInsertModefInsertMode*OPTION={GetMethod="GetInsertMode";SetMethod="SetInsertMode";Items=(kInsert="Insert",kReplace="Replace")}*
TList*TQObject::fListOfConnections! list of connections to this object
TList*TQObject::fListOfSignals! list of signals from this object
UInt_tTGFrame::fMaxHeightmaximal frame height
Int_tfMaxLenmaximum length of text
UInt_tTGFrame::fMaxWidthmaximal frame width
UInt_tTGFrame::fMinHeightminimal frame height
UInt_tTGFrame::fMinWidthminimal frame width
const TGWindow*TGWidget::fMsgWindowwindow which handles widget events
TStringTGWindow::fNamename of the window used in SavePrimitive()
Bool_tTGWindow::fNeedRedrawkTRUE if window needs to be redrawn
TGGCfNormGCnormal drawing context
Int_tfOffsetstart position of text (in pixels)
UInt_tTGFrame::fOptionsframe options
const TGWindow*TGWindow::fParentParent window
TGGCfSelGCselected text drawing context
GContext_tfSelbackGCselected background drawing context
Bool_tfSelectionOnselection status (on/off)
Bool_tTQObject::fSignalsBlocked! flag used for suppression of signals
Int_tfStartIXselection begin in characters
Int_tfStartXselection begin in pixels
TGTextBuffer*fTexttext buffer
TGToolTip*fTipassociated tooltip
Int_tTGWidget::fWidgetFlagswidget status flags (OR of EWidgetStatus)
Int_tTGWidget::fWidgetIdthe widget id (used for event processing)
UInt_tTGFrame::fWidthframe width
Int_tTGFrame::fXframe x position
Int_tTGFrame::fYframe y position
static Bool_tTQObject::fgAllSignalsBlockedflag used for suppression of all signals
static const TGGC*TGFrame::fgBckgndGC
static const TGGC*TGFrame::fgBlackGC
static Pixel_tTGFrame::fgBlackPixel
static TString*fgClipboardTextapplication clipboard text
static Int_tTGWindow::fgCountercounter of created windows in SavePrimitive
static Window_tTGFrame::fgDbw
static Int_tTGFrame::fgDbx
static Int_tTGFrame::fgDby
static const TGFont*fgDefaultFont
static Pixel_tTGFrame::fgDefaultFrameBackground
static const TGGC*fgDefaultGC
static Pixel_tTGFrame::fgDefaultSelectedBackground
static const TGGC*fgDefaultSelectedBackgroundGC
static const TGGC*fgDefaultSelectedGC
static const TGGC*TGFrame::fgHilightGC
static Bool_tTGFrame::fgInit
static UInt_tTGFrame::fgLastButton
static Time_tTGFrame::fgLastClick
static const TGGC*TGFrame::fgShadowGC
static UInt_tTGFrame::fgUserColor
static const TGGC*TGFrame::fgWhiteGC
static Pixel_tTGFrame::fgWhitePixel
static TGFrame::(anonymous)TGFrame::kDeleteWindowCalled

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TGTextEntry(const TGWindow* p, TGTextBuffer* text, Int_t id = -1, GContext_t norm = GetDefaultGC()(), FontStruct_t font = GetDefaultFontStruct(), UInt_t option = kSunkenFrame | kDoubleBorder, Pixel_t back = GetWhitePixel())
 Create a text entry widget. It will adopt the TGTextBuffer object
 (i.e. the text buffer will be deleted by the text entry widget).
TGTextEntry(const TGWindow* parent = 0, const char* text = 0, Int_t id = -1)
 Simple text entry constructor.
TGTextEntry(const TString& contents, const TGWindow* parent, Int_t id = -1)
 Simple test entry constructor. Notice TString argument comes before the
 parent argument (to make this ctor different from the first one taking a
 const char*).
~TGTextEntry()
 Delete a text entry widget.
void Init()
 Do default initialization.
TGDimension GetDefaultSize() const
 Return the default / minimal size of the widget.
void SetDefaultSize(UInt_t w, UInt_t h)
 Set the default / minimal size of the widget.
void ReturnPressed()
 This signal is emitted when the return or enter key is pressed.
void ShiftTabPressed()
 This signal is emitted when <SHIFT> and <TAB> keys are pressed.
void TabPressed()
 This signal is emitted when the <TAB> key is pressed.
void TextChanged(const char* text = 0)
 This signal is emitted every time the text has changed.
void CursorOutLeft()
 This signal is emitted when cursor is going out of left side.
void CursorOutRight()
 This signal is emitted when cursor is going out of right side.
void CursorOutUp()
 This signal is emitted when cursor is going out of upper side.
void CursorOutDown()
 This signal is emitted when cursor is going out of bottom side.
void DoubleClicked()
 This signal is emitted when widget is double clicked.
TString GetDisplayText() const
 Returns the text that's currently displayed.  This is normally
 the same as GetText(), but can be e.g.
 "*****" if EEchoMode is kPassword or
 ""      if it is kNoEcho.
void SetState(Bool_t state)
 Set state of widget. If kTRUE=enabled, kFALSE=disabled.
Int_t GetCharacterIndex(Int_t xcoord)
 Returns the index of the character to whose left edge xcoord is closest.
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 without any frame if enable is
 kFALSE. The default is kTRUE.
void SetAlignment(ETextJustification mode = kTextLeft)
 Sets the alignment of the text entry.
 Possible values are kTextLeft(default), kTextRight, kTextCenterX.
 See also GetAlignment().
void SetInsertMode(TGTextEntry::EInsertMode mode = kInsert)
 Sets the mode how characters are entered to the text entry.
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.
 If necessary the text is truncated to fit MaxLength().
 See also  GetText().
void SetMaxLength(Int_t maxlen)
 Set the maximum length of the text in the editor.  If the text is
 currently too long, it is chopped off at the limit. Any marked text will
 be unmarked.  The cursor position is set to 0 and the first part of the
 string is shown.
 See  also GetMaxLength().
void SetEchoMode(TGTextEntry::EEchoMode mode = kNormal)
 The echo modes available are:

  • kNormal - display characters as they are entered. This is the default.
  • kNoEcho - do not display anything.
  • kPassword - display asterisks instead of the characters actually entered.
 It is always possible to cut and paste any marked text;  only the widget's own
 display is affected.
 See also GetEchoMode(), GetDisplayText().
TString GetMarkedText() const
 Returns the text marked by the user (e.g. by clicking and
 dragging), or zero if no text is marked.
 See also HasMarkedText().
void NewMark(Int_t pos)
 New character mark at position pos.
 See also SetCursorPosition().
void SetCursorPosition(Int_t pos)
 Set the cursor position to newPos.
 See also NewMark().
void MarkWord(Int_t pos)
 Marks the word nearest to cursor position.
 See also HandleDoubleClick().
void Insert(const char* )
 Removes any currently selected text, inserts newText,
 sets it as the new contents of the text entry.
void CursorRight(Bool_t mark = kFALSE, Int_t steps = 1)
 Moves the cursor rightwards one or more characters.
 See also CursorLeft().
void CursorLeft(Bool_t mark = kFALSE, Int_t steps = 1)
 Moves the cursor leftwards one or more characters.
 See also CursorRight().
void CursorWordForward(Bool_t mark = kFALSE)
 Moves the cursor one word to the right.  If mark is kTRUE, the text
 is marked.
 See also CursorWordBackward().
void CursorWordBackward(Bool_t mark = kFALSE)
 Moves the cursor one word to the left.  If mark is kTRUE, the text
 is marked.
 See also CursorWordForward().
void Backspace()
 Deletes the character on the left side of the text cursor and moves the
 cursor one position to the left. If a text has been marked by the user
 (e.g. by clicking and dragging) the cursor will be put at the beginning
 of the marked text and the marked text will be removed.
 See also  Del().
void Del()
 Deletes the character on the right side of the text cursor. If a text
 has been marked by the user (e.g. by clicking and dragging) the cursor
 will be put at the beginning of the marked text and the marked text will
 be removed.
 See also Backspace().
void Remove()
 Deletes all characters on the right side of the cursor.
 See also Del() Backspace().
void CopyText() const
 Copies the marked text to the clipboard, if there is any and
 GetEchoMode() is kNormal.
 See also  Cut() Paste().
void Paste()
 Inserts text at the cursor position, deleting any
 previous marked text.
 See also CopyText() Cut().
void Cut()
 Copies the marked text to the clipboard and deletes it, if there is any.
 See also CopyText() Paste().
void Clear(Option_t* option = "")
 Clears up the text entry.
void Home(Bool_t mark = kFALSE)
 Moves the text cursor to the left end of the line. If mark is kTRUE text
 will be marked towards the first position, if not any marked text will
 be unmarked if the cursor is moved.
 See also End().
void End(Bool_t mark = kFALSE)
 Moves the text cursor to the right end of the line. If mark is kTRUE text
 will be marked towards the last position, if not any marked text will
 be unmarked if the cursor is moved.
 See also Home().
void SelectAll()
 Selects all text (i.e. marks it) and moves the cursor to the
 end. Useful when a default value has been inserted. If the user
 types before clicking on the widget the selected text will be
 erased.
void Deselect()
 Deselects all text (i.e. removes marking) and leaves the cursor at the
 current position.
void DrawBorder()
 Draw the border of the text entry widget.
void DoRedraw()
 Draw the text entry widget.
Bool_t HandleKey(Event_t* event)
 The key press event handler converts a key press to some line editor
 action. Here are the default key bindings:

  • Left Arrow Move the cursor one character leftwards. Scroll the text when cursor is out of frame.
  • Right Arrow Move the cursor one character rightwards Scroll the text when cursor is out of frame.
  • Backspace Deletes the character on the left side of the text cursor and moves the cursor one position to the left. If a text has been marked by the user (e.g. by clicking and dragging) the cursor will be put at the beginning of the marked text and the marked text will be removed.
  • Home Moves the text cursor to the left end of the line. If mark is TRUE text will be marked towards the first position, if not any marked text will be unmarked if the cursor is moved.
  • End Moves the text cursor to the right end of the line. If mark is TRUE text will be marked towards the last position, if not any marked text will be unmarked if the cursor is moved.
  • Delete Deletes the character on the right side of the text cursor. If a text has been marked by the user (e.g. by clicking and dragging) the cursor will be put at the beginning of the marked text and the marked text will be removed.
  • Insert Switches character insert mode.
  • Shift - Left Arrow Mark text one character leftwards
  • Shift - Right Arrow Mark text one character rightwards
  • Control - Left Arrow Move the cursor one word leftwards
  • Control - Right Arrow Move the cursor one word rightwards.
  • Control - Shift - Left Arrow Mark text one word leftwards
  • Control - Shift - Right Arrow Mark text one word rightwards
  • Control-A Move the cursor to the beginning of the line
  • Control-B Move the cursor one character leftwards
  • Control-C Copy the marked text to the clipboard.
  • Control-D Delete the character to the right of the cursor
  • Control-E Move the cursor to the end of the line
  • Control-F Move the cursor one character rightwards
  • Control-H Delete the character to the left of the cursor
  • Control-K Delete marked text if any or delete all characters to the right of the cursor
  • Control-U Delete all characters on the line
  • Control-V Paste the clipboard text into line edit.
  • Control-X Cut the marked text, copy to clipboard.
  • Control-Y Paste the clipboard text into line edit.
  All other keys with valid ASCII codes insert themselves into the line.
Bool_t HandleButton(Event_t* event)
 Handle mouse button event in text entry widget.
Bool_t HandleCrossing(Event_t* event)
 Handle mouse crossing event.
Bool_t HandleMotion(Event_t* event)
 Handle mouse motion event in the text entry widget.
Bool_t HandleDoubleClick(Event_t* event)
 Handle mouse double click event in the text entry widget.
Bool_t HandleConfigureNotify(Event_t* event)
 Handles resize events for this widget.
Bool_t HandleFocusChange(Event_t* event)
 Handle focus change event in text entry widget.
Bool_t HandleSelection(Event_t* event)
 Handle text selection event.
Bool_t HandleSelectionClear(Event_t* event)
 Handle selection clear event.
Bool_t HandleSelectionRequest(Event_t* event)
 Handle request to send current clipboard contents to requestor window.
void PastePrimary(Window_t wid, Atom_t property, Bool_t del)
 Paste text from selection (either primary or cut buffer) into
 text entry widget.
Bool_t HandleTimer(TTimer* t)
 Handle cursor blink timer.
Bool_t IsCursorOutOfFrame()
 Returns kTRUE if cursor is out of frame.
void ScrollByChar()
 Shift position of cursor by one character.
void UpdateOffset()
 Updates start text offset according GetAlignment() mode,
 if cursor is out of frame => scroll the text.
 See also SetAlignment() and ScrollByChar().
void SetToolTipText(const char* text, Long_t delayms = 500)
 Set tool tip text associated with this text entry. The delay is in
 milliseconds (minimum 250). To remove tool tip call method with
 text = 0.
void SetFocus()
 Set focus to this text entry.
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.
 If necessary the text is truncated to fit MaxLength().
 See also GetText(), SetText(), AppendText(), RemoveText().
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 line.
 If necessary the text is truncated to fit MaxLength().
 See also GetText(), InsertText(), SetText(), RemoveText().
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.
 See also GetText(), InsertText(), SetText(), AppendText().
void SetFont(FontStruct_t font, Bool_t local = kTRUE)
 Changes text font.
 If local is kTRUE font is changed locally.
void SetFont(const char* fontName, Bool_t local = kTRUE)
 Changes text font specified by name.
 If local is kTRUE font is changed locally.
void SetFont(TGFont* font, Bool_t local = kTRUE)
 Changes text font specified by pointer to TGFont object.
 If local is kTRUE font is changed locally.
void SetTextColor(Pixel_t color, Bool_t local = kTRUE)
 Changes text color.
 If local is true color is changed locally.
void SetTextColor(TColor* color, Bool_t local = kTRUE)
 Changes text color.
 If local is true color is changed locally.
FontStruct_t GetDefaultFontStruct()
 Return default font structure in use.
const TGGC & GetDefaultGC()
 Return default graphics context.
const TGGC & GetDefaultSelectedGC()
 Return selection graphics context.
const TGGC & GetDefaultSelectedBackgroundGC()
 Return graphics context for highlighted frame background.
void SavePrimitive(ostream& out, Option_t* option = "")
 Save a text entry widget as a C++ statement(s) on output stream out.
TGTextEntry(const TGTextEntry& )
TGTextEntry& operator=(const TGTextEntry& )
ETextJustification GetAlignment() const
{ return fAlignment; }
TGTextBuffer * GetBuffer() const
{ return fText; }
Int_t GetCursorPosition() const
{ return fCursorIX; }
EEchoMode GetEchoMode() const
{ return fEchoMode; }
EInsertMode GetInsertMode() const
{ return fInsertMode; }
Int_t GetMaxLength() const
{ return fMaxLen; }
const char * GetText() const
{ return fText->GetString(); }
TGToolTip * GetToolTip() const
{ return fTip; }
const char * GetTitle() const
{ return GetText(); }
Bool_t HasMarkedText() const
{ return fSelectionOn && (fStartIX != fEndIX); }
Pixel_t GetTextColor() const
{ return fNormGC.GetForeground(); }
FontStruct_t GetFontStruct() const
{ return fFontStruct; }
Bool_t IsFrameDrawn() const
{ return fFrameDrawn; }
Bool_t IsEdited() const
{ return fEdited; }
void Layout()
Int_t MaxMark() const
{ return fStartIX > fEndIX ? fStartIX : fEndIX; }
Int_t MinMark() const
{ return fStartIX < fEndIX ? fStartIX : fEndIX; }
void SetEnabled(Bool_t flag = kTRUE)
{ SetState( flag ); }
void SetEdited(Bool_t flag = kTRUE)
{ fEdited = flag; }
void SetTitle(const char* label)
{ SetText(label); }
void SetForegroundColor(Pixel_t fore)
{ SetTextColor(fore, kFALSE); }
Pixel_t GetForeground() const
{ return fNormGC.GetForeground(); }
Bool_t HasOwnFont() const
{ return fHasOwnFont; }