Merge remote-tracking branch 'cnjinhao/hotfix-1.5.5' into hotfix-1.5.4
This commit is contained in:
@@ -46,7 +46,7 @@ namespace nana
|
||||
/// Construct that creates a message box with a specified title and default button.
|
||||
msgbox(const ::std::string&);
|
||||
|
||||
/// Construct that creates a message box with an owner windoow, a specified title and buttons.
|
||||
/// Construct that creates a message box with an owner windoow, a specified title and buttons.
|
||||
msgbox(window, const ::std::string&, button_t = ok);
|
||||
|
||||
/// Sets an icon for informing user.
|
||||
@@ -108,6 +108,7 @@ namespace nana
|
||||
virtual window create(window, unsigned label_px) = 0;
|
||||
virtual unsigned fixed_pixels() const;
|
||||
};
|
||||
|
||||
public:
|
||||
class boolean
|
||||
: public abstract_content
|
||||
@@ -240,7 +241,6 @@ namespace nana
|
||||
{
|
||||
std::vector<abstract_content*> contents;
|
||||
_m_fetch_args(contents, std::forward<Args>(args)...);
|
||||
|
||||
if (contents.empty())
|
||||
return false;
|
||||
|
||||
@@ -261,6 +261,14 @@ namespace nana
|
||||
|
||||
/// Sets a verifier to verify the user input.
|
||||
void verify(std::function<bool(window)> verifier);
|
||||
|
||||
/** Sets the minimum width for the entry fields
|
||||
@param[in] pixels new minimum width
|
||||
|
||||
If not called, the default is 100 pixels
|
||||
*/
|
||||
void min_width_entry_field( unsigned pixels );
|
||||
|
||||
private:
|
||||
void _m_fetch_args(std::vector<abstract_content*>&);
|
||||
|
||||
@@ -279,6 +287,7 @@ namespace nana
|
||||
std::function<bool(window)> verifier_;
|
||||
::nana::paint::image images_[4];
|
||||
::nana::rectangle valid_areas_[4];
|
||||
unsigned min_width_entry_field_pixels_;
|
||||
};
|
||||
}//end namespace nana
|
||||
#include <nana/pop_ignore_diagnostic>
|
||||
|
||||
@@ -57,8 +57,6 @@ namespace nana
|
||||
class trigger
|
||||
: public drawer_trigger
|
||||
{
|
||||
class itembase;
|
||||
|
||||
struct essence;
|
||||
public:
|
||||
trigger();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* A Progress Indicator Implementation
|
||||
* Nana C++ Library(http://www.nanapro.org)
|
||||
* Copyright(C) 2003-2015 Jinhao(cnjinhao@hotmail.com)
|
||||
* Copyright(C) 2003-2017 Jinhao(cnjinhao@hotmail.com)
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -20,42 +20,37 @@ namespace nana
|
||||
{
|
||||
namespace progress
|
||||
{
|
||||
class trigger: public drawer_trigger
|
||||
struct scheme
|
||||
: public widget_geometrics
|
||||
{
|
||||
scheme();
|
||||
|
||||
color_proxy gradient_bgcolor{ colors::button_face_shadow_start };
|
||||
color_proxy gradient_fgcolor{ static_cast<color_rgb>(0x6FFFA8) };
|
||||
};
|
||||
|
||||
class substance;
|
||||
|
||||
class trigger
|
||||
: public drawer_trigger
|
||||
{
|
||||
public:
|
||||
unsigned value() const;
|
||||
unsigned value(unsigned);
|
||||
unsigned inc();
|
||||
unsigned Max() const;
|
||||
unsigned Max(unsigned);
|
||||
void unknown(bool);
|
||||
bool unknown() const;
|
||||
bool stop(bool s = true);
|
||||
bool stopped() const;
|
||||
private:
|
||||
void attached(widget_reference, graph_reference) override;
|
||||
void refresh(graph_reference) override;
|
||||
private:
|
||||
void _m_draw_box(graph_reference);
|
||||
void _m_draw_progress(graph_reference);
|
||||
bool _m_check_changing(unsigned) const;
|
||||
private:
|
||||
static const unsigned border = 2;
|
||||
trigger();
|
||||
~trigger();
|
||||
|
||||
widget * widget_{nullptr};
|
||||
nana::paint::graphics* graph_{nullptr};
|
||||
unsigned draw_width_{static_cast<unsigned>(-1)};
|
||||
bool unknown_{false};
|
||||
bool stop_{false};
|
||||
unsigned max_{100};
|
||||
unsigned value_{0};
|
||||
}; //end class drawer
|
||||
substance* progress() const;
|
||||
private:
|
||||
void attached(widget_reference, graph_reference) override;
|
||||
void refresh(graph_reference) override;
|
||||
private:
|
||||
substance* const progress_;
|
||||
};
|
||||
}
|
||||
}//end namespace drawerbase
|
||||
/// \brief A progressbar widget with two styles: know, and unknow amount value (goal).
|
||||
/// In unknow style the amount is ignored and the bar is scrolled when value change.
|
||||
class progress
|
||||
: public widget_object<category::widget_tag, drawerbase::progress::trigger>
|
||||
class progress
|
||||
: public widget_object<category::widget_tag, drawerbase::progress::trigger, ::nana::general_events, drawerbase::progress::scheme>
|
||||
{
|
||||
public:
|
||||
progress();
|
||||
@@ -69,8 +64,6 @@ namespace nana
|
||||
unsigned amount(unsigned value);
|
||||
void unknown(bool);
|
||||
bool unknown() const;
|
||||
bool stop(bool s=true); ///< request stop or cancel and return previus stop status
|
||||
bool stopped() const;
|
||||
};
|
||||
}//end namespace nana
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user