Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

UEdit Class Reference

make a Container object editable. More...

#include <uedit.hpp>

Inheritance diagram for UEdit:

UProp UBrick List of all members.

Public Member Functions

 UEdit (bool is_editable=true)
void setEditable (bool=true)
bool isEditable () const
const UStrgetCaretStr () const
const UStrgetCaretStr (int &pos) const
 returns the UStr that contains the caret and the position of the caret in this string
void setCaretStr (UStr *, int pos)
 sets the UStr that contains the caret and the position of the caret in this string
UStrgetPreviousStr (UGroup *par) const
UStrgetNextStr (UGroup *par) const
virtual void update ()
 updates graphics.
bool nextChar (UGroup *par, bool update_views, bool is_flowview)
bool previousChar (UGroup *par, bool update_views, bool is_flowview)
void deletePreviousChar (UGroup *par, bool update_views, bool is_flowview)
void deleteChar ()
void setCaretStr (UStr *, int pos, bool update_view, bool no_scrolling)
UEditenableReturn (bool=true)
 OBSOLETE, no effect.

Friends

UEdituedit (bool is_editable=true)
 creator shortcut (same as *new UEdit()).

Detailed Description

make a Container object editable.

exemple:

   UStr& str = ustr("abcd");
   UBox& box = ubox(uedit() + str);
 
will make string 'str' editable inside container 'box'


Member Function Documentation

const UStr * UEdit::getCaretStr int &  pos  )  const
 

returns the UStr that contains the caret and the position of the caret in this string

Notes:

  • returns null if the caret is not set
  • a Box can contain several UStr. The returned position is relative to the string that contains the caret

void UEdit::setCaretStr UStr ,
int  pos
 

sets the UStr that contains the caret and the position of the caret in this string

Notes:

  • pos = 0 means beginning of string; pos = -1 end of string
  • a Box can contain several UStr. The position is relative to the string that contains the caret (ie. the fisrt arg. of setCaretStr)
  • this UStr must be in the same Box as the UEdit


The documentation for this class was generated from the following files:
Generated on Thu Mar 3 06:40:22 2005 for Ubit[Eric.Lecolinet@enst.fr] by  doxygen 1.4.1