support of display images in inputbox

This commit is contained in:
Jinhao
2015-02-23 01:45:00 +08:00
parent 723dea218d
commit d7a0d6f7d3
2 changed files with 93 additions and 31 deletions

View File

@@ -100,7 +100,7 @@ namespace nana
virtual const ::nana::string& label() const = 0;
virtual window create(window, unsigned label_px) = 0;
virtual unsigned fixed_pixels() const = 0;
virtual unsigned fixed_pixels() const;
};
public:
class integer
@@ -116,7 +116,6 @@ namespace nana
//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_;
};
@@ -134,7 +133,6 @@ namespace nana
//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_;
};
@@ -159,7 +157,6 @@ namespace nana
//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_;
};
@@ -177,17 +174,20 @@ namespace nana
int year() const;
int month() const; //[1, 12]
int day() const; //[1, 31]
unsigned fixed_pixels() const override;
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);
template<typename ...Args>
bool show(Args&& ... args)
{
@@ -230,6 +230,7 @@ namespace nana
::nana::string description_;
::nana::string title_;
std::function<bool(window)> verifier_;
::nana::paint::image images_[4];
};
}//end namespace nana