1#include "text_editor.h"
14 return d->create_text_editor(w,h,title,x,y);
50 named(name), handler(_handler)
reference counted pointer, which can work together with types that are derived from ref_counted,...
bool empty() const
check if pointer is not yet set
virtual ~text_editor()
virtual destructor
const text_editor_callback_handler * get_callback_handler() const
return current callback handler
text_editor_callback_handler * handler
store a callback handler
text_editor(const std::string &name, text_editor_callback_handler *_handler=0)
construct from callback handler
void set_callback_handler(text_editor_callback_handler *_handler)
set a new callback handler
gui_driver_ptr get_gui_driver()
return the currently registered gui driver or an empty pointer if non has been registered
data::ref_ptr< text_editor > text_editor_ptr
ref counted pointer to abst control
text_editor_ptr create_text_editor(unsigned int w, unsigned int h, const std::string &title, int x, int y)
construct a new text editor in a separate window of given size, title and position
implement this interface to interact with the text editor
virtual void after_read()
called when new file has been read
virtual void after_save()
called when text has been saved
virtual void on_update_callback()
called when text has been saved
virtual void on_text_insertion(int text_pos, int nr_inserted)
called when nr_inserted characters have been inserted at text_pos
virtual void on_text_deletion(int text_pos, int nr_deleted, const char *deleted_text)
called when the nr_deleted characters in deleted_text have been deleted at text position text_pos
virtual void on_close_editor()
called when the editor window is closed