Merge branch 'feature-listbox' into develop
This commit is contained in:
@@ -436,6 +436,8 @@ namespace API
|
||||
* widget by the content extent.
|
||||
*/
|
||||
optional<std::pair<::nana::size, ::nana::size>> content_extent(window wd, unsigned limited_px, bool limit_width);
|
||||
|
||||
unsigned screen_dpi(bool x_requested);
|
||||
}//end namespace API
|
||||
|
||||
}//end namespace nana
|
||||
|
||||
@@ -94,6 +94,12 @@ namespace nana
|
||||
*/
|
||||
virtual void fit_content(unsigned maximum = 0) noexcept = 0;
|
||||
|
||||
/// Sets an exclusive font for the column
|
||||
virtual void typeface(const paint::font& column_font) = 0;
|
||||
|
||||
/// Returns a font
|
||||
virtual paint::font typeface() const noexcept = 0;
|
||||
|
||||
/// Determines the visibility state of the column
|
||||
/**
|
||||
* @return true if the column is visible, false otherwise
|
||||
@@ -1198,17 +1204,25 @@ namespace nana
|
||||
|
||||
color_proxy selection_box{ static_cast<color_rgb>(0x3399FF) }; ///< Color of selection box border.
|
||||
|
||||
|
||||
std::shared_ptr<paint::font> column_font; ///< Renderer draws column texts with the font if it is not a nullptr.
|
||||
|
||||
/// The max column width which is generated by fit_content is allowed. It is ignored when it is 0, or a max value is passed to fit_content.
|
||||
unsigned max_fit_content{ 0 };
|
||||
|
||||
unsigned min_column_width{ 20 }; ///< def=20 . non counting suspension_width
|
||||
unsigned min_column_width{ 20 }; ///< def=20 . non counting suspension_width
|
||||
|
||||
unsigned suspension_width { 8 }; ///< def= . the trigger will set this to the width if ("...")
|
||||
unsigned text_margin { 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 item_height_ex { 6 }; ///< Set !=0 !!!! def=6. item_height = text_height + item_height_ex
|
||||
unsigned suspension_width{ 8 }; ///< def= . the trigger will set this to the width if ("...")
|
||||
unsigned text_margin{ 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
|
||||
|
||||
//deprecated
|
||||
//unsigned header_height { 25 }; ///< def=25 . header height header_size
|
||||
|
||||
unsigned item_height_ex{ 6 }; ///< Set !=0 !!!! def=6. item_height = text_height + item_height_ex
|
||||
unsigned header_splitter_area_before{ 2 }; ///< def=2. But 4 is better... IMO
|
||||
unsigned header_splitter_area_after { 3 }; ///< def=3. But 4 is better...
|
||||
unsigned header_splitter_area_after{ 3 }; ///< def=3. But 4 is better...
|
||||
unsigned header_padding_top{ 3 };
|
||||
unsigned header_padding_bottom{ 3 };
|
||||
|
||||
::nana::parameters::mouse_wheel mouse_wheel{}; ///< The number of lines/characters to scroll when vertical/horizontal mouse wheel is moved.
|
||||
};
|
||||
|
||||
@@ -38,14 +38,21 @@ namespace nana
|
||||
font(const font&);
|
||||
|
||||
font(const ::std::string& name, double size_pt, const font_style& fs = {});
|
||||
font(double size_pt, const path_type& truetype, const font_style& ft = {});
|
||||
font(double size_pt, const path_type& truetype, const font_style& fs = {});
|
||||
|
||||
~font();
|
||||
bool empty() const;
|
||||
|
||||
void set_default() const;
|
||||
::std::string name() const;
|
||||
double size() const;
|
||||
|
||||
/// Returns font size, in point.
|
||||
/**
|
||||
* @param fixed Indicates whether to return a fixed font size. If this parameter is false, the method may return zero for default system font size. If the parameter is true, the method returns a fixed size of default font size if the font size that assigned by constructor is zero.
|
||||
* @return The font size, in point.
|
||||
*/
|
||||
double size(bool fixed = false) const;
|
||||
|
||||
bool bold() const;
|
||||
unsigned weight() const;
|
||||
bool italic() const;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Standard Library for C++11/14/17
|
||||
* Nana C++ Library(http://www.nanapro.org)
|
||||
* Copyright(C) 2017 Jinhao(cnjinhao@hotmail.com)
|
||||
* Copyright(C) 2018 Jinhao(cnjinhao@hotmail.com)
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
||||
Reference in New Issue
Block a user