Diana Software
Public Member Functions | Private Attributes | List of all members
QGDropDownBox Class Reference

Drop down box with tab-complete. More...

Inheritance diagram for QGDropDownBox:

Public Member Functions

 QGDropDownBox (const TGWindow *p=0)
 Constructor. More...
 
virtual ~QGDropDownBox ()
 Destructor. More...
 
void AddEntryS (const std::string &entry)
 Add entry. More...
 
void EnableTabCompletion ()
 Enable tab completion. More...
 
std::vector< std::string > FindMatches (const std::string &s)
 Find a match to a string. More...
 
std::string GetCommonText (const std::vector< std::string > &v)
 Get common text. More...
 
void HandleReturnPressed ()
 Handle tab pressed. More...
 
void QGHandleEvent (Event_t *event)
 Handle event. More...
 
void SetReturnTarget (TGTextEntry *textBox)
 Set return target. More...
 
void TabComplete ()
 Tab complete. More...
 

Private Attributes

std::vector< std::string > fEntries
 Collection of entries. More...
 
TGTextEntry * fReturnTarget
 Text box to change to when return is pressed. More...
 

Detailed Description

Drop down box with tab-complete.

Author
Adam Bryant (adam_.nosp@m.brya.nosp@m.nt@be.nosp@m.rkel.nosp@m.ey.ed.nosp@m.u)

Definition at line 17 of file QGDropDownBox.hh.

Constructor & Destructor Documentation

◆ QGDropDownBox()

QGDropDownBox::QGDropDownBox ( const TGWindow *  p = 0)

Constructor.

Definition at line 9 of file QGDropDownBox.cc.

◆ ~QGDropDownBox()

QGDropDownBox::~QGDropDownBox ( )
virtual

Destructor.

Definition at line 17 of file QGDropDownBox.cc.

Member Function Documentation

◆ AddEntryS()

void QGDropDownBox::AddEntryS ( const std::string &  entry)

◆ EnableTabCompletion()

void QGDropDownBox::EnableTabCompletion ( )

◆ FindMatches()

vector< string > QGDropDownBox::FindMatches ( const std::string &  s)

Find a match to a string.

Definition at line 32 of file QGDropDownBox.cc.

References fEntries.

Referenced by TabComplete().

◆ GetCommonText()

string QGDropDownBox::GetCommonText ( const std::vector< std::string > &  v)

Get common text.

Definition at line 42 of file QGDropDownBox.cc.

References N.

Referenced by TabComplete().

◆ HandleReturnPressed()

void QGDropDownBox::HandleReturnPressed ( )

Handle tab pressed.

Definition at line 58 of file QGDropDownBox.cc.

References fReturnTarget.

◆ QGHandleEvent()

void QGDropDownBox::QGHandleEvent ( Event_t *  event)

Handle event.

Definition at line 65 of file QGDropDownBox.cc.

◆ SetReturnTarget()

void QGDropDownBox::SetReturnTarget ( TGTextEntry *  textBox)

◆ TabComplete()

void QGDropDownBox::TabComplete ( )

Tab complete.

Definition at line 87 of file QGDropDownBox.cc.

References FindMatches(), and GetCommonText().

Member Data Documentation

◆ fEntries

std::vector<std::string> QGDropDownBox::fEntries
private

Collection of entries.

Definition at line 51 of file QGDropDownBox.hh.

Referenced by AddEntryS(), and FindMatches().

◆ fReturnTarget

TGTextEntry* QGDropDownBox::fReturnTarget
private

Text box to change to when return is pressed.

Definition at line 54 of file QGDropDownBox.hh.

Referenced by HandleReturnPressed(), and SetReturnTarget().


The documentation for this class was generated from the following files: