From e39158f72f444c82f0025ac7b9e074a3e3a65277 Mon Sep 17 00:00:00 2001 From: beru Date: Sat, 23 Mar 2019 17:28:33 +0900 Subject: [PATCH 1/3] fix wrongly spelt word : overrided -> overridden --- include/nana/gui/detail/drawer.hpp | 14 ++++---- include/nana/gui/detail/event_code.hpp | 2 +- source/gui/detail/drawer.cpp | 44 +++++++++++++------------- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/include/nana/gui/detail/drawer.hpp b/include/nana/gui/detail/drawer.hpp index 7c20db17..46796573 100644 --- a/include/nana/gui/detail/drawer.hpp +++ b/include/nana/gui/detail/drawer.hpp @@ -98,10 +98,10 @@ namespace nana void clear_filter(); private: - void _m_reset_overrided(); - bool _m_overrided(event_code) const; + void _m_reset_overridden(); + bool _m_overridden(event_code) const; private: - unsigned overrided_{ 0xFFFFFFFF }; + unsigned overridden_{ 0xFFFFFFFF }; unsigned evt_disabled_{ 0 }; // bit set if event is filtered }; @@ -117,8 +117,8 @@ namespace nana enum class method_state { pending, - overrided, - not_overrided + overridden, + not_overridden }; public: drawer(); @@ -165,7 +165,7 @@ namespace nana auto realizer = this->realizer(); auto & mth_state = _m_mth_state(pos); - if (realizer && (method_state::not_overrided != mth_state)) + if (realizer && (method_state::not_overridden != mth_state)) { const bool bFiltered = !bForce__EmitInternal && realizer->filter_event(evt_code); if (method_state::pending == mth_state) @@ -176,7 +176,7 @@ namespace nana //Check realizer, when the window is closed in that event handler, the drawer will be //detached and realizer will be a nullptr if (realizer) - mth_state = (realizer->_m_overrided(evt_code) ? method_state::overrided : method_state::not_overrided); + mth_state = (realizer->_m_overridden(evt_code) ? method_state::overridden : method_state::not_overridden); } else { diff --git a/include/nana/gui/detail/event_code.hpp b/include/nana/gui/detail/event_code.hpp index 2f126db6..2c63cb4c 100644 --- a/include/nana/gui/detail/event_code.hpp +++ b/include/nana/gui/detail/event_code.hpp @@ -28,7 +28,7 @@ namespace nana mouse_wheel, ///< A mouse scrolls the wheel on a widget. mouse_drop, ///< A mouse release over a window that is registered as recipient of drag and drop. expose, ///< - resizing, ///< A widget's size is sizing. In this event, A widget's size can be overrided with a new size. + resizing, ///< A widget's size is sizing. In this event, A widget's size can be overridden with a new size. resized, ///< A widget's size is changing. move, ///< unload, ///< A form is closed by clicking the X button, only works for root widget. diff --git a/source/gui/detail/drawer.cpp b/source/gui/detail/drawer.cpp index 3f5bc755..da5b0091 100644 --- a/source/gui/detail/drawer.cpp +++ b/source/gui/detail/drawer.cpp @@ -33,99 +33,99 @@ namespace nana void drawer_trigger::resizing(graph_reference, const arg_resizing&) { - overrided_ &= ~(1 << static_cast(event_code::resizing)); + overridden_ &= ~(1 << static_cast(event_code::resizing)); } void drawer_trigger::resized(graph_reference graph, const arg_resized&) { - overrided_ |= (1 << static_cast(event_code::resized)); + overridden_ |= (1 << static_cast(event_code::resized)); this->refresh(graph); detail::bedrock::instance().thread_context_lazy_refresh(); } void drawer_trigger::move(graph_reference, const arg_move&) { - overrided_ &= ~(1 << static_cast(event_code::move)); + overridden_ &= ~(1 << static_cast(event_code::move)); } void drawer_trigger::click(graph_reference, const arg_click&) { - overrided_ &= ~(1 << static_cast(event_code::click)); + overridden_ &= ~(1 << static_cast(event_code::click)); } void drawer_trigger::dbl_click(graph_reference, const arg_mouse&) { - overrided_ &= ~(1 << static_cast(event_code::dbl_click)); + overridden_ &= ~(1 << static_cast(event_code::dbl_click)); } void drawer_trigger::mouse_enter(graph_reference, const arg_mouse&) { - overrided_ &= ~(1 << static_cast(event_code::mouse_enter)); + overridden_ &= ~(1 << static_cast(event_code::mouse_enter)); } void drawer_trigger::mouse_move(graph_reference, const arg_mouse&) { - overrided_ &= ~(1 << static_cast(event_code::mouse_move)); + overridden_ &= ~(1 << static_cast(event_code::mouse_move)); } void drawer_trigger::mouse_leave(graph_reference, const arg_mouse&) { - overrided_ &= ~(1 << static_cast(event_code::mouse_leave)); + overridden_ &= ~(1 << static_cast(event_code::mouse_leave)); } void drawer_trigger::mouse_down(graph_reference, const arg_mouse&) { - overrided_ &= ~(1 << static_cast(event_code::mouse_down)); + overridden_ &= ~(1 << static_cast(event_code::mouse_down)); } void drawer_trigger::mouse_up(graph_reference, const arg_mouse&) { - overrided_ &= ~(1 << static_cast(event_code::mouse_up)); + overridden_ &= ~(1 << static_cast(event_code::mouse_up)); } void drawer_trigger::mouse_wheel(graph_reference, const arg_wheel&) { - overrided_ &= ~(1 << static_cast(event_code::mouse_wheel)); + overridden_ &= ~(1 << static_cast(event_code::mouse_wheel)); } void drawer_trigger::mouse_dropfiles(graph_reference, const arg_dropfiles&) { - overrided_ &= ~(1 << static_cast(event_code::mouse_drop)); + overridden_ &= ~(1 << static_cast(event_code::mouse_drop)); } void drawer_trigger::focus(graph_reference, const arg_focus&) { - overrided_ &= ~(1 << static_cast(event_code::focus)); + overridden_ &= ~(1 << static_cast(event_code::focus)); } void drawer_trigger::key_press(graph_reference, const arg_keyboard&) { - overrided_ &= ~(1 << static_cast(event_code::key_press)); + overridden_ &= ~(1 << static_cast(event_code::key_press)); } void drawer_trigger::key_char(graph_reference, const arg_keyboard&) { - overrided_ &= ~(1 << static_cast(event_code::key_char)); + overridden_ &= ~(1 << static_cast(event_code::key_char)); } void drawer_trigger::key_release(graph_reference, const arg_keyboard&) { - overrided_ &= ~(1 << static_cast(event_code::key_release)); + overridden_ &= ~(1 << static_cast(event_code::key_release)); } void drawer_trigger::shortkey(graph_reference, const arg_keyboard&) { - overrided_ &= ~(1 << static_cast(event_code::shortkey)); + overridden_ &= ~(1 << static_cast(event_code::shortkey)); } - void drawer_trigger::_m_reset_overrided() + void drawer_trigger::_m_reset_overridden() { - overrided_ = 0xFFFFFFFF; + overridden_ = 0xFFFFFFFF; } - bool drawer_trigger::_m_overrided(event_code evt_code) const + bool drawer_trigger::_m_overridden(event_code evt_code) const { - return 0 != (overrided_ & (1 << static_cast(evt_code))); + return 0 != (overridden_ & (1 << static_cast(evt_code))); } void drawer_trigger::filter_event(const event_code evt_code, const bool bDisabled) @@ -396,7 +396,7 @@ namespace nana *i = method_state::pending; data_impl_->realizer = &realizer; - realizer._m_reset_overrided(); + realizer._m_reset_overridden(); realizer.attached(wd, graphics); realizer.typeface_changed(graphics); } From 3160b8a204f89f2ea8c3e1e7f8e070d4ab6910b7 Mon Sep 17 00:00:00 2001 From: beru Date: Sat, 23 Mar 2019 18:18:52 +0900 Subject: [PATCH 2/3] fix misspellings --- include/nana/gui/layout_utility.hpp | 6 +++--- include/nana/gui/msgbox.hpp | 10 +++++----- include/nana/gui/programming_interface.hpp | 10 +++++----- include/nana/gui/widgets/date_chooser.hpp | 2 +- include/nana/gui/widgets/form.hpp | 2 +- include/nana/gui/widgets/group.hpp | 6 +++--- include/nana/gui/widgets/menubar.hpp | 2 +- include/nana/gui/widgets/panel.hpp | 2 +- include/nana/gui/widgets/picture.hpp | 4 ++-- include/nana/gui/widgets/scroll.hpp | 4 ++-- include/nana/gui/widgets/spinbox.hpp | 4 ++-- source/gui/layout_utility.cpp | 2 +- source/gui/widgets/group.cpp | 8 ++++---- source/paint/graphics.cpp | 4 ++-- 14 files changed, 33 insertions(+), 33 deletions(-) diff --git a/include/nana/gui/layout_utility.hpp b/include/nana/gui/layout_utility.hpp index 56127aac..fdadf036 100644 --- a/include/nana/gui/layout_utility.hpp +++ b/include/nana/gui/layout_utility.hpp @@ -17,10 +17,10 @@ namespace nana { - //overlap test if overlaped between r1 and r2 + //overlap test if overlapped between r1 and r2 bool overlapped(const rectangle& r1, const rectangle& r2); - // overlap, compute the overlap area between r1 and r2. the r is for root + // overlap, compute the overlapping area between r1 and r2. the r is for root bool overlap(const rectangle& r1, const rectangle& r2, rectangle& r); bool overlap(const rectangle& ir, const size& valid_input_area, const rectangle & dr, const size& valid_dst_area, rectangle& output_src_r, rectangle& output_dst_r); @@ -37,7 +37,7 @@ namespace nana //covered //@brief: Tests a rectangle whether it is wholly covered by another. - bool covered(const rectangle& underlying, //Rectangle 1 is must under rectangle 2 + bool covered(const rectangle& underlying, // 1st rectangle must be placed under 2nd rectangle const rectangle& cover); }//end namespace nana #endif diff --git a/include/nana/gui/msgbox.hpp b/include/nana/gui/msgbox.hpp index a004fd21..94e54329 100644 --- a/include/nana/gui/msgbox.hpp +++ b/include/nana/gui/msgbox.hpp @@ -21,7 +21,7 @@ namespace nana //Forward declaration of filebox for msgbox class filebox; - /// Prefabricated modal dialog box (with text, icon and actions buttons) that inform and instruct the user. + /// Prefabricated modal dialog box (with text, icon and actions buttons) that informs and instructs the user. class msgbox { public: @@ -34,19 +34,19 @@ namespace nana /// Identifiers of buttons that a user clicked. enum pick_t{pick_ok, pick_yes, pick_no, pick_cancel}; - /// Default construct that creates a message box with default title and default button, the default button is OK. + /// Default constructor that creates a message box with default title and default button, the default button is OK. msgbox(); - /// Copy construct from an existing msgbox object. + /// Copy constructor from an existing msgbox object. msgbox(const msgbox&); /// Assign from an existing msgbox object. msgbox& operator=(const msgbox&); - /// Construct that creates a message box with a specified title and default button. + /// Constructor that creates a message box with a specified title and default button. msgbox(const ::std::string&); - /// Construct that creates a message box with an owner windoow, a specified title and buttons. + /// Constructor that creates a message box with an owner windoow, a specified title and buttons. msgbox(window, const ::std::string&, button_t = ok); /// Sets an icon for informing user. diff --git a/include/nana/gui/programming_interface.hpp b/include/nana/gui/programming_interface.hpp index 48a773ce..b195b6ea 100644 --- a/include/nana/gui/programming_interface.hpp +++ b/include/nana/gui/programming_interface.hpp @@ -186,7 +186,7 @@ namespace API void exit(); ///< close all windows in current thread void exit_all(); ///< close all windows - /// @brief Searchs whether the text contains a '&' and removes the character for transforming. + /// @brief Searches whether the text contains a '&' and removes the character for transforming. /// If the text contains more than one '&' charachers, the others are ignored. e.g /// text = "&&a&bcd&ef", the result should be "&abcdef", shortkey = 'b', and pos = 2. std::string transform_shortkey_text @@ -344,11 +344,11 @@ namespace API /// Refresh the window and display it immediately calling the refresh function of its drawer_trigger. /* - * The drawer::refresh() will be called. If the currently state is lazy_refrsh, the window is delayed to update the graphics until an event is finished. + * The drawer::refresh() will be called. If the current state is lazy_refrsh, the window is delayed to update the graphics until an event is finished. * @param window_handle A handle to the window to be refreshed. */ void refresh_window(window window_handle); - void refresh_window_tree(window); ///< Refreshes the specified window and all its children windows, then display it immediately + void refresh_window_tree(window); ///< Refreshes the specified window and all its children windows, then displays it immediately void update_window(window); ///< Copies the off-screen buffer to the screen for immediate display. void window_caption(window, const std::string& title_utf8); @@ -418,8 +418,8 @@ namespace API /// Enables or disables a window to receive a key_char event for pressing TAB key. /* * @param window_handle A handle to the window to catch TAB key through key_char event. - * @param enable Indicates whether to enable or disable catch of TAB key. If this parameter is *true*, the window is - * received a key_char when pressing TAB key, and the input focus is not changed. If this parameter is *false*, the + * @param enable Indicates whether to enable or disable catch of TAB key. If this parameter is *true*, the window + * receives a key_char event when pressing TAB key, and the input focus is not changed. If this parameter is *false*, the * input focus is changed to the next tabstop window. */ void eat_tabstop(window window_handle, bool enable); diff --git a/include/nana/gui/widgets/date_chooser.hpp b/include/nana/gui/widgets/date_chooser.hpp index b36d800f..3d138faf 100644 --- a/include/nana/gui/widgets/date_chooser.hpp +++ b/include/nana/gui/widgets/date_chooser.hpp @@ -76,7 +76,7 @@ namespace nana bool chose() const; nana::date read() const; - void weekstr(unsigned index, ::std::string);/// diff --git a/include/nana/gui/widgets/form.hpp b/include/nana/gui/widgets/form.hpp index 6053a1d7..65f4572e 100644 --- a/include/nana/gui/widgets/form.hpp +++ b/include/nana/gui/widgets/form.hpp @@ -51,7 +51,7 @@ namespace nana }//end namespace form }//end namespace drawerbase - /// \brief Pop-up window. Is different from other window widgets: its default constructor create the window. + /// \brief Pop-up window. Is different from other window widgets: its default constructor creates the window. /// \see nana::appearance class form : public drawerbase::form::form_base diff --git a/include/nana/gui/widgets/group.hpp b/include/nana/gui/widgets/group.hpp index 3ca870d2..6188ccce 100644 --- a/include/nana/gui/widgets/group.hpp +++ b/include/nana/gui/widgets/group.hpp @@ -55,12 +55,12 @@ namespace nana{ /// The construction that creates the widget group(window parent, const rectangle& = {}, bool visible = true); - /// The construction that creates the widget and set the titel or caption + /// The construction that creates the widget and set the title or caption group(window parent, ///< a handle to the parent - ::std::string titel, ///< caption of the group + ::std::string title, ///< caption of the group bool formatted = false, ///< Enable/disable the formatted text for the title - unsigned gap = 2, ///< betwen the content and the external limit + unsigned gap = 2, ///< between the content and the external limit const rectangle& r = {} , bool visible = true ); diff --git a/include/nana/gui/widgets/menubar.hpp b/include/nana/gui/widgets/menubar.hpp index c6bbd7c9..f0de0466 100644 --- a/include/nana/gui/widgets/menubar.hpp +++ b/include/nana/gui/widgets/menubar.hpp @@ -79,7 +79,7 @@ namespace nana /// Deselects the menu /** - * If a menu is popped up, the menu deselects the item and close the popuped menu. + * If a menu is popped up, the menu deselects the item and close the pop-upped menu. * @return true if an item is deselected, false otherwise. */ bool cancel(); diff --git a/include/nana/gui/widgets/panel.hpp b/include/nana/gui/widgets/panel.hpp index b159fa35..2e777458 100644 --- a/include/nana/gui/widgets/panel.hpp +++ b/include/nana/gui/widgets/panel.hpp @@ -34,7 +34,7 @@ namespace nana }; }// end namespace panel }//end namespace drawerbase - /// For placing other widgets, where the bool template parameter determinte if it is widget or lite_widget, wich in actual use make no difference. + /// For placing other widgets, where the bool template parameter determinte if it is widget or lite_widget, which in actual use makes no difference. template class panel : public widget_object::type, diff --git a/include/nana/gui/widgets/picture.hpp b/include/nana/gui/widgets/picture.hpp index d4805662..83068b79 100644 --- a/include/nana/gui/widgets/picture.hpp +++ b/include/nana/gui/widgets/picture.hpp @@ -59,10 +59,10 @@ namespace nana /// Enables the image to be stretched to the widget size. void stretchable(unsigned left, unsigned top, unsigned right, unsigned bottom); - /// Enables/disable the image to be stretched without changing aspect ratio. + /// Enables/disables the image to be stretched without changing aspect ratio. void stretchable(bool); - /// Fills a gradual-change color in background. If One of colors is invisible or clr_from is equal to clr_to, it draws background in bgcolor. + /// Fills a gradual-change color in background. If one of colors is invisible or clr_from is equal to clr_to, it draws background in bgcolor. void set_gradual_background(const color& clr_from, const color& clr_to, bool horizontal); void transparent(bool); bool transparent() const; diff --git a/include/nana/gui/widgets/scroll.hpp b/include/nana/gui/widgets/scroll.hpp index 62857c6f..365837ea 100644 --- a/include/nana/gui/widgets/scroll.hpp +++ b/include/nana/gui/widgets/scroll.hpp @@ -57,8 +57,8 @@ namespace nana buttons what; bool pressed; - size_type scroll_length; ///< the lenght in pixels of the central button show how many of the total (peak) is shonw (range) - int scroll_pos; ///< in pixels, and correspond to the offsset from the very beginning (value) + size_type scroll_length; ///< the length in pixels of the central button show how many of the total (peak) is shonw (range) + int scroll_pos; ///< in pixels, and correspond to the offset from the very beginning (value) int scroll_mouse_offset; metrics_type(); diff --git a/include/nana/gui/widgets/spinbox.hpp b/include/nana/gui/widgets/spinbox.hpp index 9595321f..3053f37b 100644 --- a/include/nana/gui/widgets/spinbox.hpp +++ b/include/nana/gui/widgets/spinbox.hpp @@ -86,7 +86,7 @@ namespace nana spinbox(window, const nana::rectangle& = {}, bool visible = true); /// Sets the widget whether it accepts user keyboard input. - /// @param accept Set to indicate whether it accepts uesr keyboard input. + /// @param accept Set to indicate whether it accepts user keyboard input. void editable(bool accept); /// Determines whether the widget accepts user keyboard input. @@ -106,7 +106,7 @@ namespace nana /// Selects/unselects the text void select(bool); - /// Gets the spined value + /// Gets the spinned value ::std::string value() const; void value(const ::std::string&); int to_int() const; diff --git a/source/gui/layout_utility.cpp b/source/gui/layout_utility.cpp index 4daade4a..f790a9ea 100644 --- a/source/gui/layout_utility.cpp +++ b/source/gui/layout_utility.cpp @@ -15,7 +15,7 @@ namespace nana { - //overlap test if overlaped between r1 and r2 + //overlap test if overlapped between r1 and r2 bool overlapped(const rectangle& r1, const rectangle& r2) { if (r1.y + (long long)(r1.height) <= r2.y) return false; diff --git a/source/gui/widgets/group.cpp b/source/gui/widgets/group.cpp index 4c68d5f5..1e0e868c 100644 --- a/source/gui/widgets/group.cpp +++ b/source/gui/widgets/group.cpp @@ -49,8 +49,8 @@ static const char* field_options = "__nana_group_options__"; implement() = default; - implement(window grp_panel, ::std::string titel, bool vsb, unsigned gap=2) - : caption (grp_panel, std::move(titel), vsb), + implement(window grp_panel, ::std::string title, bool vsb, unsigned gap=2) + : caption (grp_panel, std::move(title), vsb), place_content{grp_panel}, gap{gap} { @@ -118,12 +118,12 @@ group::group(window parent, const rectangle& r, bool vsb) using groupbase_type = widget_object; -group::group(window parent, ::std::string titel, bool formatted, unsigned gap, const rectangle& r, bool vsb) +group::group(window parent, ::std::string title, bool formatted, unsigned gap, const rectangle& r, bool vsb) : group(parent, r, vsb) { this->bgcolor(API::bgcolor(parent)); - impl_.reset(new implement(*this, std::move(titel), vsb, gap)); + impl_.reset(new implement(*this, std::move(title), vsb, gap)); impl_->caption.format(formatted); _m_init(); diff --git a/source/paint/graphics.cpp b/source/paint/graphics.cpp index 004a34a5..bb4adaf4 100644 --- a/source/paint/graphics.cpp +++ b/source/paint/graphics.cpp @@ -285,7 +285,7 @@ namespace paint const void* graphics::pixmap() const { //The reinterpret_cast is used for same platform. Under Windows, the type - //of pixmap can be conversed into void* directly, but under X11, the type is not a pointer. + //of pixmap can be converted into void* directly, but under X11, the type is not a pointer. return (impl_->handle ? reinterpret_cast(impl_->handle->pixmap) : nullptr); } @@ -310,7 +310,7 @@ namespace paint return; } - //The object will be delete while dwptr_ is performing a release. + //The object will be deleted while dwptr_ is performing a release. std::shared_ptr dw{ new nana::detail::drawable_impl_type, detail::drawable_deleter{} }; //Reuse the old font From e4e0003c3bf026fca531039a25c83a86c00bd076 Mon Sep 17 00:00:00 2001 From: beru Date: Sat, 23 Mar 2019 18:23:38 +0900 Subject: [PATCH 3/3] fix typo --- include/nana/gui/widgets/scroll.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/nana/gui/widgets/scroll.hpp b/include/nana/gui/widgets/scroll.hpp index 365837ea..350e2e62 100644 --- a/include/nana/gui/widgets/scroll.hpp +++ b/include/nana/gui/widgets/scroll.hpp @@ -51,13 +51,13 @@ namespace nana using size_type = std::size_t; size_type peak; ///< the whole total - size_type range; ///< how many is shonw on a page, that is, How many to scroll after click on first or second + size_type range; ///< how many is shown on a page, that is, How many to scroll after click on first or second size_type step; ///< how many to scroll by click in forward or backward size_type value; ///< current offset calculated from the very beginnig buttons what; bool pressed; - size_type scroll_length; ///< the length in pixels of the central button show how many of the total (peak) is shonw (range) + size_type scroll_length; ///< the length in pixels of the central button show how many of the total (peak) is shown (range) int scroll_pos; ///< in pixels, and correspond to the offset from the very beginning (value) int scroll_mouse_offset; @@ -348,7 +348,7 @@ namespace nana virtual void amount(size_type peak) = 0; - /// Get the range of the widget (how many is shonw on a page, that is, How many to scroll after click on first or second) + /// Get the range of the widget (how many is shown on a page, that is, How many to scroll after click on first or second) virtual size_type range() const = 0; /// Set the range of the widget. @@ -426,7 +426,7 @@ namespace nana return this->get_drawer_trigger().peak(peak); } - /// Get the range of the widget (how many is shonw on a page, that is, How many to scroll after click on first or second) + /// Get the range of the widget (how many is shown on a page, that is, How many to scroll after click on first or second) size_type range() const override { return this->get_drawer_trigger().metrics().range;