YTextEntry Class Reference

Implementation of the TextEntry and Password widgets Notice: Derived classes need to check opt.passwordMode! More...

#include <YTextEntry.h>

Inheritance diagram for YTextEntry:

YWidget List of all members.

Public Member Functions

 YTextEntry (const YWidgetOpt &opt, const YCPString &label)
virtual char * widgetClass ()
YCPValue changeWidget (const YCPSymbol &property, const YCPValue &newvalue)
YCPValue queryWidget (const YCPSymbol &property)
virtual void setText (const YCPString &text)=0
virtual YCPString getText ()=0
virtual void setLabel (const YCPString &label)
YCPString getLabel ()
virtual void setValidChars (const YCPString &validChars)
virtual void setInputMaxLength (const YCPInteger &numberOfChars)
YCPString getValidChars ()
const char * shortcutProperty ()
const char * userInputProperty ()
bool passwordMode () const

Protected Attributes

YCPString label
YCPString validChars
bool _passwordMode

Private Member Functions

virtual void saveUserInput (YMacroRecorder *macroRecorder)

Detailed Description

Implementation of the TextEntry and Password widgets Notice: Derived classes need to check opt.passwordMode!

TextEntry Password

TextEntry1.ycp TextEntry2.ycp TextEntry3.ycp TextEntry4.ycp TextEntry5.ycp TextEntry6.ycp Password1.ycp Password2.ycp TextEntry-setInputMaxLength.ycp

This widget is a one line text entry field with a label above it. An initial text can be provided.

Note:
You can and should set a keyboard shortcut within the label. When the user presses the hotkey, the corresponding text entry widget will get the keyboard focus.


Constructor & Destructor Documentation

YTextEntry::YTextEntry const YWidgetOpt opt,
const YCPString label
 

Creates a new text entry with a label and an initial text.


Member Function Documentation

YCPValue YTextEntry::changeWidget const YCPSymbol property,
const YCPValue newvalue
[virtual]
 

Implements the ui command changeWidget for the widget specific properties.

Reimplemented from YWidget.

YCPString YTextEntry::getLabel  ) 
 

Get the current label of the text entry. This method cannot be overidden. The value of the label cannot be changed other than by calling setLabel, i.e. not by the ui. Therefore setLabel stores the current label in label.

virtual YCPString YTextEntry::getText  )  [pure virtual]
 

get the text currently entered in the text entry

YCPString YTextEntry::getValidChars  ) 
 

Get the valid input characters.

bool YTextEntry::passwordMode  )  const [inline]
 

Returns 'true' if this text entry is in password mode, i.e. there should be no on-screen echo or only a '*' for each character typed

YCPValue YTextEntry::queryWidget const YCPSymbol property  )  [virtual]
 

Implements the ui command changeWidget for the widget specific properties.

Reimplemented from YWidget.

void YTextEntry::saveUserInput YMacroRecorder macroRecorder  )  [private, virtual]
 

Save the widget's user input to a macro recorder. Intentionally declared as "private" so all macro recording internals are handled by the abstract libyui level, not by a specific UI.

Reimplemented from YWidget.

void YTextEntry::setInputMaxLength const YCPInteger numberOfChars  )  [virtual]
 

Specify the amount of characters which can be inserted.

Overload this to limit the input.

void YTextEntry::setLabel const YCPString label  )  [virtual]
 

change the label of the text entry. Overload this, but call YTextEntry::setLabel at the end of your own function.

virtual void YTextEntry::setText const YCPString text  )  [pure virtual]
 

Set the text in the entry to a new value

void YTextEntry::setValidChars const YCPString validChars  )  [virtual]
 

Change the valid input characters.

Overload this, but call YTextEntry::setValidChars at the end of your own method.

const char* YTextEntry::shortcutProperty  )  [inline, virtual]
 

The name of the widget property that holds the keyboard shortcut. Inherited from YWidget.

Reimplemented from YWidget.

const char* YTextEntry::userInputProperty  )  [inline, virtual]
 

The name of the widget property that will return user input. Inherited from YWidget.

Reimplemented from YWidget.

virtual char* YTextEntry::widgetClass  )  [inline, virtual]
 

Returns a descriptive name of this widget class for logging, debugging etc.

Reimplemented from YWidget.


Member Data Documentation

bool YTextEntry::_passwordMode [protected]
 

Flag: password mode (-> true) or plain text entry?

YCPString YTextEntry::label [protected]
 

The text entry label

YCPString YTextEntry::validChars [protected]
 

Valid input characters


The documentation for this class was generated from the following files:
Generated on Fri Jun 16 18:07:47 2006 for yast2-core by  doxygen 1.4.6