TEWidget Class Reference

Visible screen contents. More...

List of all members.

Classes

struct  _dragInfo

Public Types

enum  { SCRNONE = 0, SCRLEFT = 1, SCRRIGHT = 2 }
enum  { BELLSYSTEM = 0, BELLNOTIFY = 1, BELLVISUAL = 2, BELLNONE = 3 }

Public Slots

void setSelectionEnd ()
void copyClipboard ()
void pasteClipboard ()
void pasteSelection ()
void onClearSelection ()

Signals

void keyPressedSignal (TQKeyEvent *e)
void mouseSignal (int cb, int cx, int cy)
void changedFontMetricSignal (int height, int width)
void changedContentSizeSignal (int height, int width)
void changedHistoryCursor (int value)
void configureRequest (TEWidget *, int state, int x, int y)
void copySelectionSignal ()
void clearSelectionSignal ()
void beginSelectionSignal (const int x, const int y, const bool columnmode)
void extendSelectionSignal (const int x, const int y)
void endSelectionSignal (const bool preserve_line_breaks)
void isBusySelecting (bool)
void testIsSelected (const int x, const int y, bool &selected)
void sendStringToEmu (const char *)

Public Member Functions

 TEWidget (TQWidget *parent=0, const char *name=0)
void setBlendColor (const QRgb color)
void setDefaultBackColor (const TQColor &color)
TQColor getDefaultBackColor ()
const ColorEntrygetColorTable () const
void setColorTable (const ColorEntry table[])
void setScrollbarLocation (int loc)
int getScrollbarLocation ()
void setScroll (int cursor, int lines)
void doScroll (int lines)
bool blinkingCursor ()
void setBlinkingCursor (bool blink)
void setCtrlDrag (bool enable)
bool ctrlDrag ()
void setCutToBeginningOfLine (bool enable)
bool cutToBeginningOfLine ()
void setLineSpacing (uint)
uint lineSpacing () const
void emitSelection (bool useXselection, bool appendReturn)
void emitText (TQString text)
void setImage (const ca *const newimg, int lines, int columns)
void setLineWrapped (TQBitArray line_wrapped)
void setCursorPos (const int curx, const int cury)
int Lines ()
int Columns ()
int fontHeight ()
int fontWidth ()
void calcGeometry ()
void propagateSize ()
void updateImageSize ()
void setSize (int cols, int lins)
void setFixedSize (int cols, int lins)
TQSize sizeHint () const
void setWordCharacters (TQString wc)
TQString wordCharacters ()
void setBellMode (int mode)
int bellMode ()
void Bell (bool visibleSession, TQString message)
void setSelection (const TQString &t)
virtual void setFont (const TQFont &)
TQFont getVTFont ()
void setVTFont (const TQFont &font)
void setMouseMarks (bool on)
void setTerminalSizeHint (bool on)
bool isTerminalSizeHint ()
void setTerminalSizeStartup (bool on)
void setBidiEnabled (bool set)
bool isBidiEnabled ()
void print (TQPainter &paint, bool friendly, bool exact)
void setRim (int rim)

Static Public Member Functions

static void setAntialias (bool enable)
static bool antialias ()
static void setStandalone (bool standalone)
static bool standalone ()

Protected Types

enum  DragState { diNone, diPending, diDragging }

Protected Slots

void scrollChanged (int value)
void blinkEvent ()
void blinkCursorEvent ()

Protected Member Functions

virtual void styleChange (TQStyle &)
bool eventFilter (TQObject *, TQEvent *)
bool event (TQEvent *)
void drawTextFixed (TQPainter &paint, int x, int y, TQString &str, const ca *attr)
void drawAttrStr (TQPainter &paint, TQRect rect, TQString &str, const ca *attr, bool pm, bool clear)
void paintEvent (TQPaintEvent *)
void paintContents (TQPainter &paint, const TQRect &rect, bool pm=false)
void resizeEvent (TQResizeEvent *)
void fontChange (const TQFont &font)
void frameChanged ()
void mouseDoubleClickEvent (TQMouseEvent *ev)
void mousePressEvent (TQMouseEvent *)
void mouseReleaseEvent (TQMouseEvent *)
void mouseMoveEvent (TQMouseEvent *)
void extendSelection (TQPoint pos)
void wheelEvent (TQWheelEvent *)
void focusInEvent (TQFocusEvent *)
void focusOutEvent (TQFocusEvent *)
bool focusNextPrevChild (bool next)
void dragEnterEvent (TQDragEnterEvent *event)
void dropEvent (TQDropEvent *event)
void doDrag ()
virtual int charClass (UINT16) const
void clearImage ()
void mouseTripleClickEvent (TQMouseEvent *ev)
void imStartEvent (TQIMEvent *e)
void imComposeEvent (TQIMEvent *e)
void imEndEvent (TQIMEvent *e)

Protected Attributes

struct TEWidget::_dragInfo dragInfo

Friends

class Konsole

Detailed Description

Visible screen contents.

This class is responsible to map the `image' of a terminal emulation to the display. All the dependency of the emulation to a specific GUI or toolkit is localized here. Further, this widget has no knowledge about being part of an emulation, it simply work within the terminal emulation framework by exposing size and key events and by being ordered to show a new image.

See also:
TEScreen
Emulation

Member Function Documentation

void TEWidget::drawAttrStr ( TQPainter &  paint,
TQRect  rect,
TQString &  str,
const ca attr,
bool  pm,
bool  clear 
) [protected]

attributed string draw primitive

TQFont TEWidget::getVTFont (  )  [inline]

Returns the font used to draw characters in the display

void TEWidget::mousePressEvent ( TQMouseEvent *  ev  )  [protected]

Three different operations can be performed using the mouse, and the routines in this section serve all of them:

1) The press/release events are exposed to the application 2) Marking (press and move left button) and Pasting (press middle button) 3) The right mouse button is used from the configuration menu

NOTE: During the marking process we attempt to keep the cursor within the bounds of the text as being displayed by setting the mouse position whenever the mouse has left the text area.

Two reasons to do so: 1) QT does not allow the `grabMouse' to confine-to the TEWidget. Thus a `XGrapPointer' would have to be used instead. 2) Even if so, this would not help too much, since the text area of the TEWidget is normally not identical with it's bounds.

The disadvantage of the current handling is, that the mouse can visibly leave the bounds of the widget and is then moved back. Because of the current construction, and the reasons mentioned above, we cannot do better without changing the overall construction.

void TEWidget::paintEvent ( TQPaintEvent *  pe  )  [protected]

The difference of this routine vs. the `setImage' is, that the drawing does not include a difference analysis between the old and the new image. Instead, the internal image is used and the painting bound by the PaintEvent box.

void TEWidget::setCursorPos ( const int  curx,
const int  cury 
)

Set XIM Position

void TEWidget::setFont ( const TQFont &   )  [virtual]

Reimplemented. Has no effect. Use setVTFont() to change the font used to draw characters in the display.

void TEWidget::setImage ( const ca *const   newimg,
int  lines,
int  columns 
)

The image can only be set completely.

The size of the new image may or may not match the size of the widget.

void TEWidget::setVTFont ( const TQFont &  font  ) 

Sets the font used to draw the display. Has no effect if font is larger than the size of the display itself.


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

Generated on Sat Oct 2 23:01:12 2010 by  doxygen 1.6.1