Merge remote-tracking branch 'cnjinhao/develop' into develop
This commit is contained in:
@@ -109,6 +109,24 @@ namespace nana
|
||||
virtual unsigned fixed_pixels() const;
|
||||
};
|
||||
public:
|
||||
class boolean
|
||||
: public abstract_content
|
||||
{
|
||||
struct implement;
|
||||
public:
|
||||
boolean(::std::string label, bool initial_value);
|
||||
~boolean();
|
||||
|
||||
bool value() const;
|
||||
private:
|
||||
//Implementation of abstract_content
|
||||
const ::std::string& label() const override;
|
||||
window create(window, unsigned label_px) override;
|
||||
unsigned fixed_pixels() const override;
|
||||
private:
|
||||
std::unique_ptr<implement> impl_;
|
||||
};
|
||||
|
||||
class integer
|
||||
: public abstract_content
|
||||
{
|
||||
@@ -122,6 +140,7 @@ namespace nana
|
||||
//Implementation of abstract_content
|
||||
const ::std::string& label() const override;
|
||||
window create(window, unsigned label_px) override;
|
||||
unsigned fixed_pixels() const override;
|
||||
private:
|
||||
std::unique_ptr<implement> impl_;
|
||||
};
|
||||
@@ -139,6 +158,7 @@ namespace nana
|
||||
//Implementation of abstract_content
|
||||
const ::std::string& label() const override;
|
||||
window create(window, unsigned label_px) override;
|
||||
unsigned fixed_pixels() const override;
|
||||
private:
|
||||
std::unique_ptr<implement> impl_;
|
||||
};
|
||||
@@ -166,6 +186,7 @@ namespace nana
|
||||
//Implementation of abstract_content
|
||||
const ::std::string& label() const override;
|
||||
window create(window, unsigned label_px) override;
|
||||
unsigned fixed_pixels() const override;
|
||||
private:
|
||||
std::unique_ptr<implement> impl_;
|
||||
};
|
||||
|
||||
@@ -1056,6 +1056,19 @@ namespace nana
|
||||
cat_proxy & select(bool);
|
||||
bool selected() const;
|
||||
|
||||
/// Enables/disables the number of items in the category to be displayed behind the category title
|
||||
cat_proxy& display_number(bool display);
|
||||
|
||||
/// Determines whether the category is expanded.
|
||||
bool expanded() const;
|
||||
|
||||
/// Expands/collapses the category
|
||||
/**
|
||||
* @param expand Indicates whether to expand or collapse the category. If this parameter is true, it expands the category. If the parameter is false, it collapses the category.
|
||||
* @return the reference of *this.
|
||||
*/
|
||||
cat_proxy& expanded(bool expand);
|
||||
|
||||
/// Behavior of a container
|
||||
void push_back(std::string text_utf8);
|
||||
|
||||
@@ -1488,6 +1501,22 @@ the nana::detail::basic_window member pointer scheme
|
||||
void enable_single(bool for_selection, bool category_limited);
|
||||
void disable_single(bool for_selection);
|
||||
export_options& def_export_options();
|
||||
|
||||
|
||||
/// Sets a renderer for category icon
|
||||
/**
|
||||
* @param icon_renderer The renderer of category icon
|
||||
* @return the reference of *this.
|
||||
*/
|
||||
listbox& category_icon(std::function<void(paint::graphics& graph, const rectangle& rt_icon, bool expanded)> icon_renderer);
|
||||
|
||||
/// Sets category icons
|
||||
/**
|
||||
* @param img_expanded An icon displayed in front of category title when the category is expanded.
|
||||
* @param img_collapsed An icon displayed in front of category title when the category is collapsed.
|
||||
* @return the reference of *this.
|
||||
*/
|
||||
listbox& category_icon(const paint::image& img_expanded, const paint::image&& img_collapsed);
|
||||
private:
|
||||
drawerbase::listbox::essence & _m_ess() const;
|
||||
nana::any* _m_anyobj(size_type cat, size_type index, bool allocate_if_empty) const override;
|
||||
|
||||
@@ -86,6 +86,7 @@ namespace nana{ namespace widgets
|
||||
~text_editor();
|
||||
|
||||
size caret_size() const;
|
||||
const point& content_origin() const;
|
||||
|
||||
void set_highlight(const ::std::string& name, const ::nana::color&, const ::nana::color&);
|
||||
void erase_highlight(const ::std::string& name);
|
||||
|
||||
@@ -140,6 +140,8 @@ namespace nana
|
||||
|
||||
colored_area_access_interface* colored_area_access();
|
||||
|
||||
point content_origin() const;
|
||||
|
||||
/// Enables/disables the textbox to indent a line. Idents a new line when it is created by pressing enter.
|
||||
/// @param generator generates text for identing a line. If it is empty, textbox indents the line according to last line.
|
||||
textbox& indention(bool, std::function<std::string()> generator = {});
|
||||
|
||||
@@ -94,6 +94,7 @@ namespace nana
|
||||
void enable(size_type index, bool enable_state);
|
||||
void scale(unsigned s); ///< Sets the scale of control button.
|
||||
|
||||
/// Enable to place buttons at right part. After calling it, every new button is right aligned.
|
||||
void go_right();
|
||||
|
||||
bool detached() { return detached_; };
|
||||
|
||||
Reference in New Issue
Block a user