supertux
Public Member Functions | List of all members
ItemScriptLine Class Referencefinal
Inheritance diagram for ItemScriptLine:
Inheritance graph
[legend]
Collaboration diagram for ItemScriptLine:
Collaboration graph
[legend]

Public Member Functions

 ItemScriptLine (std::string *input_, int id_=-1)
 
virtual void draw (DrawingContext &, const Vector &pos, int menu_width, bool active) override
 Draws the menu item. More...
 
virtual int get_width () const override
 Returns the minimum width of the menu item. More...
 
virtual void process_action (const MenuAction &action) override
 Processes the menu action. More...
 
virtual void event (const SDL_Event &ev) override
 Processes the given event. More...
 
virtual void invalid_remove () override
 Calls when the user wants to remove an invalid char. More...
 
virtual void paste () override
 
virtual void new_line ()
 
virtual void duplicate_line ()
 
- Public Member Functions inherited from ItemTextField
 ItemTextField (const std::string &text_, std::string *input_, int id_=-1)
 
void change_input (const std::string &input_)
 
virtual bool changes_width () const override
 Indicates that this item changes its width. More...
 
virtual void update_undo ()
 Updates undo and redo status. More...
 
virtual void on_input_update ()
 Calls when the input gets updated. More...
 
virtual void insert_text (const std::string &text, const int left_offset_pos)
 
virtual void clear ()
 
virtual void go_left ()
 
virtual void go_right ()
 
virtual void go_to_beginning ()
 
virtual void go_to_end ()
 
virtual void delete_front ()
 
virtual void delete_back ()
 
virtual void cut ()
 
virtual void copy ()
 
virtual void undo ()
 
virtual void redo ()
 
- Public Member Functions inherited from MenuItem
 MenuItem (const std::string &text, int id=-1)
 
int get_id () const
 
void set_help (const std::string &help_text)
 
const std::string & get_help () const
 
void set_text (const std::string &text)
 
const std::string & get_text () const
 
void set_font (const FontPtr font)
 
const FontPtr & get_font () const
 
virtual void on_window_resize ()
 
virtual bool skippable () const
 Returns true when the menu item has no action and therefore can be skipped. More...
 
virtual float get_distance () const
 Returns the distance between the items above and below the current menu item. More...
 
virtual int get_height () const
 Returns height of menu item. More...
 
virtual Color get_color () const
 
virtual bool no_other_action () const
 Returns true when the MenuManager shouldn't do anything else. More...
 
virtual bool select_blink () const
 Returns true when the item should have a blink effect, provided by the menu, when active. More...
 

Additional Inherited Members

- Public Attributes inherited from ItemTextField
std::string * input
 
- Protected Attributes inherited from ItemTextField
std::string m_input_undo
 
std::string m_input_redo
 
const std::string m_cursor
 
float m_cursor_width
 
int m_cursor_left_offset
 

Member Function Documentation

◆ draw()

void ItemScriptLine::draw ( DrawingContext context,
const Vector &  pos,
int  menu_width,
bool  active 
)
overridevirtual

Draws the menu item.

Reimplemented from ItemTextField.

◆ event()

void ItemScriptLine::event ( const SDL_Event &  ev)
overridevirtual

Processes the given event.

Reimplemented from ItemTextField.

◆ get_width()

int ItemScriptLine::get_width ( ) const
overridevirtual

Returns the minimum width of the menu item.

Reimplemented from ItemTextField.

◆ invalid_remove()

void ItemScriptLine::invalid_remove ( )
overridevirtual

Calls when the user wants to remove an invalid char.

Reimplemented from ItemTextField.

◆ process_action()

void ItemScriptLine::process_action ( const MenuAction &  action)
overridevirtual

Processes the menu action.

Reimplemented from ItemTextField.


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