mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-01 09:51:13 +02:00
CMsgBox: rework msgbox classes with Window class implementation
Replacing messagebox, hintbox_ext and some derivated parts with
basic class hintbox and derivated class CMsgBox. This should unify
window handling and avoids maintain of multiple classes with quasi
same purpose and adds more functionality.
TODO: fix and optimize details
Origin commit data
------------------
Branch: ni/coolstream
Commit: dde298b1b7
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-04-04 (Mon, 04 Apr 2016)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -56,6 +56,9 @@ class CComponentsForm : public CComponentsItem
|
||||
///enable/disable page scrolling, default enabled with page scroll mode up/down keys, see also enablePageScroll()
|
||||
int page_scroll_mode;
|
||||
|
||||
///container for exit keys, default exit keys are CRCInput::RC_home and CRCInput::RC_setup
|
||||
std::vector <neutrino_msg_t> v_exit_keys;
|
||||
|
||||
///initialize basic properties
|
||||
virtual void Init( const int& x_pos, const int& y_pos, const int& w, const int& h,
|
||||
const fb_pixel_t& color_frame,
|
||||
@@ -149,6 +152,11 @@ class CComponentsForm : public CComponentsItem
|
||||
///exec main method, see also sub exec methods
|
||||
virtual int exec();
|
||||
|
||||
///adds additional exec key to current collection, default exit keys are CRCInput::RC_home and CRCInput::RC_setup
|
||||
virtual void addExitKey(const neutrino_msg_t& key){v_exit_keys.push_back(key);}
|
||||
///remove all current exec keys from current collection, NOTE: use addExitKey() if new exec key is required
|
||||
virtual void removeExitKeys(){v_exit_keys.clear();}
|
||||
|
||||
///enum exec loop control
|
||||
enum
|
||||
{
|
||||
@@ -156,38 +164,29 @@ class CComponentsForm : public CComponentsItem
|
||||
EXIT = 1
|
||||
};
|
||||
///execKey() methods handle events for defined neutrino messages, see class CRCInput::, this methodes contains a signal handler named OnExecMsg, so it is possible to connect with any common function or method
|
||||
///exec sub method for pressed keys, parameters1/2 by rev, parameter3 msg_list as struct contains a list of possible RC-messages for defined message, parameter4 defines size of struct, parameter5 force_exit default = false
|
||||
virtual void execKey( neutrino_msg_t& msg,
|
||||
neutrino_msg_data_t& data,
|
||||
int& res,
|
||||
bool& exit_loop,
|
||||
const struct msg_list_t * const msg_list,
|
||||
const size_t& key_count,
|
||||
bool force_exit = false);
|
||||
///exec sub method for pressed keys, parameters1/2 by rev, parameter3 msg_list as vector contains a list of possible RC-messages for defined message, parameter4 force_exit default = false
|
||||
virtual void execKey( neutrino_msg_t& msg,
|
||||
neutrino_msg_data_t& data,
|
||||
int& res,
|
||||
bool& exit_loop,
|
||||
bool& cancel_exec,
|
||||
const std::vector<neutrino_msg_t>& msg_list,
|
||||
bool force_exit = false);
|
||||
///exec sub method for pressed key, parameters1/2 by rev, parameter3 force_exit default = false
|
||||
virtual bool execKey( neutrino_msg_t& msg,
|
||||
neutrino_msg_data_t& data,
|
||||
int& res,
|
||||
bool& exit_loop,
|
||||
bool& cancel_exec,
|
||||
const neutrino_msg_t& msg_val,
|
||||
bool force_exit = false);
|
||||
|
||||
///exec sub method for page scroll, parameter1 neutrino_msg_t by rev
|
||||
virtual void execPageScroll(neutrino_msg_t& msg, neutrino_msg_data_t& data, int& res);
|
||||
virtual void execPageScroll(neutrino_msg_t& msg, neutrino_msg_data_t& data, int& res, bool& cancel_exec);
|
||||
|
||||
///exec sub method for exit loop, parameters by rev
|
||||
virtual void execExit( neutrino_msg_t& msg,
|
||||
neutrino_msg_data_t& data,
|
||||
int& res, bool& exit_loop,
|
||||
const struct msg_list_t * const msg_list,
|
||||
const size_t& key_count);
|
||||
int& res, bool& cancel_exec,
|
||||
const std::vector<neutrino_msg_t>& v_msg_list);
|
||||
|
||||
///enum scroll direction
|
||||
enum
|
||||
|
Reference in New Issue
Block a user