forked from cnjinhao/nana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from cnjinhao/develop-1.7
Develop 1.7
- Loading branch information
Showing
16 changed files
with
840 additions
and
251 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/** | ||
* Filebox | ||
* Nana C++ Library(http://www.nanapro.org) | ||
* Copyright(C) 2003-2018 Jinhao([email protected]) | ||
* Copyright(C) 2003-2019 Jinhao([email protected]) | ||
* | ||
* Distributed under the Boost Software License, Version 1.0. | ||
* (See accompanying file LICENSE_1_0.txt or copy at | ||
|
@@ -69,11 +69,10 @@ namespace nana | |
|
||
|
||
const ::std::string& path() const; | ||
const ::std::string& file() const; | ||
#if defined(NANA_WINDOWS) | ||
::std::string file() const; | ||
|
||
const ::std::vector<::std::string>& files() const; | ||
void allow_multi_select(bool allow); | ||
#endif | ||
|
||
/// Display the filebox dialog | ||
bool show() const; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* Concept of Component Set | ||
* Copyright(C) 2003-2013 Jinhao([email protected]) | ||
* Copyright(C) 2003-2019 Jinhao([email protected]) | ||
* | ||
* Distributed under the Boost Software License, Version 1.0. | ||
* (See accompanying file LICENSE_1_0.txt or copy at | ||
|
@@ -60,17 +60,19 @@ namespace nana{ namespace widgets{ namespace detail | |
/// Widget scheme. | ||
typedef WidgetScheme widget_scheme_t; | ||
|
||
widget_scheme_t * wdg_scheme_ptr_{ nullptr }; | ||
//widget_scheme_t * wdg_scheme_ptr_{ nullptr }; //deprecated | ||
|
||
public: | ||
/// The destructor. | ||
virtual ~compset_placer(){} | ||
|
||
/* | ||
/// Init the scheme pointer | ||
void init_scheme(widget_scheme_t* wdg_scheme_ptr) | ||
void init_scheme(widget_scheme_t* wdg_scheme_ptr) //deprecated | ||
{ | ||
wdg_scheme_ptr_ = wdg_scheme_ptr; | ||
} | ||
*/ | ||
|
||
/// Enable/Disable the specified component. | ||
virtual void enable(component_t, bool) = 0; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/** | ||
* A List Box Implementation | ||
* Nana C++ Library(http://www.nanapro.org) | ||
* Copyright(C) 2003-2018 Jinhao([email protected]) | ||
* Copyright(C) 2003-2019 Jinhao([email protected]) | ||
* | ||
* Distributed under the Boost Software License, Version 1.0. | ||
* (See accompanying file LICENSE_1_0.txt or copy at | ||
|
@@ -1461,7 +1461,19 @@ the nana::detail::basic_window member pointer scheme | |
/// Returns the number of columns | ||
size_type column_size() const; | ||
|
||
void column_resizable(bool resizable); | ||
/// Move column to view_position | ||
void move_column(size_type abs_pos, size_type view_pos); | ||
|
||
/// Sort columns in range first_col to last_col inclusive using the values from a row | ||
void reorder_columns(size_type first_col, | ||
size_type last_col, | ||
index_pair row, bool reverse, | ||
std::function<bool(const std::string &cell1, size_type col1, | ||
const std::string &cell2, size_type col2, | ||
const nana::any *rowval, | ||
bool reverse)> comp); | ||
|
||
void column_resizable(bool resizable); | ||
bool column_resizable() const; | ||
void column_movable(bool); | ||
bool column_movable() const; | ||
|
@@ -1517,7 +1529,8 @@ the nana::detail::basic_window member pointer scheme | |
|
||
///Sets a strict weak ordering comparer for a column | ||
void set_sort_compare( size_type col, | ||
std::function<bool(const std::string&, nana::any*, const std::string&, nana::any*, bool reverse)> strick_ordering); | ||
std::function<bool(const std::string&, nana::any*, | ||
const std::string&, nana::any*, bool reverse)> strick_ordering); | ||
|
||
/// sort() and ivalidate any existing reference from display position to absolute item, that is: after sort() display offset point to different items | ||
void sort_col(size_type col, bool reverse = false); | ||
|
@@ -1538,6 +1551,7 @@ the nana::detail::basic_window member pointer scheme | |
|
||
void enable_single(bool for_selection, bool category_limited); | ||
void disable_single(bool for_selection); | ||
bool is_single_enabled(bool for_selection) const noexcept; ///< Determines whether the single selection/check is enabled. | ||
export_options& def_export_options(); | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/** | ||
* A Tree Box Implementation | ||
* Nana C++ Library(http://www.nanapro.org) | ||
* Copyright(C) 2003-2018 Jinhao([email protected]) | ||
* Copyright(C) 2003-2019 Jinhao([email protected]) | ||
* | ||
* Distributed under the Boost Software License, Version 1.0. | ||
* (See accompanying file LICENSE or copy at | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* Platform Implementation | ||
* Nana C++ Library(http://www.nanapro.org) | ||
* Copyright(C) 2003-2018 Jinhao([email protected]) | ||
* Copyright(C) 2003-2019 Jinhao([email protected]) | ||
* | ||
* Distributed under the Boost Software License, Version 1.0. | ||
* (See accompanying file LICENSE_1_0.txt or copy at | ||
|
@@ -29,6 +29,7 @@ | |
|
||
#include "../../paint/image_accessor.hpp" | ||
|
||
|
||
namespace nana{ | ||
namespace detail{ | ||
|
||
|
@@ -199,7 +200,7 @@ namespace nana{ | |
namespace x11_wait | ||
{ | ||
static Bool configure(Display *disp, XEvent *evt, char *arg) | ||
{ | ||
{ | ||
return disp && evt && arg && (evt->type == ConfigureNotify) && (evt->xconfigure.window == *reinterpret_cast<Window*>(arg)); | ||
} | ||
|
||
|
@@ -1019,15 +1020,11 @@ namespace nana{ | |
auto const owner = restrict::spec.get_owner(wd); | ||
if(owner && (owner != reinterpret_cast<native_window_type>(restrict::spec.root_window()))) | ||
{ | ||
auto origin = window_position(owner); | ||
#if 0 | ||
x += origin.x; | ||
y += origin.y; | ||
#else | ||
auto owner_extents = window_frame_extents(owner); | ||
x += origin.x + owner_extents.left; | ||
y += origin.y + owner_extents.top; | ||
#endif | ||
int origin_x, origin_y; | ||
Window child_useless_for_API; | ||
::XTranslateCoordinates(disp, reinterpret_cast<Window>(owner), restrict::spec.root_window(), 0, 0, &origin_x, &origin_y, &child_useless_for_API); | ||
x += origin_x; | ||
y += origin_y; | ||
} | ||
|
||
::XMoveWindow(disp, reinterpret_cast<Window>(wd), x, y); | ||
|
@@ -1074,7 +1071,6 @@ namespace nana{ | |
XSizeHints hints; | ||
nana::detail::platform_scope_guard psg; | ||
|
||
|
||
//Returns if the requested rectangle is same with the current rectangle. | ||
//In some X-Server versions/implementations, XMapWindow() doesn't generate | ||
//a ConfigureNotify if the requested rectangle is same with the current rectangle. | ||
|
@@ -1114,11 +1110,11 @@ namespace nana{ | |
auto const owner = restrict::spec.get_owner(wd); | ||
if(owner && (owner != reinterpret_cast<native_window_type>(restrict::spec.root_window()))) | ||
{ | ||
auto origin = window_position(owner); | ||
|
||
auto owner_extents = window_frame_extents(owner); | ||
x += origin.x + owner_extents.left; | ||
y += origin.y + owner_extents.top; | ||
int origin_x, origin_y; | ||
Window child_useless_for_API; | ||
::XTranslateCoordinates(disp, reinterpret_cast<Window>(owner), restrict::spec.root_window(), 0, 0, &origin_x, &origin_y, &child_useless_for_API); | ||
x += origin_x; | ||
y += origin_y; | ||
} | ||
|
||
::XMoveResizeWindow(disp, reinterpret_cast<Window>(wd), x, y, r.width, r.height); | ||
|
Oops, something went wrong.