Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

NCRichText Class Reference

#include <NCRichText.h>

Inheritance diagram for NCRichText:

YRichText NCPadWidget YWidget NCWidget NCSchrollCB tnode< NCWidget * > NCursesError List of all members.

Public Member Functions

 NCRichText (NCWidget *parent, const YWidgetOpt &opt, const YCPString &text)
virtual ~NCRichText ()
virtual long nicesize (YUIDimension dim)
virtual void setSize (long newwidth, long newheight)
virtual void setLabel (const YCPString &nlabel)
virtual NCursesEvent wHandleInput (wint_t key)
virtual void setText (const YCPString &ntext)
virtual void setEnabling (bool do_bv)
virtual bool setKeyboardFocus ()

Protected Member Functions

virtual const char * location () const
virtual void wRedraw ()
virtual void wRecoded ()
virtual NCPadCreatePad ()
virtual void DrawPad ()
virtual void HScroll (unsigned total, unsigned visible, unsigned start)
virtual void VScroll (unsigned total, unsigned visible, unsigned start)
virtual bool handleInput (wint_t key)

Private Types

enum  TOKEN {
  T_UNKNOWN = 0x0000, T_IGNORE = 0x0001, T_BR = 0x0002, T_PAR = 0x0004,
  T_LEVEL = 0x0008, T_LI = 0x0010, T_PLAIN = 0x0012, T_BOLD = 0x0100,
  T_IT = 0x0200, T_TT = 0x0400, T_ANC = 0x0800, T_HEAD = 0x1000
}

Private Member Functions

NCRichTextoperator= (const NCRichText &)
 NCRichText (const NCRichText &)
void PadChangeLevel (bool down, int tag)
void PadSetLevel ()
size_t textWidth (wstring wstr)
void openAnchor (wstring args)
void closeAnchor ()
void arm (unsigned i)
void disarm ()
void PadSetAttr ()
void DrawPlainPad ()
void DrawHTMLPad ()
void PadNL ()
void PadBOL ()
void PadWS (const bool tab=false)
void PadTXT (const wchar_t *sch, const unsigned len)
void PadPlainTXT (const wchar_t *sch, const unsigned len)
bool PadTOKEN (const wchar_t *sch, const wchar_t *&ech)

Static Private Member Functions

static const wstring entityLookup (const std::wstring &val_r)
static const wstring filterEntities (const std::wstring &text)

Private Attributes

NCstring text
bool plainText
unsigned textwidth
unsigned cl
unsigned cc
unsigned cindent
bool atbol
bool preTag
unsigned Tattr
stack< int > liststack
Anchor canchor
vector< Anchoranchors
unsigned armed
unsigned vScrollFirstvisible
unsigned vScrollNextinvisible

Static Private Attributes

static std::map< std::wstring,
std::wstring > 
_charentity
static const unsigned Tfontmask = 0xff00
static const unsigned listindent = 4
static const wstring listleveltags
static const bool showLinkTarget = false

Friends

std::ostream & operator<< (std::ostream &STREAM, const NCRichText &OBJ)

Classes

class  Anchor

Member Enumeration Documentation

enum NCRichText::TOKEN [private]
 

Enumerator:
T_UNKNOWN 
T_IGNORE 
T_BR 
T_PAR 
T_LEVEL 
T_LI 
T_PLAIN 
T_BOLD 
T_IT 
T_TT 
T_ANC 
T_HEAD 


Constructor & Destructor Documentation

NCRichText::NCRichText const NCRichText  )  [private]
 

NCRichText::NCRichText NCWidget parent,
const YWidgetOpt opt,
const YCPString text
 

NCRichText::~NCRichText  )  [virtual]
 


Member Function Documentation

void NCRichText::arm unsigned  i  )  [private]
 

void NCRichText::closeAnchor  )  [private]
 

NCPad * NCRichText::CreatePad  )  [protected, virtual]
 

Reimplemented from NCPadWidget.

void NCRichText::disarm  )  [inline, private]
 

void NCRichText::DrawHTMLPad  )  [private]
 

void NCRichText::DrawPad  )  [protected, virtual]
 

Reimplemented from NCPadWidget.

void NCRichText::DrawPlainPad  )  [private]
 

const wstring NCRichText::entityLookup const std::wstring &  val_r  )  [static, private]
 

Lookup and return replacement for a character entity. Expects the leading '&' and trailing ';'<.code> to be stripped from val_r. Returns NULL, if the character entity should not be replaced.

