improve inputbox

This commit is contained in:
Jinhao
2015-02-24 17:03:17 +08:00
parent 022f7168c0
commit f454a965be
4 changed files with 57 additions and 16 deletions

View File

@@ -183,10 +183,28 @@ namespace nana
std::unique_ptr<implement> impl_;
};
class path
: public abstract_content
{
struct implement;
public:
path(::nana::string label, ::nana::string init_path = ::nana::string());
~path();
::nana::string value() const;
private:
//Implementation of abstract_content
const ::nana::string& label() const override;
window create(window, unsigned label_px) override;
unsigned fixed_pixels() const override;
private:
std::unique_ptr<implement> impl_;
};
inputbox(window, ::nana::string description, ::nana::string title = ::nana::string());
void image(::nana::paint::image, bool is_left);
void image_v(::nana::paint::image, bool is_top);
void image(::nana::paint::image, bool is_left, const rectangle& valid_area = {});
void image_v(::nana::paint::image, bool is_top, const rectangle& valid_area = {});
template<typename ...Args>
bool show(Args&& ... args)
@@ -231,6 +249,7 @@ namespace nana
::nana::string title_;
std::function<bool(window)> verifier_;
::nana::paint::image images_[4];
::nana::rectangle valid_areas_[4];
};
}//end namespace nana

View File

@@ -46,7 +46,7 @@ namespace nana
: public widget_object<category::widget_tag, drawerbase::picture::drawer>
{
public:
picture();
picture() = default;
picture(window, bool visible);
picture(window, const rectangle& ={}, bool visible = true);