add whether_to_draw to determine draw widget background

This commit is contained in:
Jinhao
2015-06-23 02:25:59 +08:00
parent 28413b7f25
commit 76ebf52739
3 changed files with 250 additions and 99 deletions

View File

@@ -70,8 +70,11 @@ namespace nana
/// A message to resize the inline widget
virtual void resize(const size&) = 0;
/// A message to set the value from a item
/// A message to set the value from the item
virtual void set(const value_type&) = 0;
/// Determines whether to draw the background of the widget
virtual bool whether_to_draw() const = 0;
}; //end class inline_widget_notifier_interface
}
}

View File

@@ -19,8 +19,19 @@ namespace nana
{
namespace pat
{
namespace detail
{
//A Base class for abstract factory, avoids decorated name length exceeding for a class template.
class abstract_factory_base
{
public:
virtual ~abstract_factory_base() = default;
};
}
template<typename Interface>
class abstract_factory
: public detail::abstract_factory_base
{
public:
using interface_type = Interface;