add a new tabbar_lite widget
This commit is contained in:
@@ -334,4 +334,51 @@ namespace nana
|
||||
std::unique_ptr<drawerbase::tabbar::event_agent<value_type, drawerbase::tabbar::trigger> > evt_agent_;
|
||||
};
|
||||
}//end namespace nana
|
||||
|
||||
|
||||
namespace nana
|
||||
{
|
||||
namespace ng
|
||||
{
|
||||
namespace drawerbase
|
||||
{
|
||||
namespace tabbar_lite
|
||||
{
|
||||
class model;
|
||||
|
||||
class driver
|
||||
: public drawer_trigger
|
||||
{
|
||||
public:
|
||||
driver();
|
||||
~driver();
|
||||
|
||||
model* get_model();
|
||||
private:
|
||||
//Overrides drawer_trigger's method
|
||||
void attached(widget_reference, graph_reference) override;
|
||||
void refresh(graph_reference) override;
|
||||
void mouse_move(graph_reference, const arg_mouse&) override;
|
||||
void mouse_leave(graph_reference, const arg_mouse&) override;
|
||||
void mouse_down(graph_reference, const arg_mouse&) override;
|
||||
private:
|
||||
model* const model_;
|
||||
};
|
||||
}
|
||||
}//end namespace drawerbase
|
||||
|
||||
class tabbar_lite
|
||||
: public widget_object<category::widget_tag, drawerbase::tabbar_lite::driver>
|
||||
{
|
||||
public:
|
||||
tabbar_lite() = default;
|
||||
tabbar_lite(window, bool visible = true, const::nana::rectangle& = {});
|
||||
|
||||
|
||||
void push_back(std::string text, ::nana::any par = {});
|
||||
void push_front(std::string text, ::nana::any par = {});
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -96,7 +96,8 @@ namespace nana
|
||||
::nana::size glyph_extent_size(const char_t*, std::size_t length, std::size_t begin, std::size_t end) const;
|
||||
::nana::size glyph_extent_size(const string&, std::size_t length, std::size_t begin, std::size_t end) const;
|
||||
bool glyph_pixels(const char_t *, std::size_t length, unsigned* pxbuf) const;
|
||||
::nana::size bidi_extent_size(const string&) const;
|
||||
::nana::size bidi_extent_size(const std::wstring&) const;
|
||||
::nana::size bidi_extent_size(const std::string&) const;
|
||||
|
||||
bool text_metrics(unsigned & ascent, unsigned& descent, unsigned& internal_leading) const;
|
||||
|
||||
@@ -136,6 +137,7 @@ namespace nana
|
||||
void set_text_color(const ::nana::color&);
|
||||
|
||||
unsigned bidi_string(const nana::point&, const char_t *, std::size_t len);
|
||||
unsigned bidi_string(const point& pos, const char*, std::size_t len);
|
||||
|
||||
void blend(const ::nana::rectangle& r, const ::nana::color&, double fade_rate);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user