|
wex v26.04.0
|
Offers user data to be used by ctrl classes (as listview, stc). More...
#include <wex/factory/control.h>

Public Types | |
| enum | action_t { INV , NOT , OR , SET , XOR } |
| Determine how flags value are set. More... | |
Public Member Functions | |
| control & | check_for_grep (const factory::find_replace_data &data, wxStyledTextCtrl *stc) |
| If specified stc contains a grep line, updates find. | |
| int | col () const |
| Returns col. | |
| control & | col (int col) |
| Sets column. | |
| const std::string & | command () const |
| Returns command. | |
| control & | command (const std::string &rhs) |
| Sets command. | |
| const std::string & | find () const |
| Returns find. | |
| control & | find (const std::string &text, int find_flags=0) |
| Sets find. | |
| int | find_flags () const |
| Returns find flags. | |
| template<std::size_t N> | |
| control & | flags (const std::bitset< N > &flags, std::bitset< N > &result, action_t action=SET) |
| Sets specified flags. | |
| bool | inject (const std::function< bool(void)> &line=nullptr, const std::function< bool(void)> &col=nullptr, const std::function< bool(void)> &find=nullptr, const std::function< bool(void)> &command=nullptr) const |
| Injects data. | |
| control & | is_ctag (bool rhs) |
| Sets is_ctag. | |
| bool | is_required () const |
| Returns required. | |
| control & | is_required (bool required) |
| Sets required. | |
| int | line () const |
| Returns line. | |
| control & | line (int line, std::function< int(int)> f=nullptr) |
| Sets line number. | |
| const wxValidator * | validator () const |
| Returns validator. | |
| control & | validator (wxValidator *validator) |
| Sets validator. | |
| const data::window & | window () const |
| Returns window data. | |
| control & | window (const data::window &data) |
| Sets window data. | |
| void | reset () override |
| Resets members to default state. | |
| Public Member Functions inherited from wex::line_data | |
| int | col () const |
| Returns column. | |
| line_data & | col (int col) |
| Sets column. | |
| const std::string & | command () const |
| Returns command. | |
| line_data & | command (const std::string &command) |
| Sets command. | |
| bool | is_ctag () const |
| Returns true if command is a ctag command. | |
| line_data & | is_ctag (bool rhs) |
| Sets ctag. | |
| int | line () const |
| Returns line number. | |
| line_data & | line (int line, std::function< int(int)> f=nullptr) |
| Sets line number. | |
Offers user data to be used by ctrl classes (as listview, stc).
First you can set the data using col, command, line, etc., then call inject to perform the action. You can set several items, inject prioritizes the actions.
| control & wex::data::control::find | ( | const std::string & | text, |
| int | find_flags = 0 ) |
Sets find.
If not empty selects the text on that line (if line was specified) or finds text from begin (if line was 0) or end (line was -1).
| text | text to find |
| find_flags | find flags to be used |
|
inline |
Sets specified flags.
This is used by the other data classes as generic method to operate on flags.
| bool wex::data::control::inject | ( | const std::function< bool(void)> & | line = nullptr, |
| const std::function< bool(void)> & | col = nullptr, | ||
| const std::function< bool(void)> & | find = nullptr, | ||
| const std::function< bool(void)> & | command = nullptr ) const |
Injects data.
If there is a callback specified, injects current data in it:
|
inline |
Sets line number.
Goes to the line if > 0, if -1 goes to end of file