Merge branch 'geometric_scheme' of https://github.com/qPCR4vir/nana into qPCR4vir-geometric_scheme

This commit is contained in:
Jinhao
2016-05-23 22:22:29 +08:00
2 changed files with 150 additions and 101 deletions

View File

@@ -17,8 +17,6 @@
#ifndef NANA_GUI_WIDGETS_LISTBOX_HPP
#define NANA_GUI_WIDGETS_LISTBOX_HPP
#include <nana/push_ignore_diagnostic>
#include "widget.hpp"
#include "detail/inline_widget.hpp"
#include <nana/pat/abstract_factory.hpp>
@@ -531,15 +529,17 @@ namespace nana
/// \todo how to implement some geometrical parameters ??
unsigned max_header_width{ 3000 }; ///< during auto width don't alow more than this
unsigned min_header_width{ 20 }; ///< non counting suspension_width
unsigned suspension_width{ 0 }; ///< the trigger will set this to the width if ("...")
unsigned ext_w { 5 }; ///< ??
unsigned header_height { 20 }; ///< header height header_size
unsigned text_height { 0 }; ///< the trigger will set this to the height of the text font
unsigned item_height_ex { 6 }; ///< 6? item_height = text_height + item_height_ex
unsigned item_height { 0 }; ///< the trigger will set this TO item_height = text_height + item_height_ex
unsigned header_mouse_spliter_area_before{ 2 };
unsigned header_mouse_spliter_area_after { 3 };
unsigned min_header_width{ 20 }; ///< def=20 . non counting suspension_width
unsigned suspension_width{ 8 }; ///< def= . the trigger will set this to the width if ("...")
unsigned ext_w { 5 }; ///< def= 5. Additional or extended with added (before) to the text width to determine the cell width. cell_w = text_w + ext_w +1
unsigned header_height { 25 }; ///< def=25 . header height header_size
unsigned text_height { 14 }; ///< the trigger will set this to the height of the text font
unsigned item_height_ex { 6 }; ///< Set !=0 !!!! def=6. item_height = text_height + item_height_ex
unsigned item_height { 24 }; ///< def=24 . the trigger will set this TO item_height = text_height + item_height_ex
unsigned header_mouse_spliter_area_before{ 2 }; ///< def=2. But 4 is better... IMO
unsigned header_mouse_spliter_area_after { 3 }; ///< def=3. But 4 is better...
//void debug_print(const std::string &msg);
};
}
@@ -586,6 +586,17 @@ By \a clicking on one header the list get \a reordered, first up, and then down
}
listbox.anyobj(0, 0, 10); //the type of customer's object is int.
listbox.anyobj(0, 0, 20);
5. listbox is a widget_object, with template parameters drawerbase::listbox::trigger and drawerbase::listbox::scheme
amon others.
That means that listbox have a member trigger_ constructed first and accecible with get_drawer_trigger() and
a member (unique pointer to) scheme_ accesible with scheme_type& scheme() created in the constructor
with API::dev::make_scheme<Scheme>() which call API::detail::make_scheme(::nana::detail::scheme_factory<Scheme>())
which call restrict::bedrock.make_scheme(static_cast<::nana::detail::scheme_factory_base&&>(factory));
which call pi_data_->scheme.create(std::move(factory));
which call factory.create(scheme_template(std::move(factory)));
which call (new Scheme(static_cast<Scheme&>(other)));
and which in create is setted with: API::dev::set_scheme(handle_, scheme_.get()); which save the scheme pointer in
the nana::detail::basic_window member pointer scheme
\todo doc: actualize this example listbox.at(0)...
\see nana::drawerbase::listbox::cat_proxy
\see nana::drawerbase::listbox::item_proxy
@@ -736,6 +747,4 @@ By \a clicking on one header the list get \a reordered, first up, and then down
void _m_erase_key(nana::detail::key_interface*);
};
}//end namespace nana
#include <nana/pop_ignore_diagnostic>
#endif