add new inputbox::boolean

other fixes for width of inputbox's elements
This commit is contained in:
Jinhao
2017-07-20 23:46:20 +08:00
parent d53254b89a
commit 0cfd06b23f
2 changed files with 129 additions and 22 deletions

View File

@@ -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_;
};