const wstring NCRichText::filterEntities const std::wstring &  text  )  [static, private]
 

Lookup and replace all replacements for a character entity.

bool NCRichText::handleInput wint_t  key  )  [protected, virtual]
 

Reimplemented from NCPadWidget.

void NCRichText::HScroll unsigned  total,
unsigned  visible,
unsigned  start
[protected, virtual]
 

Reimplemented from NCPadWidget.

virtual const char* NCRichText::location  )  const [inline, protected, virtual]
 

Reimplemented from NCPadWidget.

long NCRichText::nicesize YUIDimension  dim  )  [virtual]
 

Implements YWidget.

void NCRichText::openAnchor wstring  args  )  [private]
 

NCRichText& NCRichText::operator= const NCRichText  )  [private]
 

void NCRichText::PadBOL  )  [inline, private]
 

void NCRichText::PadChangeLevel bool  down,
int  tag
[private]
 

void NCRichText::PadNL  )  [inline, private]
 

void NCRichText::PadPlainTXT const wchar_t *  sch,
const unsigned  len
[private]
 

void NCRichText::PadSetAttr  )  [inline, private]
 

void NCRichText::PadSetLevel  )  [private]
 

bool NCRichText::PadTOKEN const wchar_t *  sch,
const wchar_t *&  ech
[private]
 

void NCRichText::PadTXT const wchar_t *  sch,
const unsigned  len
[inline, private]
 

void NCRichText::PadWS const bool  tab = false  )  [inline, private]
 

virtual void NCRichText::setEnabling bool  do_bv  )  [inline, virtual]
 

Pure virtual to make shure every widget implements it. Necessary to make shure that UI requests via YWidget::setEnabling perform, and behave the same way as direct calls to NCWidget::setEnabling.

Defaut implementation is provided, and for most derived widgets it's ok to simply use it.

Reimplemented from NCPadWidget.

virtual bool NCRichText::setKeyboardFocus  )  [inline, virtual]
 

Reimplemented from YWidget.

void NCRichText::setLabel const YCPString nlabel  )  [virtual]
 

void NCRichText::setSize long  newwidth,
long  newheight
[virtual]
 

Reimplemented from YWidget.

void NCRichText::setText const YCPString ntext  )  [virtual]
 

Reimplemented from YRichText.

size_t NCRichText::textWidth wstring  wstr  )  [private]
 

void NCRichText::VScroll unsigned  total,
unsigned  visible,
unsigned  start
[protected, virtual]
 

Reimplemented from NCPadWidget.

NCursesEvent NCRichText::wHandleInput wint_t  key  )  [virtual]
 

Reimplemented from NCWidget.

void NCRichText::wRecoded  )  [protected, virtual]
 

Reimplemented from NCPadWidget.

void NCRichText::wRedraw  )  [protected, virtual]
 

Reimplemented from NCPadWidget.


Friends And Related Function Documentation

std::ostream& operator<< std::ostream &  STREAM,
const NCRichText OBJ
[friend]
 


Member Data Documentation

std::map< std::wstring, std::wstring > NCRichText::_charentity [static, private]
 

Lookup map for character entities (e.g. '>'). Initialized and used by entityLookup.

vector<Anchor> NCRichText::anchors [private]
 

unsigned NCRichText::armed [private]
 

bool NCRichText::atbol [private]
 

Anchor NCRichText::canchor [private]
 

unsigned NCRichText::cc [private]
 

unsigned NCRichText::cindent [private]
 

unsigned NCRichText::cl [private]
 

const unsigned NCRichText::listindent = 4 [static, private]
 

const wstring NCRichText::listleveltags [static, private]
 

stack<int> NCRichText::liststack [private]
 

bool NCRichText::plainText [private]
 

bool NCRichText::preTag [private]
 

const bool NCRichText::showLinkTarget = false [static, private]
 

unsigned NCRichText::Tattr [private]
 

NCstring NCRichText::text [private]
 

Reimplemented from YRichText.

unsigned NCRichText::textwidth [private]
 

const unsigned NCRichText::Tfontmask = 0xff00 [static, private]
 

unsigned NCRichText::vScrollFirstvisible [private]
 

unsigned NCRichText::vScrollNextinvisible [private]
 


The documentation for this class was generated from the following files:
Generated on Wed Sep 14 10:52:55 2005 for yast2-ncurses by  doxygen 1.4.4