Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
editor Struct Reference

#include <textedit.hpp>

Public Member Functions

 editor (const char *name, int mode, const char *initval)
 
 ~editor ()
 
void clear (const char *init="")
 
void setfile (const char *fname)
 
void load ()
 
void save ()
 
void mark (bool enable)
 
void selectall ()
 
bool region (int &sx, int &sy, int &ex, int &ey)
 
bool region ()
 
editlinecurrentline ()
 
void copyselectionto (editor *b)
 
char * tostring ()
 
char * selectiontostring ()
 
void removelines (int start, int count)
 
bool del ()
 
void insert (char ch)
 
void insert (const char *s)
 
void insertallfrom (editor *b)
 
void key (int code)
 
void input (const char *str, int len)
 
void hit (int hitx, int hity, bool dragged)
 
int limitscrolly ()
 
void draw (int x, int y, int color, bool hit)
 

Public Attributes

int mode
 
bool active
 
bool rendered
 
const char * name
 
const char * filename
 
int cx
 
int cy
 
int mx
 
int my
 
int maxx
 
int maxy
 
int scrolly
 
bool linewrap
 
int pixelwidth
 
int pixelheight
 
vector< editlinelines
 

Constructor & Destructor Documentation

editor::editor ( const char *  name,
int  mode,
const char *  initval 
)
inline
editor::~editor ( )
inline

References clear(), DELETEA, filename, and name.

Member Function Documentation

void editor::clear ( const char *  init = "")
inline
void editor::copyselectionto ( editor b)
inline
editline& editor::currentline ( )
inline
bool editor::del ( )
inline
void editor::draw ( int  x,
int  y,
int  color,
bool  hit 
)
inline
void editor::hit ( int  hitx,
int  hity,
bool  dragged 
)
inline
void editor::input ( const char *  str,
int  len 
)
inline

References insert(), and loopi().

Referenced by g3d_input().

void editor::insert ( char  ch)
inline
void editor::insert ( const char *  s)
inline

References insert().

void editor::insertallfrom ( editor b)
inline
void editor::key ( int  code)
inline
int editor::limitscrolly ( )
inline
void editor::load ( )
inline
void editor::mark ( bool  enable)
inline

References cx, cy, sphere::enable(), mx, and my.

Referenced by clear(), del(), and gui::field_().

bool editor::region ( int &  sx,
int &  sy,
int &  ex,
int &  ey 
)
inline
bool editor::region ( )
inline

References region().

Referenced by copyselectionto(), del(), draw(), region(), and selectiontostring().

void editor::removelines ( int  start,
int  count 
)
inline

References lines, loopi(), and vector< T, MINSIZE >::remove().

Referenced by del(), and key().

void editor::save ( )
inline
void editor::selectall ( )
inline

References cx, cy, mx, and my.

char* editor::selectiontostring ( )
inline
void editor::setfile ( const char *  fname)
inline

References DELETEA, filename, and newstring().

char* editor::tostring ( )
inline

Member Data Documentation

bool editor::active

Referenced by gui::field_(), and useeditor().

int editor::cx
int editor::cy
const char* editor::filename

Referenced by load(), save(), setfile(), and ~editor().

vector<editline> editor::lines
bool editor::linewrap

Referenced by draw(), gui::field_(), hit(), key(), and limitscrolly().

int editor::maxx
int editor::maxy
int editor::mode

Referenced by gui::field_().

int editor::mx

Referenced by hit(), mark(), region(), and selectall().

int editor::my

Referenced by hit(), mark(), region(), and selectall().

const char* editor::name

Referenced by ~editor().

int editor::pixelheight

Referenced by draw(), gui::field_(), hit(), key(), and limitscrolly().

int editor::pixelwidth

Referenced by draw(), gui::field_(), hit(), key(), and limitscrolly().

bool editor::rendered

Referenced by gui::field_().

int editor::scrolly

Referenced by draw(), gui::field_(), and hit().


The documentation for this struct was generated from the following file: