From a596c7f64e018c1e494c58ffc5091d9c1f8fa4f6 Mon Sep 17 00:00:00 2001 From: beru Date: Sun, 14 Apr 2019 14:49:01 +0900 Subject: [PATCH] fix typos --- include/nana/any.hpp | 2 +- include/nana/basic_types.hpp | 6 ++-- include/nana/c++defines.hpp | 2 +- include/nana/charset.hpp | 2 +- include/nana/config.hpp | 2 +- include/nana/deploy.hpp | 2 +- include/nana/gui/animation.hpp | 2 +- include/nana/gui/basis.hpp | 4 +-- include/nana/gui/drawing.hpp | 2 +- include/nana/gui/msgbox.hpp | 4 +-- include/nana/gui/place.hpp | 2 +- include/nana/gui/programming_interface.hpp | 8 ++--- include/nana/gui/timer.hpp | 2 +- include/nana/gui/widgets/categorize.hpp | 2 +- include/nana/gui/widgets/float_listbox.hpp | 2 +- include/nana/gui/widgets/listbox.hpp | 36 +++++++++---------- include/nana/gui/widgets/menubar.hpp | 2 +- include/nana/gui/widgets/panel.hpp | 2 +- include/nana/gui/widgets/progress.hpp | 4 +-- include/nana/gui/widgets/scroll.hpp | 14 ++++---- include/nana/gui/widgets/slider.hpp | 2 +- include/nana/gui/widgets/spinbox.hpp | 4 +-- include/nana/gui/widgets/tabbar.hpp | 4 +-- include/nana/gui/widgets/textbox.hpp | 2 +- include/nana/gui/widgets/treebox.hpp | 8 ++--- include/nana/gui/wvl.hpp | 6 ++-- .../paint/detail/image_process_provider.hpp | 2 +- include/nana/stdc++.hpp | 20 +++++------ source/basic_types.cpp | 2 +- source/charset.cpp | 6 ++-- source/deploy.cpp | 2 +- source/filesystem/filesystem.cpp | 4 +-- source/gui/animation.cpp | 2 +- source/gui/detail/basic_window.cpp | 2 +- source/gui/detail/bedrock_windows.cpp | 22 ++++++------ source/gui/detail/native_window_interface.cpp | 8 ++--- source/gui/detail/window_layout.cpp | 2 +- source/gui/detail/window_manager.cpp | 14 ++++---- source/gui/filebox.cpp | 2 +- source/gui/msgbox.cpp | 10 +++--- source/gui/place.cpp | 12 +++---- source/gui/programming_interface.cpp | 10 +++--- source/gui/timer.cpp | 2 +- source/gui/widgets/categorize.cpp | 8 ++--- source/gui/widgets/combox.cpp | 2 +- source/gui/widgets/date_chooser.cpp | 2 +- source/gui/widgets/group.cpp | 6 ++-- source/gui/widgets/label.cpp | 4 +-- source/gui/widgets/listbox.cpp | 30 ++++++++-------- source/gui/widgets/menu.cpp | 8 ++--- source/gui/widgets/menubar.cpp | 2 +- source/gui/widgets/skeletons/content_view.cpp | 2 +- source/gui/widgets/skeletons/text_editor.cpp | 14 ++++---- source/gui/widgets/tabbar.cpp | 2 +- source/gui/widgets/textbox.cpp | 8 ++--- source/gui/widgets/treebox.cpp | 8 ++--- source/gui/wvl.cpp | 2 +- source/internationalization.cpp | 2 +- .../paint/detail/image_process_provider.cpp | 4 +-- source/paint/graphics.cpp | 2 +- source/paint/pixel_buffer.cpp | 6 ++-- source/unicode_bidi.cpp | 4 +-- 62 files changed, 183 insertions(+), 183 deletions(-) diff --git a/include/nana/any.hpp b/include/nana/any.hpp index ed711146..149be255 100644 --- a/include/nana/any.hpp +++ b/include/nana/any.hpp @@ -61,7 +61,7 @@ namespace nana return new holder(value); } public: - Value value; //representation accessable for friend of any + Value value; //representation accessible for friend of any }; public: //constructors and destructor diff --git a/include/nana/basic_types.hpp b/include/nana/basic_types.hpp index 0821c91b..895f476c 100644 --- a/include/nana/basic_types.hpp +++ b/include/nana/basic_types.hpp @@ -74,7 +74,7 @@ namespace nana namespace detail { - struct drawable_impl_type; //declearation, defined in platform_spec.hpp + struct drawable_impl_type; //declaration, defined in platform_spec.hpp } namespace paint @@ -275,7 +275,7 @@ namespace nana yellow = 0xFFFF00, yellow_green = 0x9acd32, - //temporary defintions, these will be replaced by color schema + //temporary definitions, these will be replaced by color schema button_face_shadow_start = 0xF5F4F2, button_face_shadow_end = 0xD5D2CA, button_face = 0xD4D0C8 , //,light_cyan @@ -425,7 +425,7 @@ namespace nana size(value_type width, value_type height); bool empty() const; ///< true if width * height == 0 - bool is_hit(const point&) const; ///< Assume it is a rectangle at (0,0), and check whether a specified position is in the rectange. + bool is_hit(const point&) const; ///< Assume it is a rectangle at (0,0), and check whether a specified position is in the rectangle. size& shift(); bool operator==(const size& rhs) const; diff --git a/include/nana/c++defines.hpp b/include/nana/c++defines.hpp index 9456887f..4f00e5f9 100644 --- a/include/nana/c++defines.hpp +++ b/include/nana/c++defines.hpp @@ -164,7 +164,7 @@ #if defined(NANA_MINGW) #ifndef __MINGW64_VERSION_MAJOR - //It's a knonwn issue under MinGW(except MinGW-W64) + //It's a known issue under MinGW(except MinGW-W64) #define STD_NUMERIC_CONVERSIONS_NOT_SUPPORTED #endif #endif diff --git a/include/nana/charset.hpp b/include/nana/charset.hpp index 0bbb9c71..b26dbb6a 100644 --- a/include/nana/charset.hpp +++ b/include/nana/charset.hpp @@ -18,7 +18,7 @@ namespace nana { namespace utf { - /// Attempt to get a pointer to a character of UTF-8 string by a specifed character index. + /// Attempt to get a pointer to a character of UTF-8 string by a specified character index. /// @param text_utf8 A string encoded as UTF-8. /// @param pos The unicode character index. /// @returns A pointer to the unicode character. It returns a null if pos is out of range. diff --git a/include/nana/config.hpp b/include/nana/config.hpp index 1d88b379..791cf0f9 100644 --- a/include/nana/config.hpp +++ b/include/nana/config.hpp @@ -54,7 +54,7 @@ // //#define BOOST_FILESYSTEM_AVAILABLE // "Is Boost filesystem available?" //#define BOOST_FILESYSTEM_FORCE // "Force use of Boost filesystem if available (over ISO and nana) -//#define STD_FILESYSTEM_FORCE // "Use of STD filesystem?(a compilation error will ocurre if not available)" OFF) +//#define STD_FILESYSTEM_FORCE // "Use of STD filesystem?(a compilation error will occur if not available)" OFF) //#define NANA_FILESYSTEM_FORCE // "Force nana filesystem over ISO and boost?" OFF) // // Make sure you (cmake?) provide the following where correspond (please find the correct values): diff --git a/include/nana/deploy.hpp b/include/nana/deploy.hpp index 71ad399d..168358c5 100644 --- a/include/nana/deploy.hpp +++ b/include/nana/deploy.hpp @@ -9,7 +9,7 @@ * * @file: nana/deploy.hpp * - * What follow are dependented on what defined in nana/config.hpp + * What follows is dependent on what defined in nana/config.hpp */ #ifndef NANA_DEPLOY_HPP diff --git a/include/nana/gui/animation.hpp b/include/nana/gui/animation.hpp index e8338399..f0267a46 100644 --- a/include/nana/gui/animation.hpp +++ b/include/nana/gui/animation.hpp @@ -34,7 +34,7 @@ namespace nana public: frameset(); void push_back(paint::image); ///< Inserts frames at the end. - void push_back(framebuilder fb, std::size_t length); ///< Insters a framebuilder and the number of frames that it generates. + void push_back(framebuilder fb, std::size_t length); ///< Inserts a framebuilder and the number of frames that it generates. private: std::shared_ptr impl_; }; diff --git a/include/nana/gui/basis.hpp b/include/nana/gui/basis.hpp index 1e043621..b868a00a 100644 --- a/include/nana/gui/basis.hpp +++ b/include/nana/gui/basis.hpp @@ -183,7 +183,7 @@ namespace nana A window has an appearance. This appearance can be specified when a window is being created. To determine the appearance of a window there is a structure named nana::appearance with -a bool member for each feature with can be included or excluded in the "apereance" of the windows form. +a bool member for each feature with can be included or excluded in the "appearance" of the windows form. But in practical development is hard to describe the style of the appearance using the struct nana::appearance. If a form would to be defined without min/max button and sizable border, then @@ -282,7 +282,7 @@ that return a corresponding nana::appearance with predefined values. set_type::template count::value); } }; - };//end namespace apper + };//end namespace appear /// Interface for caret operations class caret_interface diff --git a/include/nana/gui/drawing.hpp b/include/nana/gui/drawing.hpp index d7f7c7be..693af743 100644 --- a/include/nana/gui/drawing.hpp +++ b/include/nana/gui/drawing.hpp @@ -17,7 +17,7 @@ #include "../traits.hpp" namespace nana { - /// \brief Draw pictures on a widget by specifying a drawing method that will be employed everytime the widget refreshes. + /// \brief Draw pictures on a widget by specifying a drawing method that will be employed every time the widget refreshes. /// By the end of drawing, the picture may not be displayed immediately. /// If a picture need to be displayed immediately call nana::gui::API::refresh_window() . class drawing diff --git a/include/nana/gui/msgbox.hpp b/include/nana/gui/msgbox.hpp index 94e54329..c67795f6 100644 --- a/include/nana/gui/msgbox.hpp +++ b/include/nana/gui/msgbox.hpp @@ -46,7 +46,7 @@ namespace nana /// Constructor that creates a message box with a specified title and default button. msgbox(const ::std::string&); - /// Constructor that creates a message box with an owner windoow, a specified title and buttons. + /// Constructor that creates a message box with an owner window, a specified title and buttons. msgbox(window, const ::std::string&, button_t = ok); /// Sets an icon for informing user. @@ -73,7 +73,7 @@ namespace nana // Calls a manipulator to the stream. msgbox & operator<<(std::ostream& (*)(std::ostream&)); - /// Write a streamizable object to the buffer. + /// Write a streamable object to the buffer. template msgbox & operator<<(const T& t) { diff --git a/include/nana/gui/place.hpp b/include/nana/gui/place.hpp index b0202e4f..a20bd50b 100644 --- a/include/nana/gui/place.hpp +++ b/include/nana/gui/place.hpp @@ -73,7 +73,7 @@ namespace nana std::function init_; }; - /// Layout managment - an object of class place is attached to a widget, and it automatically positions and resizes the children widgets. + /// Layout management - an object of class place is attached to a widget, and it automatically positions and resizes the children widgets. class place : ::nana::noncopyable { diff --git a/include/nana/gui/programming_interface.hpp b/include/nana/gui/programming_interface.hpp index b195b6ea..0b5e42ed 100644 --- a/include/nana/gui/programming_interface.hpp +++ b/include/nana/gui/programming_interface.hpp @@ -108,7 +108,7 @@ namespace API bool copy_transparent_background(window, paint::graphics&); bool copy_transparent_background(window, const rectangle& src_r, paint::graphics&, const point& dst_pt); - /// Refreshs a widget surface + /// Refreshes a widget surface /* * This function will copy the drawer surface into system window after the event process finished. */ @@ -187,12 +187,12 @@ namespace API void exit_all(); ///< close all windows /// @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 + /// If the text contains more than one '&' characters, 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 ( std::string text, ///< the text is transformed wchar_t &shortkey, ///< the character which indicates a short key. - std::string::size_type *skpos ///< retrives the shortkey position if it is not a null_ptr; + std::string::size_type *skpos ///< retrieves the shortkey position if it is not a null_ptr; ); bool register_shortkey(window, unsigned long); void unregister_shortkey(window); @@ -432,7 +432,7 @@ namespace API */ window move_tabstop(window window_handle, bool forward); - /// Sets the window active state. If a window active state is false, the window will not obtain the focus when a mouse clicks on it wich will be obteined by take_if_has_active_false. + /// Sets the window active state. If a window active state is false, the window will not obtain the focus when a mouse clicks on it which will be obtained by take_if_has_active_false. void take_active(window, bool has_active, window take_if_has_active_false); /// Copies the graphics of a specified to a new graphics object. diff --git a/include/nana/gui/timer.hpp b/include/nana/gui/timer.hpp index 169f0f76..7ff26077 100644 --- a/include/nana/gui/timer.hpp +++ b/include/nana/gui/timer.hpp @@ -9,7 +9,7 @@ * @file: nana/gui/timer.hpp * @description: * A timer can repeatedly call a piece of code. The duration between - * calls is specified in milliseconds. Timer is defferent from other graphics + * calls is specified in milliseconds. Timer is different from other graphics * controls, it has no graphics interface. */ diff --git a/include/nana/gui/widgets/categorize.hpp b/include/nana/gui/widgets/categorize.hpp index dcbdde12..7cf90000 100644 --- a/include/nana/gui/widgets/categorize.hpp +++ b/include/nana/gui/widgets/categorize.hpp @@ -115,7 +115,7 @@ namespace nana bool clear(); //splitstr - //@brief: Sets the splitstr. If the parameter will be ingored if it is an empty string. + //@brief: Sets the splitstr. If the parameter will be ignored if it is an empty string. void splitstr(const ::std::string&); const ::std::string& splitstr() const; diff --git a/include/nana/gui/widgets/float_listbox.hpp b/include/nana/gui/widgets/float_listbox.hpp index 97670410..30492c27 100644 --- a/include/nana/gui/widgets/float_listbox.hpp +++ b/include/nana/gui/widgets/float_listbox.hpp @@ -91,7 +91,7 @@ namespace nana * @param window A handle to a window which is a owner of float_listbox * @param rectangle A position and a size of float_listbox * @param is_ignore_first_mouse_up The flost_listbox will be closed when a mouse_up is emitted, this parameter is specified for ignoring the first mouse_up emitting. - * @remark The float_listbox can be popupped in a mouse_down event, the next mouse_up may be ignored, otherwise the float_listbox will be closed when user releases the button. + * @remark The float_listbox can be pop-upped in a mouse_down event, the next mouse_up may be ignored, otherwise the float_listbox will be closed when user releases the button. */ float_listbox(window, const rectangle&, bool is_ignore_first_mouse_up); diff --git a/include/nana/gui/widgets/listbox.hpp b/include/nana/gui/widgets/listbox.hpp index b6279630..1d9cdec0 100644 --- a/include/nana/gui/widgets/listbox.hpp +++ b/include/nana/gui/widgets/listbox.hpp @@ -651,7 +651,7 @@ namespace nana }; - /// usefull for both absolute and display (sorted) positions + /// useful for both absolute and display (sorted) positions struct index_pair { constexpr static const size_type npos = ::nana::npos; @@ -712,7 +712,7 @@ namespace nana // struct essence //@brief: this struct gives many data for listbox, - // the state of the struct does not effect on member funcions, therefore all data members are public. + // the state of the struct does not effect on member functions, therefore all data members are public. struct essence; class oresolver @@ -806,7 +806,7 @@ namespace nana drawer_lister_impl *drawer_lister_; };//end class trigger - /// operate with absolute positions and contain only the position but montain pointers to parts of the real items + /// operate with absolute positions and contain only the position but maintain pointers to parts of the real items /// item_proxy self, it references and iterators are not invalidated by sort() class item_proxy : public ::nana::widgets::detail::widget_iterator @@ -814,11 +814,11 @@ namespace nana public: item_proxy(essence*, const index_pair& = index_pair{npos, npos}); - /// the main porpose of this it to make obvious that item_proxy operate with absolute positions, and dont get moved during sort() + /// the main purpose of this it to make obvious that item_proxy operate with absolute positions, and don't get moved during sort() static item_proxy from_display(essence *, const index_pair &relative) ; item_proxy from_display(const index_pair &relative) const; - /// posible use: last_selected_display = last_selected.to_display().item; use with caution, it get invalidated after a sort() + /// possible use: last_selected_display = last_selected.to_display().item; use with caution, it get invalidated after a sort() index_pair to_display() const; /// Determines whether the item is displayed on the screen @@ -837,9 +837,9 @@ namespace nana /// Determines whether the item is checked bool checked() const; - /// Selects/unselects the item + /// Selects/deselects the item /** - * @param sel Indicates whether to select or unselect the item + * @param sel Indicates whether to select or deselect the item * @param scroll_view Indicates whether to scroll the view to the item. It is ignored if the item is displayed. * @return the reference of *this. */ @@ -1176,7 +1176,7 @@ namespace nana { drawerbase::listbox::cat_proxy category; - /// A flag that indicates whether or not to block expension/shrink of category when it is double clicking. + /// A flag that indicates whether or not to block expansion/shrink of category when it is double clicked. mutable bool block_operation{ false }; arg_listbox_category(const drawerbase::listbox::cat_proxy&) noexcept; @@ -1189,7 +1189,7 @@ namespace nana struct listbox_events : public general_events { - /// An envent occurs when the toggle of a listbox item is checked. + /// An event occurs when the toggle of a listbox item is checked. basic_event checked; /// An event occurs when a listbox item is clicked. @@ -1244,8 +1244,8 @@ By \a clicking on one header the list get \a reordered, first up, and then down 1. The resolver is used to resolute an object of the specified type into (or back from) a listbox item. 3. nana::listbox creates the category 0 by default. - This is an special category, becouse it is invisible, while the associated items are visible. - The optional, user-created categories begin at index 1 and are visibles. + This is an special category, because it is invisible, while the associated items are visible. + The optional, user-created categories begin at index 1 and are visible. The member functions without the categ parameter operate the items that belong to category 0. 4. A sort compare is used for sorting the items. It is a strict weak ordering comparer that must meet the requirement: Irreflexivity (comp(x, x) returns false) @@ -1276,15 +1276,15 @@ By \a clicking on one header the list get \a reordered, first up, and then down cat.at(0).value(10); //10 is custom data. cat.at(1).value(20); //20 is custom data. 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 +among others. +That means that listbox have a member trigger_ constructed first and accessible with get_drawer_trigger() and +a member (unique pointer to) scheme_ accessible with scheme_type& scheme() created in the constructor with API::dev::make_scheme() which call API::detail::make_scheme(::nana::detail::scheme_factory()) 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(other))); -and which in create is setted with: API::dev::set_scheme(handle_, scheme_.get()); which save the scheme pointer in +and which in create is set 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 @@ -1426,7 +1426,7 @@ the nana::detail::basic_window member pointer scheme /// Scrolls the view to the first or last item of a specified category void scroll(bool to_bottom, size_type cat_pos = ::nana::npos); - /// Scrolls the view to show an item sepcified by absolute position at top/bottom of the listbox. + /// Scrolls the view to show an item specified by absolute position at top/bottom of the listbox. void scroll(bool to_bottom, const index_pair& abs_pos); /// Appends a new column with a header text and the specified width at the end, and return it position @@ -1532,11 +1532,11 @@ the nana::detail::basic_window member pointer scheme std::function strick_ordering); - /// sort() and ivalidate any existing reference from display position to absolute item, that is: after sort() display offset point to different items + /// sort() and invalidates 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); size_type sort_col() const; - /// potencially ivalidate any existing reference from display position to absolute item, that is: after sort() display offset point to different items + /// potentially invalidates any existing reference from display position to absolute item, that is: after sort() display offset point to different items void unsort(); bool freeze_sort(bool freeze); diff --git a/include/nana/gui/widgets/menubar.hpp b/include/nana/gui/widgets/menubar.hpp index f0de0466..b159a775 100644 --- a/include/nana/gui/widgets/menubar.hpp +++ b/include/nana/gui/widgets/menubar.hpp @@ -61,7 +61,7 @@ namespace nana }//end namespace menubar }//end namespace drawerbase - /// \brief A toolbar at the top of window for popuping menus. + /// \brief A toolbar at the top of window for pop-upping menus. /// /// The widget sets as shortkey the character behind the first of & in the text, for the item. e.g. "File(&F)" or "&File". class menubar diff --git a/include/nana/gui/widgets/panel.hpp b/include/nana/gui/widgets/panel.hpp index 2e777458..2b6683d6 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, which in actual use makes no difference. + /// For placing other widgets, where the bool template parameter determines 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/progress.hpp b/include/nana/gui/widgets/progress.hpp index f43da854..37a5c890 100644 --- a/include/nana/gui/widgets/progress.hpp +++ b/include/nana/gui/widgets/progress.hpp @@ -47,8 +47,8 @@ namespace nana }; } }//end namespace drawerbase - /// \brief A progressbar widget with two styles: know, and unknow amount value (goal). - /// In unknow style the amount is ignored and the bar is scrolled when value change. + /// \brief A progressbar widget with two styles: know, and unknown amount value (goal). + /// In unknown style the amount is ignored and the bar is scrolled when value change. class progress : public widget_object { diff --git a/include/nana/gui/widgets/scroll.hpp b/include/nana/gui/widgets/scroll.hpp index 350e2e62..4261e9c3 100644 --- a/include/nana/gui/widgets/scroll.hpp +++ b/include/nana/gui/widgets/scroll.hpp @@ -53,7 +53,7 @@ namespace nana size_type peak; ///< the whole total 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 + size_type value; ///< current offset calculated from the very beginning buttons what; bool pressed; @@ -354,7 +354,7 @@ namespace nana /// Set the range of the widget. virtual void range(size_type r) = 0; - /// \brief Get the value (current offset calculated from the very beginnig) + /// \brief Get the value (current offset calculated from the very beginning) /// @return the value. virtual size_type value() const = 0; @@ -371,7 +371,7 @@ namespace nana /// @param s a value for step. virtual void step(size_type s) = 0; - /// \brief Increase/decrease values by a step (alternativelly by some number of steps). + /// \brief Increase/decrease values by a step (alternatively by some number of steps). /// @param forward it determines whether increase or decrease. /// @return true if the value is changed. virtual bool make_step(bool forward, unsigned steps = 1) = 0; @@ -438,7 +438,7 @@ namespace nana return this->get_drawer_trigger().range(r); } - /// \brief Get the value (current offset calculated from the very beginnig) + /// \brief Get the value (current offset calculated from the very beginning) /// @return the value. size_type value() const override { @@ -466,7 +466,7 @@ namespace nana return this->get_drawer_trigger().step(s); } - /// \brief Increase/decrease values by a step (alternativelly by some number of steps). + /// \brief Increase/decrease values by a step (alternatively by some number of steps). /// @param forward it determines whether increase or decrease. /// @return true if the value is changed. bool make_step(bool forward, unsigned steps = 1) override @@ -486,7 +486,7 @@ namespace nana /// \brief Increase/decrease values by steps as if it is scrolled through mouse wheel. /// @param forward it determines whether increase or decrease. - /// @return true if the vlaue is changed. + /// @return true if the value is changed. bool make_scroll(bool forward) { return this->make_step(forward, 3); // set this 3 in the metrics of the widget scheme ? @@ -494,7 +494,7 @@ namespace nana /// \brief Increase/decrease values by a page as if it is scrolled page up. /// @param forward it determines whether increase or decrease. - /// @return true if the vlaue is changed. + /// @return true if the value is changed. bool make_page_scroll(bool forward) { auto const count = range() / step(); diff --git a/include/nana/gui/widgets/slider.hpp b/include/nana/gui/widgets/slider.hpp index 2fc015ce..5cbffa9a 100644 --- a/include/nana/gui/widgets/slider.hpp +++ b/include/nana/gui/widgets/slider.hpp @@ -134,7 +134,7 @@ namespace nana }//end namespace drawerbase - /// A slider widget wich the user can drag for tracking + /// A slider widget which the user can drag for tracking class slider : public widget_object { diff --git a/include/nana/gui/widgets/spinbox.hpp b/include/nana/gui/widgets/spinbox.hpp index 3053f37b..d1f779e0 100644 --- a/include/nana/gui/widgets/spinbox.hpp +++ b/include/nana/gui/widgets/spinbox.hpp @@ -103,10 +103,10 @@ namespace nana std::pair range_int() const; std::pair range_double() const; - /// Selects/unselects the text + /// Selects/Deselects the text void select(bool); - /// Gets the spinned value + /// Gets the spun value ::std::string value() const; void value(const ::std::string&); int to_int() const; diff --git a/include/nana/gui/widgets/tabbar.hpp b/include/nana/gui/widgets/tabbar.hpp index 863b66ec..2ebea403 100644 --- a/include/nana/gui/widgets/tabbar.hpp +++ b/include/nana/gui/widgets/tabbar.hpp @@ -328,7 +328,7 @@ namespace nana tabbar& append(std::wstring text, window attach_wd, value_type value = {}) { if (attach_wd && API::empty_window(attach_wd)) - throw std::invalid_argument("Appening a tab to a tabbar - error: tabbar.attach: invalid window handle"); + throw std::invalid_argument("Appending a tab to a tabbar - error: tabbar.attach: invalid window handle"); this->get_drawer_trigger().insert(::nana::npos, to_nstring(std::move(text)), std::move(value)); if (attach_wd) @@ -409,7 +409,7 @@ namespace nana this->get_drawer_trigger().text(pos, to_nstring(str)); } - std::string text(std::size_t pos) const /// Returns a title of a specified item, If pos is invalid, the method trhows a std::out_of_range object. + std::string text(std::size_t pos) const /// Returns a title of a specified item, If pos is invalid, the method throws a std::out_of_range object. { return to_utf8(this->get_drawer_trigger().text(pos)); } diff --git a/include/nana/gui/widgets/textbox.hpp b/include/nana/gui/widgets/textbox.hpp index 8bf34b38..68c408b7 100644 --- a/include/nana/gui/widgets/textbox.hpp +++ b/include/nana/gui/widgets/textbox.hpp @@ -223,7 +223,7 @@ namespace nana bool selected() const; bool get_selected_points(nana::upoint &a, nana::upoint &b) const; - /// Selects/unselects all text. + /// Selects/Deselects all text. void select(bool); void select_points(nana::upoint arg_a, nana::upoint arg_b); diff --git a/include/nana/gui/widgets/treebox.hpp b/include/nana/gui/widgets/treebox.hpp index ba40c4c1..bbf8fa85 100644 --- a/include/nana/gui/widgets/treebox.hpp +++ b/include/nana/gui/widgets/treebox.hpp @@ -194,7 +194,7 @@ namespace nana bool empty() const; /// \brief Return the distance between the ROOT node and this node. - /// @return only available when emtpy() is false. + /// @return only available when empty() is false. std::size_t level() const; /// Return the check state @@ -309,7 +309,7 @@ namespace nana return *this; } - // Undocumentated methods for internal use + // Undocumented methods for internal use trigger::node_type * _m_node() const; private: nana::any& _m_value(); @@ -397,7 +397,7 @@ namespace nana const nana::pat::cloneable & placer() const; - /// \brief Eanble the widget to be draws automatically when it is operated. + /// \brief Enable the widget to be draws automatically when it is operated. /// /// The treebox automatically redraws after certain operations, but, /// under some circumstances, it is good to disable the automatic drawing mode, @@ -441,7 +441,7 @@ namespace nana /// If 'hovered' or 'expanded' are not set, it uses 'normal' state image for these 2 states. /// See also in [documentation](http://nanapro.org/en-us/help/widgets/treebox.htm) /// @param id The name of an icon scheme. If the name is not existing, it creates a new scheme for the name. - /// @return The reference of node image scheme correspending with the specified id. + /// @return The reference of node image scheme corresponding with the specified id. node_image_type& icon(const ::std::string& id); void icon_erase(const ::std::string& id); diff --git a/include/nana/gui/wvl.hpp b/include/nana/gui/wvl.hpp index ccee91d3..c18be253 100644 --- a/include/nana/gui/wvl.hpp +++ b/include/nana/gui/wvl.hpp @@ -61,7 +61,7 @@ namespace nana #ifdef NANA_AUTOMATIC_GUI_TESTING - /// @brief Take control of the GUI and optionaly automaticaly tests it. + /// @brief Take control of the GUI and optionally automatically tests it. /// /// @detail It transfers to nana the program flow control, which begin pumping messages /// from the underlying OS, interpreting and sending it with suitable arguments @@ -71,10 +71,10 @@ namespace nana void exec( unsigned wait = 1, ///< for the GUI to be constructed, in seconds unsigned wait_end = 1, ///< for the GUI to be destructed, in seconds - std::function = {} ///< emit events to mimics user actions and may asert results + std::function = {} ///< emit events to mimics user actions and may assert results ); - /// send a click message to this widget - useffull in GUI testing + /// send a click message to this widget - useful in GUI testing void click(widget& w); /// in seconds diff --git a/include/nana/paint/detail/image_process_provider.hpp b/include/nana/paint/detail/image_process_provider.hpp index e3d0ca6f..761544a3 100644 --- a/include/nana/paint/detail/image_process_provider.hpp +++ b/include/nana/paint/detail/image_process_provider.hpp @@ -99,7 +99,7 @@ namespace nana //add //@brief: The add operation is successful if the name does not exist. - // it does not replace the existing object by new object, becuase this + // it does not replace the existing object by new object, because this // feature is thread safe and efficiency. template void add(Tag & tag, const std::string& name) diff --git a/include/nana/stdc++.hpp b/include/nana/stdc++.hpp index 54d62f73..bcdc4fcb 100644 --- a/include/nana/stdc++.hpp +++ b/include/nana/stdc++.hpp @@ -21,35 +21,35 @@ #if defined(STD_NUMERIC_CONVERSIONS_NOT_SUPPORTED) namespace std { - //Workaround for no implemenation of std::stoi in MinGW. + //Workaround for no implementation of std::stoi in MinGW. int stoi(const std::string&, std::size_t * pos = nullptr, int base = 10); int stoi(const std::wstring&, std::size_t* pos = nullptr, int base = 10); - //Workaround for no implemenation of std::stof in MinGW. + //Workaround for no implementation of std::stof in MinGW. float stof(const std::string&, std::size_t * pos = nullptr); float stof(const std::wstring&, std::size_t* pos = nullptr); - //Workaround for no implemenation of std::stod in MinGW. + //Workaround for no implementation of std::stod in MinGW. double stod(const std::string&, std::size_t * pos = nullptr); double stod(const std::wstring&, std::size_t* pos = nullptr); - //Workaround for no implemenation of std::stold in MinGW. + //Workaround for no implementation of std::stold in MinGW. long double stold(const std::string&, std::size_t * pos = nullptr); long double stold(const std::wstring&, std::size_t* pos = nullptr); - //Workaround for no implemenation of std::stol in MinGW. + //Workaround for no implementation of std::stol in MinGW. long stol(const std::string&, std::size_t* pos = nullptr, int base = 10); long stol(const std::wstring&, std::size_t* pos = nullptr, int base = 10); - //Workaround for no implemenation of std::stoll in MinGW. + //Workaround for no implementation of std::stoll in MinGW. long long stoll(const std::string&, std::size_t* pos = nullptr, int base = 10); long long stoll(const std::wstring&, std::size_t* pos = nullptr, int base = 10); - //Workaround for no implemenation of std::stoul in MinGW. + //Workaround for no implementation of std::stoul in MinGW. unsigned long stoul(const std::string&, std::size_t* pos = nullptr, int base = 10); unsigned long stoul(const std::wstring&, std::size_t* pos = nullptr, int base = 10); - //Workaround for no implemenation of std::stoull in MinGW. + //Workaround for no implementation of std::stoull in MinGW. unsigned long long stoull(const std::string&, std::size_t* pos = nullptr, int base = 10); unsigned long long stoull(const std::wstring&, std::size_t* pos = nullptr, int base = 10); } @@ -58,7 +58,7 @@ namespace std #ifdef STD_TO_STRING_NOT_SUPPORTED namespace std { - //Workaround for no implemenation of std::to_string/std::to_wstring in MinGW. + //Workaround for no implementation of std::to_string/std::to_wstring in MinGW. std::string to_string(long double); std::string to_string(double); std::string to_string(unsigned); @@ -131,7 +131,7 @@ namespace std { #include namespace std { - //Workaround for no implemenation of std::put_time in gcc < 5. + //Workaround for no implementation of std::put_time in gcc < 5. /* std unspecified return type */ //template< class CharT, class RTSTR >// let fail for CharT != char / wchar_t //RTSTR put_time(const std::tm* tmb, const CharT* fmt); diff --git a/source/basic_types.cpp b/source/basic_types.cpp index dafe8574..fa6c5e67 100644 --- a/source/basic_types.cpp +++ b/source/basic_types.cpp @@ -100,7 +100,7 @@ namespace nana //Initializes the color with a CSS-like string //contributor: BigDave(mortis2007 at hotmail co uk) //date: February 3, 2015 - //maintainor: Jinhao, extended the support of CSS-spec + //maintainer: Jinhao, extended the support of CSS-spec color::color(std::string css_color) : a_(1.0) diff --git a/source/charset.cpp b/source/charset.cpp index 4ea53570..91d7855f 100644 --- a/source/charset.cpp +++ b/source/charset.cpp @@ -349,7 +349,7 @@ namespace nana virtual std::wstring&& wstr_move() = 0; }; - /// playing with the idea - we need a mechanisme to set a user selected police - Testing an abtract interphase + /// playing with the idea - we need a mechanism to set a user selected police - Testing an abstract interface struct encoding_error_police { virtual unsigned long next_code_point(const unsigned char*& current_code_unit, const unsigned char* end) = 0; @@ -689,14 +689,14 @@ namespace nana } unsigned ch = *p; unsigned long code; - if(ch < 0xC0) // error? - move to end. Posible ANSI or ISO code-page + if(ch < 0xC0) // error? - move to end. Possible ANSI or ISO code-page { //return *(p++); // temp: assume equal //p = end; //return 0; return def_encoding_error_police->next_code_point(p, end); } - else if(ch < 0xE0 && (p + 1 <= end)) // two byte chararcter + else if(ch < 0xE0 && (p + 1 <= end)) // two byte character { code = ((ch & 0x1F) << 6) | (p[1] & 0x3F); p += 2; diff --git a/source/deploy.cpp b/source/deploy.cpp index 1ae165ef..465988b3 100644 --- a/source/deploy.cpp +++ b/source/deploy.cpp @@ -9,7 +9,7 @@ * * @file: nana/depoly.cpp * - * What follow are dependented on what defined in nana/config.hpp + * What follows is dependent on what defined in nana/config.hpp */ #include diff --git a/source/filesystem/filesystem.cpp b/source/filesystem/filesystem.cpp index b13e8465..2c1060f6 100644 --- a/source/filesystem/filesystem.cpp +++ b/source/filesystem/filesystem.cpp @@ -8,7 +8,7 @@ * * @file: nana/filesystem/filesystem.cpp * @description: - * provide some interface for file managment + * provide some interface for file management */ #include @@ -283,7 +283,7 @@ namespace nana { namespace experimental { namespace filesystem path path::extension() const { - // todo: make more globlal + // todo: make more global #if defined(NANA_WINDOWS) auto SLorP=L"\\/."; auto P=L'.'; diff --git a/source/gui/animation.cpp b/source/gui/animation.cpp index 16e54729..f897735f 100644 --- a/source/gui/animation.cpp +++ b/source/gui/animation.cpp @@ -180,7 +180,7 @@ namespace nana //struct frameset::impl struct frameset::impl { - //Only list whos iterator would not invalided after a insertion. + //Only list whose iterator would not be invalidated after an insertion. std::list frames; std::list::iterator this_frame; std::size_t pos_in_this_frame{ 0 }; diff --git a/source/gui/detail/basic_window.cpp b/source/gui/detail/basic_window.cpp index a52b2215..8d2a9e89 100644 --- a/source/gui/detail/basic_window.cpp +++ b/source/gui/detail/basic_window.cpp @@ -401,7 +401,7 @@ namespace nana extra_width = extra_height = 0; //The window must keep its thread_id same as its parent if it is a child. - //Otherwise, its root buffer would be mapped repeatly if it is in its parent thread. + //Otherwise, its root buffer would be mapped repeatedly if it is in its parent thread. thread_id = nana::system::this_thread_id(); if(agrparent && (thread_id != agrparent->thread_id)) thread_id = agrparent->thread_id; diff --git a/source/gui/detail/bedrock_windows.cpp b/source/gui/detail/bedrock_windows.cpp index bd02a00d..804e991d 100644 --- a/source/gui/detail/bedrock_windows.cpp +++ b/source/gui/detail/bedrock_windows.cpp @@ -214,7 +214,7 @@ namespace detail if(wd_manager().number_of_core_window()) { std::string msg = "Nana.GUI detects a memory leaks in window_manager, " + std::to_string(wd_manager().number_of_core_window()) + " window(s) are not uninstalled."; - std::cerr << msg; /// \todo add list of cations of open windows and if aut testin GUI do auto Ok after 2 sec. + std::cerr << msg; /// \todo add list of cations of opening windows and if auto testing GUI do auto OK after 2 seconds. ::MessageBoxA(0, msg.c_str(), ("Nana C++ Library"), MB_OK); } @@ -223,7 +223,7 @@ namespace detail } - /// @brief increament the number of windows in the thread id + /// @brief increment the number of windows in the thread id int bedrock::inc_window(thread_t tid) { //impl refers to the object of private_impl, the object is created when bedrock is creating. @@ -592,7 +592,7 @@ namespace detail delete [] reinterpret_cast(wParam); return true; case nana::detail::messages::remote_thread_destroy_window: - detail::native_interface::close_window(reinterpret_cast(wd)); //The owner would be actived before the message has posted in current thread. + detail::native_interface::close_window(reinterpret_cast(wd)); //The owner would be activated before the message has posted in current thread. { internal_scope_guard sg; auto * thrd = bedrock.get_thread_context(); @@ -896,8 +896,8 @@ namespace detail //Don't take care about whether msgwnd is equal to the pressed_wd. // - //pressed_wd will remains when opens a no-actived window in an mouse_down event(like combox popups the drop-list). - //After the no-actived window is closed, the window doesn't respond to the mouse click other than pressed_wd. + //pressed_wd will remain when opens a non-activated window in an mouse_down event(like combox popups the drop-list). + //After the non-activated window is closed, the window doesn't respond to the mouse click other than pressed_wd. pressed_wd = nullptr; if (nullptr == msgwnd) break; @@ -1330,7 +1330,7 @@ namespace detail msgwnd = msgwnd->root_widget->other.attribute.root->menubar; if(msgwnd) { - //Don't call default window proc to avoid popuping system menu. + //Don't call default window proc to avoid pop-upping system menu. def_window_proc = false; bool set_focus = (brock.focus() != msgwnd) && (!msgwnd->root_widget->flags.ignore_menubar_focus); @@ -1416,8 +1416,8 @@ namespace detail if (msgwnd->root_widget->other.attribute.root->menubar == msgwnd) { //In order to keep the focus on the menubar, cancel the delay_restore - //when pressing ESC to close the menu which is popuped by the menubar. - //If no menu popuped by the menubar, it should enable delay restore to + //when pressing ESC to close the menu which is pop-upped by the menubar. + //If no menu pop-upped by the menubar, it should enable delay restore to //restore the focus for taken window. int cmd = (menu_wd && (keyboard::escape == static_cast(wParam)) ? 1 : 0); @@ -1522,7 +1522,7 @@ namespace detail if (!arg.cancel) { def_window_proc = true; - //Activate is owner, refer to the window_manager::close for the explaination + //Activates its owner, refer to the window_manager::close for the explanation if (msgwnd->flags.modal || (msgwnd->owner == 0) || msgwnd->owner->flags.take_active) native_interface::activate_owner(msgwnd->root); } @@ -1532,7 +1532,7 @@ namespace detail if (msgwnd->root == brock.get_menu()) { brock.erase_menu(false); - brock.delay_restore(3); //Restores if delay_restore not decleared + brock.delay_restore(3); //Restores if delay_restore not declared } wd_manager.destroy(msgwnd); nana::detail::platform_spec::instance().release_window_icon(msgwnd->root); @@ -1578,7 +1578,7 @@ namespace detail delete passoc; } - //Generates an identitifer for an accel key. + //Generates an identifier for an accel key. std::pair id_accel_key(const accel_key& key) { std::pair ret; diff --git a/source/gui/detail/native_window_interface.cpp b/source/gui/detail/native_window_interface.cpp index 2d2d0e58..efe49d21 100644 --- a/source/gui/detail/native_window_interface.cpp +++ b/source/gui/detail/native_window_interface.cpp @@ -133,7 +133,7 @@ namespace nana{ //The XMoveWindow and XMoveResizeWindow don't take effect if the specified window is - //unmapped, and the members x and y of XSetSizeHints is obsoluted. So the position that + //unmapped, and the members x and y of XSetSizeHints is obsoleted. So the position that //set to a unmapped windows should be kept and use the position when the window is mapped. std::map exposed_positions; //locked by platform_scope_guard @@ -498,7 +498,7 @@ namespace nana{ { if(nullptr == parent) return nullptr; #if defined(NANA_WINDOWS) - HWND handle = ::CreateWindowEx(WS_EX_CONTROLPARENT, // Extended possibilites for variation + HWND handle = ::CreateWindowEx(WS_EX_CONTROLPARENT, // Extended possibilities for variation L"NanaWindowInternal", L"Nana Child Window", // Title Text WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_CLIPSIBLINGS, @@ -703,7 +703,7 @@ namespace nana{ ::PostMessage(reinterpret_cast(wd), nana::detail::messages::remote_thread_destroy_window, 0, 0); } #elif defined(NANA_X11) - //Under X, XDestroyWindow destroys the specified window and generats a DestroyNotify + //Under X, XDestroyWindow destroys the specified window and generates a DestroyNotify //event, when the client receives the event, the specified window has been already //destroyed. This is a feature which is different from Windows. So the following //works should be handled before calling XDestroyWindow. @@ -711,7 +711,7 @@ namespace nana{ if(wd == brock.get_menu()) { brock.erase_menu(false); - brock.delay_restore(3); //Restores if delay_restore is not decleard + brock.delay_restore(3); //Restores if delay_restore is not declared } Display* disp = restrict::spec.open_display(); diff --git a/source/gui/detail/window_layout.cpp b/source/gui/detail/window_layout.cpp index 12b5f86f..b0187eec 100644 --- a/source/gui/detail/window_layout.cpp +++ b/source/gui/detail/window_layout.cpp @@ -88,7 +88,7 @@ namespace nana //read_visual_rectangle ///@brief Reads the visual rectangle of a window, the visual rectangle's reference frame is to root widget, /// the visual rectangle is a rectangular block that a window should be displayed on screen. - /// The result is a rectangle that is a visible area for its ancesters. + /// The result is a rectangle that is a visible area for its ancestors. bool window_layout::read_visual_rectangle(core_window_t* wd, nana::rectangle& visual) { if (! wd->displayed()) return false; diff --git a/source/gui/detail/window_manager.cpp b/source/gui/detail/window_manager.cpp index 6349685d..a6d8c249 100644 --- a/source/gui/detail/window_manager.cpp +++ b/source/gui/detail/window_manager.cpp @@ -511,7 +511,7 @@ namespace detail if (impl_->wd_register.available(owner)) { if (owner->flags.destroying) - throw std::runtime_error("the specified owner is destoryed"); + throw std::runtime_error("the specified owner is destroyed"); native = owner->root_widget->root; r.x += owner->pos_root.x; @@ -592,7 +592,7 @@ namespace detail brock.emit(event_code::unload, wd, arg, true, brock.get_thread_context()); if (false == arg.cancel) { - //Before close the window, its owner window should be actived, otherwise other window will be + //Before close the window, its owner window should be activated, otherwise other window will be //activated due to the owner window is not enabled. if(wd->flags.modal || (wd->owner == nullptr) || wd->owner->flags.take_active) native_interface::activate_owner(wd->root); @@ -601,7 +601,7 @@ namespace detail { //Close should detach the drawer and send destroy signal to widget object. //Otherwise, when a widget object is been deleting in other thread by delete operator, the object will be destroyed - //before the window_manager destroyes the window, and then, window_manager detaches the + //before the window_manager destroys the window, and then, window_manager detaches the //non-existing drawer_trigger which is destroyed by destruction of widget. Crash! wd->drawer.detached(); wd->widget_notifier->destroy(); @@ -894,7 +894,7 @@ namespace detail } } - //Before resiz the window, creates the new graphics + //Before resizing the window, creates the new graphics paint::graphics graph; paint::graphics root_graph; if (category::flags::lite_widget != wd->other.category) @@ -1191,7 +1191,7 @@ namespace detail //A fix by Katsuhisa Yuasa //The menubar token window will be redirected to the prev focus window when the new //focus window is a menubar. - //The focus window will be restored to the prev focus which losts the focus becuase of + //The focus window will be restored to the prev focus which losts the focus because of //memberbar. if (prev_focus && (wd == wd->root_widget->other.attribute.root->menubar)) wd = prev_focus; @@ -1302,7 +1302,7 @@ namespace detail //enable_tabstop //@brief: when users press a TAB, the focus should move to the next widget. - // this method insert a window which catchs an user TAB into a TAB window container + // this method insert a window which catches an user TAB into a TAB window container // the TAB window container is held by a wd's root widget. Not every widget has a TAB window container, // the container is created while a first Tab Window is setting void window_manager::enable_tabstop(core_window_t* wd) @@ -1728,7 +1728,7 @@ namespace detail void window_manager::_m_move_core(core_window_t* wd, const point& delta) { - if(category::flags::root != wd->other.category) //A root widget always starts at (0, 0) and its childs are not to be changed + if(category::flags::root != wd->other.category) //A root widget always starts at (0, 0) and its children are not to be changed { wd->pos_root += delta; diff --git a/source/gui/filebox.cpp b/source/gui/filebox.cpp index 5b2db9e2..53530ba5 100644 --- a/source/gui/filebox.cpp +++ b/source/gui/filebox.cpp @@ -1239,7 +1239,7 @@ namespace nana if(!child.empty()) { child->icon("icon-folder"); - //The try-catch can be eleminated by using + //The try-catch can be eliminated by using //directory_iterator( const std::filesystem::path& p, std::error_code& ec ) noexcept; //in C++17 try diff --git a/source/gui/msgbox.cpp b/source/gui/msgbox.cpp index 7263aa84..bdd6d5c6 100644 --- a/source/gui/msgbox.cpp +++ b/source/gui/msgbox.cpp @@ -745,7 +745,7 @@ namespace nana impl->label_text = std::move(label); } - //Instance for impl_ because implmenet is incomplete type at the point of declaration + //Instance for impl_ because implement is incomplete type at the point of declaration inputbox::integer::~integer(){} int inputbox::integer::value() const @@ -828,7 +828,7 @@ namespace nana impl->label_text = std::move(label); } - //Instance for impl_ because implmenet is incomplete type at the point of declaration + //Instance for impl_ because implement is incomplete type at the point of declaration inputbox::real::~real(){} double inputbox::real::value() const @@ -920,7 +920,7 @@ namespace nana impl_->label_text.swap(label); } - //Instance for impl_ because implmenet is incomplete type at the point of declaration + //Instance for impl_ because implement is incomplete type at the point of declaration inputbox::text::~text(){} void inputbox::text::tip_string(std::wstring tip) @@ -1041,7 +1041,7 @@ namespace nana impl_->label_text.swap(label); } - //Instance for impl_ because implmenet is incomplete type at the point of declaration + //Instance for impl_ because implement is incomplete type at the point of declaration inputbox::date::~date(){} ::std::string inputbox::date::value() const @@ -1192,7 +1192,7 @@ namespace nana { } - //Instance for impl_ because implmenet is incomplete type at the point of declaration + //Instance for impl_ because implement is incomplete type at the point of declaration inputbox::path::~path(){} ::std::string inputbox::path::value() const diff --git a/source/gui/place.cpp b/source/gui/place.cpp index 9b278111..5b064df8 100644 --- a/source/gui/place.cpp +++ b/source/gui/place.cpp @@ -2666,7 +2666,7 @@ namespace nana } } - //Collocate doesn't sync the visiblity of fastened windows. + //Collocate doesn't sync the visibility of fastened windows. //This is a feature that allows tabbar panels to be fastened to a same field, the collocate() //shouldn't break the visibility of panels that are maintained by tabbar. field.second->visible(is_show, false); @@ -2903,14 +2903,14 @@ namespace nana token unmatch = token::width; switch (div_type) { - case token::eof: // "horitontal" div + case token::eof: // "horizontal" div case token::vert: // "vertical" div if(token::eof == div_type) unmatch = token::height; for (auto& ch : children) if (ch->weigth_type == unmatch) - throw std::invalid_argument("nana.place: unmatch vertical-heigth/horizontal-width betwen division '" + throw std::invalid_argument("nana.place: unmatch vertical-height/horizontal-width between division '" +name+"' and children division '" + ch->name); div.reset(new div_arrange(token::vert == div_type, std::move(name), std::move(arrange))); @@ -3033,7 +3033,7 @@ namespace nana void place::implement::check_unique(const division* div) const { //The second field_impl is useless. Reuse the map type in order to - //reduce the size of the generated code, becuase std::set + //reduce the size of the generated code, because std::set //will create a new template class. std::map unique; field_gather tmp(nullptr); @@ -3198,7 +3198,7 @@ namespace nana try { impl_->connect(div.get()); //throws if there is a redefined name of field. - impl_->root_division.reset(); //clear atachments div-fields + impl_->root_division.reset(); //clear attachments div-fields impl_->root_division.swap(div); impl_->div_text.swap(div_text); } @@ -3322,7 +3322,7 @@ namespace nana if (div) { if (div->field && (div->field != p)) - throw std::runtime_error("nana.place: unexpected error, the division attachs a unexpected field."); + throw std::runtime_error("nana.place: unexpected error, the division attaches an unexpected field."); div->field = p; p->attached = div; diff --git a/source/gui/programming_interface.cpp b/source/gui/programming_interface.cpp index 148667ff..cce58b9e 100644 --- a/source/gui/programming_interface.cpp +++ b/source/gui/programming_interface.cpp @@ -262,7 +262,7 @@ namespace API iwd->drawer.graphics.make(iwd->dimension); iwd->drawer.graphics.rectangle(true, iwd->annex.scheme->background.get_color()); iwd->drawer.attached(wd, dr); - iwd->drawer.refresh(); //Always redrawe no matter it is visible or invisible. This can make the graphics data correctly. + iwd->drawer.refresh(); //Always redraw no matter it is visible or invisible. This can make the graphics data correctly. } } @@ -456,12 +456,12 @@ namespace API } //transform_shortkey_text - //@brief: This function searchs 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 + //@brief: This function searches whether the text contains a '&' and removes the character for transforming. + // If the text contains more than one '&' character, the others are ignored. e.g // text = "&&a&bcd&ef", the result should be "&abcdef", shortkey = 'b', and pos = 2. //@param, text: the text is transformed. //@param, shortkey: the character which indicates a short key. - //@param, skpos: retrives the shortkey position if it is not a null_ptr; + //@param, skpos: retrieves the shortkey position if it is not a null_ptr; std::string transform_shortkey_text(std::string text, wchar_t &shortkey, std::string::size_type *skpos) { shortkey = 0; @@ -1057,7 +1057,7 @@ namespace API else return; - //modal has to guarantee that does not lock the mutex of window_manager before invokeing the pump_event, + //modal has to guarantee that does not lock the mutex of window_manager before invoking the pump_event, //otherwise, the modal will prevent the other thread access the window. restrict::bedrock.pump_event(wd, true); } diff --git a/source/gui/timer.cpp b/source/gui/timer.cpp index b19a3b11..b65f51d6 100644 --- a/source/gui/timer.cpp +++ b/source/gui/timer.cpp @@ -10,7 +10,7 @@ * @file: nana/gui/timer.hpp * @description: * A timer can repeatedly call a piece of code. The duration between - * calls is specified in milliseconds. Timer is defferent from other graphics + * calls is specified in milliseconds. Timer is different from other graphics * controls, it has no graphics interface. * @contributors: Benjamin Navarro(pr#81) */ diff --git a/source/gui/widgets/categorize.cpp b/source/gui/widgets/categorize.cpp index b00bdf8c..19d3ab23 100644 --- a/source/gui/widgets/categorize.cpp +++ b/source/gui/widgets/categorize.cpp @@ -446,7 +446,7 @@ namespace nana { r.width = i->value.second.pixels; //If the item is over the right border of widget, the item would be painted at - //the begining of the next line. + //the beginning of the next line. if(r.right() > xend) { r.x = xbase; @@ -573,7 +573,7 @@ namespace nana style_.listbox->events().destroy.connect_unignorable([this](const arg_destroy&) { - //Close list when listbox is destoryed + //Close list when listbox is destroyed style_.mode = mode::normal; style_.state = mouse_action::normal; @@ -646,7 +646,7 @@ namespace nana } else { - //Too many items, so some of items cann't be displayed + //Too many items, so some of items can't be displayed r.x += 16; r.width -= 16; return r; @@ -918,5 +918,5 @@ namespace nana } //end class trigger }//end namespace categorize - }//end namespace draerbase + }//end namespace drawerbase }//end namespace nana diff --git a/source/gui/widgets/combox.cpp b/source/gui/widgets/combox.cpp index 619446a2..da62f793 100644 --- a/source/gui/widgets/combox.cpp +++ b/source/gui/widgets/combox.cpp @@ -293,7 +293,7 @@ namespace nana //The lister window closes by itself. I just take care about the destroy event. //The event should be destroy rather than unload. Because the unload event is invoked while - //the lister is not closed, if popuping a message box, the lister will cover the message box. + //the lister is not closed, if pop-upping a message box, the lister will cover the message box. state_.lister->events().destroy.connect_unignorable([this](const arg_destroy&) { state_.lister = nullptr; //The lister closes by itself. diff --git a/source/gui/widgets/date_chooser.cpp b/source/gui/widgets/date_chooser.cpp index b2f743e4..739a86ac 100644 --- a/source/gui/widgets/date_chooser.cpp +++ b/source/gui/widgets/date_chooser.cpp @@ -532,7 +532,7 @@ namespace nana perf_transform_helper(window_handle, transf, graph, dirtybuf, gbuf, refpos); } private: - //renderring functions + //rendering functions void _m_calc_basis(graph_reference graph, const nana::point& refpos) { diff --git a/source/gui/widgets/group.cpp b/source/gui/widgets/group.cpp index 1e0e868c..726814e8 100644 --- a/source/gui/widgets/group.cpp +++ b/source/gui/widgets/group.cpp @@ -312,14 +312,14 @@ checkbox& group::add_option(std::string text) drawing dw(*this); //When the group is resized, the drawing is called before moving the caption, but - //the drawing of group requires the lastest position of caption for gradual rectangle. - //For the requirement, a move event handler is required for listning the change of caption's position. + //the drawing of group requires the latest position of caption for gradual rectangle. + //For the requirement, a move event handler is required for listening the change of caption's position. impl_->caption.events().move([this](const arg_move&){ if (align::left != impl_->caption_align) API::refresh_window(*this); }); - // This drawing function is owner by the onwer of dw (the outer panel of the group widget), not by dw !! + // This drawing function is owner by the owner of dw (the outer panel of the group widget), not by dw !! dw.draw([this](paint::graphics& graph) { auto gap_px = impl_->gap - 1; diff --git a/source/gui/widgets/label.cpp b/source/gui/widgets/label.cpp index 075591cc..77a6d0c0 100644 --- a/source/gui/widgets/label.cpp +++ b/source/gui/widgets/label.cpp @@ -376,7 +376,7 @@ namespace nana { text_pos += static_cast(extent_size.width); - //Adjust height of extent_size for special text alignement. + //Adjust height of extent_size for special text alignment. if (fblock::aligns::baseline == fblock->text_align) { ascent = static_cast(data->ascent()); @@ -420,7 +420,7 @@ namespace nana text_pos = 0; max_content_height = max_ascent = max_descent = 0; - //Adjust height of extent_size for special text alignement. + //Adjust height of extent_size for special text alignment. if (fblock::aligns::baseline == fblock->text_align) { ascent = static_cast(data->ascent()); diff --git a/source/gui/widgets/listbox.cpp b/source/gui/widgets/listbox.cpp index 29105225..da3b2fb8 100644 --- a/source/gui/widgets/listbox.cpp +++ b/source/gui/widgets/listbox.cpp @@ -675,7 +675,7 @@ namespace nana else item_str += exp_opt.sep; - //Use the model cells instead if model cells is avaiable + //Use the model cells instead if model cells is available item_str += (model_cells ? model_cells : cells.get())->operator[](col).text; } @@ -842,7 +842,7 @@ namespace nana return sort_attrs_; } - /// each sort() ivalidate any existing reference from display position to absolute item, that is after sort() display offset point to different items + /// each sort() invalidates any existing reference from display position to absolute item, that is after sort() display offset point to different items void sort() { if((npos == sort_attrs_.column) || (!sort_attrs_.resort)) @@ -1554,7 +1554,7 @@ namespace nana return n; } - /// Finds a good item or category if an item specified by pos is invaild + /// Finds a good item or category if an item specified by pos is invalid index_pair find_next_good(index_pair pos, bool ignore_category) const noexcept { //Return the pos if it is good @@ -1691,7 +1691,7 @@ namespace nana /** * @param for_selection Indicates whether the selected items or checked items to be returned. * @param find_first Indicates whether or not to return the first item which - * @param items_status a pointer refers to a bool object to receive the status whethe the picked items are all selected or all checked, in contrast to for_selection + * @param items_status a pointer refers to a bool object to receive the status whether the picked items are all selected or all checked, in contrast to for_selection */ index_pairs pick_items(bool for_selection, bool find_first = false, bool * items_status = nullptr) const { @@ -1989,7 +1989,7 @@ namespace nana msup_deselect }; - /// created and live by the trigger, holds data for listbox: the state of the struct does not effect on member funcions, therefore all data members are public. + /// created and live by the trigger, holds data for listbox: the state of the struct does not effect on member functions, therefore all data members are public. struct essence { enum class item_state{normal, highlighted, pressed, grabbed, floated}; @@ -2006,7 +2006,7 @@ namespace nana ::nana::listbox::export_options def_exp_options; es_header header; - es_lister lister; // we have at least one emty cat. the #0 + es_lister lister; // we have at least one empty cat. the #0 item_state ptr_state{ item_state::normal }; std::pair pointer_where; //The 'first' stands for which object, such as header and lister, 'second' stands for item @@ -3114,7 +3114,7 @@ namespace nana { auto next_selected_dpl = index_cast_noexcept(latest_selected_abs, false); //convert absolute position to display position - if (next_selected_dpl.empty()) // has no cat ? (cat == npos) => beging from first cat + if (next_selected_dpl.empty()) // has no cat ? (cat == npos) => begins from first cat { bool good = false; for (size_type i = 0, size = categories_.size(); i < size; ++i) // run all cat @@ -3377,7 +3377,7 @@ namespace nana auto text_color = essence_->scheme_ptr->header_fgcolor.get_color(); auto state = item_state::normal; - //check whether grabing an item, if item_spliter_ != npos, that indicates the grab item is a spliter. + //check whether grabbing an item, if item_spliter_ != npos, that indicates the grabbed item is a splitter. if ((parts::header == essence_->pointer_where.first) && (npos == grabs_.splitter)) state = essence_->ptr_state; @@ -3651,7 +3651,7 @@ namespace nana // The first display is empty when the listbox is empty. if (!first_disp.empty()) { - index_pair hoverred_pos(npos, npos); //the hoverred item. + index_pair hoverred_pos(npos, npos); //the hovered item. //if where == lister || where == checker, 'second' indicates the offset to the relative display-order pos of the scroll offset_y which stands for the first item to be displayed in lister. if ((ptr_where.first == parts::list || ptr_where.first == parts::checker) && ptr_where.second != npos) @@ -3879,7 +3879,7 @@ namespace nana for (size_type display_order{ 0 }; display_order < seqs.size(); ++display_order) // get the cell (column) index in the order headers are displayed { const auto column_pos = seqs[display_order]; - const auto & col = essence_->header.at(column_pos); // deduce the corresponding header which is in a kind of dislay order + const auto & col = essence_->header.at(column_pos); // deduce the corresponding header which is in a kind of display order if (col.width_px > essence_->scheme_ptr->text_margin) { @@ -4724,7 +4724,7 @@ namespace nana cat_ = &(*ess->lister.get(pos.cat)); } - /// the main porpose of this it to make obvious that item_proxy operate with absolute positions, and dont get moved during sort() + /// the main purpose of this it to make obvious that item_proxy operate with absolute positions, and don't get moved during sort() item_proxy item_proxy::from_display(essence *ess, const index_pair &relative) { return item_proxy{ ess, ess->lister.index_cast(relative, true) }; @@ -4735,7 +4735,7 @@ namespace nana return item_proxy{ess_, ess_->lister.index_cast(relative, true)}; } - /// posible use: last_selected_display = last_selected.to_display().item; use with caution, it get invalidated after a sort() + /// possible use: last_selected_display = last_selected.to_display().item; use with caution, it get invalidated after a sort() index_pair item_proxy::to_display() const { return ess_->lister.index_cast(pos_, false); //convert absolute position to display position @@ -5811,7 +5811,7 @@ namespace nana auto & ess = _m_ess(); ess.lister.clear(); - unsort(); // apperar to be espected + unsort(); // appear to be expected ess.calc_content_size(false); ess.content_view->change_position(0, false, false); @@ -5946,7 +5946,7 @@ namespace nana _m_ess().header.at(col).weak_ordering = std::move(strick_ordering); } - /// sort() and ivalidate any existing reference from display position to absolute item, that is: after sort() display offset point to different items + /// sort() and invalidates any existing reference from display position to absolute item, that is: after sort() display offset point to different items void listbox::sort_col(size_type col, bool reverse) { internal_scope_guard lock; @@ -5959,7 +5959,7 @@ namespace nana return _m_ess().lister.sort_attrs().column; } - /// potencially ivalidate any existing reference from display position to absolute item, that is: after sort() display offset point to different items + /// potentially invalidates any existing reference from display position to absolute item, that is: after sort() display offset point to different items void listbox::unsort() { internal_scope_guard lock; diff --git a/source/gui/widgets/menu.cpp b/source/gui/widgets/menu.cpp index 26b21812..9247a163 100644 --- a/source/gui/widgets/menu.cpp +++ b/source/gui/widgets/menu.cpp @@ -84,7 +84,7 @@ namespace nana crook_.check(facade::state::checked); } private: - //Impelement renderer_interface + //Implements renderer_interface void background(graph_reference graph, window) { nana::size sz = graph.size(); @@ -133,7 +133,7 @@ namespace nana return; } - //Stretchs menu icon only when it doesn't fit, center it otherwise. + //Stretches menu icon only when it doesn't fit, center it otherwise. //Contributed by kmribti(pr#102) img.paste(graph, { pos.x + static_cast(image_px - img.size().width) / 2, @@ -740,7 +740,7 @@ namespace nana struct widget_detail { - nana::point monitor_pos; //It is used for determinating the monitor. + nana::point monitor_pos; //It is used for determining the monitor. nana::upoint border; }detail_; };//end class menu_drawer @@ -927,7 +927,7 @@ namespace nana this->_m_close_all(); //means deleting this; //The deleting operation has moved here, because item.event_handler.operator()(ip) //may create a window, which make a killing focus for menu window, if so the close_all - //operation preformences after item.event_handler.operator()(ip), that would be deleting this object twice! + //operation performs after item.event_handler.operator()(ip), that would be deleting this object twice! if (item.event_handler) { diff --git a/source/gui/widgets/menubar.cpp b/source/gui/widgets/menubar.cpp index aeb0c405..94fc12c6 100644 --- a/source/gui/widgets/menubar.cpp +++ b/source/gui/widgets/menubar.cpp @@ -36,7 +36,7 @@ namespace nana shortkey_pos(shortkey_pos) {} - std::string text; ///< Transformed text, the shortkey charactor has been proccessed. + std::string text; ///< Transformed text, the shortkey character has been processed. wchar_t shortkey; std::size_t shortkey_pos; ::nana::menu menu_obj; diff --git a/source/gui/widgets/skeletons/content_view.cpp b/source/gui/widgets/skeletons/content_view.cpp index 62c92ce9..11a94570 100644 --- a/source/gui/widgets/skeletons/content_view.cpp +++ b/source/gui/widgets/skeletons/content_view.cpp @@ -277,7 +277,7 @@ namespace nana { else { cv_scroll->horz.close(); - //If horz is allowed, it indicates the horzontal origin is not moved + //If horz is allowed, it indicates the horizontal origin is not moved //Make sure the x origin is zero if (horz_allowed) origin.x = 0; diff --git a/source/gui/widgets/skeletons/text_editor.cpp b/source/gui/widgets/skeletons/text_editor.cpp index d3878e75..9049165f 100644 --- a/source/gui/widgets/skeletons/text_editor.cpp +++ b/source/gui/widgets/skeletons/text_editor.cpp @@ -1018,7 +1018,7 @@ namespace nana { for (++i; i != entities.end(); ) { if (bound > i->begin) - i = entities.erase(i); // erase overlaping. Left only the first. + i = entities.erase(i); // erase overlapping. Left only the first. else ++i; } @@ -2363,7 +2363,7 @@ namespace nana { //The number of text lines auto const line_count = textbase().lines(); - //The number of charecters in the line of caret + //The number of characters in the line of caret auto const text_length = textbase().getline(points_.caret.y).size(); switch (key) { @@ -2403,10 +2403,10 @@ namespace nana { coord.y += static_cast(line_px); break; case keyboard::os_home: - //move the caret to the begining of the line + //move the caret to the beginning of the line pos.x = 0; - //move the caret to the begining of the text if Ctrl is pressed + //move the caret to the beginning of the text if Ctrl is pressed if (arg.ctrl) pos.y = 0; break; @@ -2415,7 +2415,7 @@ namespace nana { //move the caret to the end of the text if Ctrl is pressed if (arg.ctrl) { coord.y = static_cast((line_count - 1) * line_px); - //The number of charecters of the bottom line + //The number of characters of the bottom line auto const text_length = textbase().getline(std::max(0, line_count - 1)).size(); //move the caret to the end of the line pos.x = static_cast(text_length); @@ -3385,7 +3385,7 @@ namespace nana { std::wstring_view ent_sv; if (rtl) { - //draw the whole text if it is a RTL text, because Arbic language is transformable. + //draw the whole text if it is a RTL text, because Arabic language is transformable. ent_sv = { str, len }; } else @@ -3397,7 +3397,7 @@ namespace nana { #else if (rtl) { - //draw the whole text if it is a RTL text, because Arbic language is transformable. + //draw the whole text if it is a RTL text, because Arabic language is transformable. canvas.string({}, str, len); } else diff --git a/source/gui/widgets/tabbar.cpp b/source/gui/widgets/tabbar.cpp index cf58e0f6..431f7cf1 100644 --- a/source/gui/widgets/tabbar.cpp +++ b/source/gui/widgets/tabbar.cpp @@ -748,7 +748,7 @@ namespace nana } return false; } - private: //Fundation + private: //Foundation bool _m_nextable() const { return (basis_.scroll_pixels + _m_itembar_right() < basis_.item_pixels * list_.size()); diff --git a/source/gui/widgets/textbox.cpp b/source/gui/widgets/textbox.cpp index 6ea644e2..100a832d 100644 --- a/source/gui/widgets/textbox.cpp +++ b/source/gui/widgets/textbox.cpp @@ -46,7 +46,7 @@ namespace drawerbase { } //end class event_agent - //class draweer + //class drawer drawer::drawer() : widget_(nullptr), editor_(nullptr) { @@ -278,8 +278,8 @@ namespace drawerbase { return{}; } - /// Enables/disables the textbox to indent a line. Idents a new line when it is created by pressing enter. - /// @param generator generates text for identing a line. If it is empty, textbox indents the line according to last line. + /// Enables/disables the textbox to indent a line. Indents a new line when it is created by pressing enter. + /// @param generator generates text for indenting a line. If it is empty, textbox indents the line according to last line. textbox& textbox::indention(bool enb, std::function generator) { internal_scope_guard lock; @@ -474,7 +474,7 @@ namespace drawerbase { } return *this; } - /// Determine wheter the text is auto-line changed. + /// Determine whether the text is auto-line changed. bool textbox::line_wrapped() const { internal_scope_guard lock; diff --git a/source/gui/widgets/treebox.cpp b/source/gui/widgets/treebox.cpp index 1d1a6c13..87d1b5ce 100644 --- a/source/gui/widgets/treebox.cpp +++ b/source/gui/widgets/treebox.cpp @@ -342,7 +342,7 @@ namespace nana struct adjust_tag { - int offset_x_adjust; //It is a new value of offset_x, and offset_x will be djusted to the new value + int offset_x_adjust; //It is a new value of offset_x, and offset_x will be adjusted to the new value tree_cont_type::node_type * node; std::size_t scroll_timestamp; nana::timer timer; @@ -1062,7 +1062,7 @@ namespace nana item_proxy::item_proxy(trigger* trg, trigger::node_type* node) : trigger_(trg), node_(node) { - //Make it an end itertor if one of them is a nullptr + //Make it an end iterator if one of them is a nullptr if(nullptr == trg || nullptr == node) { trigger_ = nullptr; @@ -1320,7 +1320,7 @@ namespace nana return node_->value.second.value; } - //Undocumentated methods for internal use. + //Undocumented methods for internal use. trigger::node_type * item_proxy::_m_node() const { return node_; @@ -1927,7 +1927,7 @@ namespace nana void trigger::detached() { - //Reset the comp_placer, because after deteching, the scheme refered by comp_placer will be released + //Reset the comp_placer, because after detaching, the scheme referred by comp_placer will be released impl_->data.comp_placer.reset(); impl_->data.graph = nullptr; } diff --git a/source/gui/wvl.cpp b/source/gui/wvl.cpp index 610484cd..7497d3c4 100644 --- a/source/gui/wvl.cpp +++ b/source/gui/wvl.cpp @@ -65,7 +65,7 @@ namespace nana void exec( unsigned wait, // = 1, ///< for the GUI to be constructed, in seconds unsigned wait_end, // = 1, ///< for the GUI to be destructed, in seconds - std::functionf // = {} ///< emit events to mimics user actions and may asert results + std::functionf // = {} ///< emit events to mimics user actions and may assert results ) { diff --git a/source/internationalization.cpp b/source/internationalization.cpp index ba3ffcd6..ddd53d14 100644 --- a/source/internationalization.cpp +++ b/source/internationalization.cpp @@ -520,7 +520,7 @@ namespace nana args_.emplace_back(arg->clone()); } - //Workaround for VC2013, becuase it can't specified a default explicit move-constructor + //Workaround for VC2013, because it can't specify a default explicit move-constructor i18n_eval::i18n_eval(i18n_eval&& other) : msgid_(std::move(other.msgid_)), args_(std::move(other.args_)) { diff --git a/source/paint/detail/image_process_provider.cpp b/source/paint/detail/image_process_provider.cpp index 89324e04..246c26ac 100644 --- a/source/paint/detail/image_process_provider.cpp +++ b/source/paint/detail/image_process_provider.cpp @@ -18,8 +18,8 @@ namespace paint image_process_provider::image_process_provider() { - add(stretch_, "bilinear interoplation"); - add(stretch_, "proximal interoplation"); + add(stretch_, "bilinear interpolation"); + add(stretch_, "proximal interpolation"); add(alpha_blend_, "alpha_blend"); add(blend_, "blend"); add(line_, "bresenham_line"); diff --git a/source/paint/graphics.cpp b/source/paint/graphics.cpp index bb4adaf4..c217dd70 100644 --- a/source/paint/graphics.cpp +++ b/source/paint/graphics.cpp @@ -856,7 +856,7 @@ namespace paint { if(impl_->handle) { - //Create the color table for perfermance + //Create the color table for performance float* tablebuf = new float[0x100 * 3]; float* table_red = tablebuf; float* table_green = tablebuf + 0x100; diff --git a/source/paint/pixel_buffer.cpp b/source/paint/pixel_buffer.cpp index 4297c476..81316842 100644 --- a/source/paint/pixel_buffer.cpp +++ b/source/paint/pixel_buffer.cpp @@ -305,7 +305,7 @@ namespace nana{ namespace paint } #if defined(NANA_X11) - //The implementation of attach in X11 is same with non-attach's, because the image buffer of drawable can't be refered indirectly + //The implementation of attach in X11 is same with non-attach's, because the image buffer of drawable can't be referred indirectly //so the pixel_buffer::open() method may call the attached version of pixel_buffer_storage construction. void detach() { @@ -371,7 +371,7 @@ namespace nana{ namespace paint ::XPutImage(disp, dw, gc, img, src_x, src_y, x, y, width, height); } - img->data = nullptr; //Set null pointer to avoid XDestroyImage destroyes the buffer. + img->data = nullptr; //Set null pointer to avoid XDestroyImage destroys the buffer. XDestroyImage(img); } #endif @@ -787,7 +787,7 @@ namespace nana{ namespace paint auto sp = storage_.get(); if(nullptr == sp) return; - //Test if the line intersects the rectangle, and retrive the two points that + //Test if the line intersects the rectangle, and retrieve the two points that //are always in the area of rectangle, good_pos_beg is left point, good_pos_end is right. nana::point good_pos_beg, good_pos_end; if(intersection(nana::rectangle(sp->pixel_size), pos_beg, pos_end, good_pos_beg, good_pos_end)) diff --git a/source/unicode_bidi.cpp b/source/unicode_bidi.cpp index 32ca0541..26eaf512 100644 --- a/source/unicode_bidi.cpp +++ b/source/unicode_bidi.cpp @@ -661,7 +661,7 @@ namespace nana //W1. Examine each nonspacing mark, and change the type of the NSM to the type of the previous //character. //W2. Search backward from each instance of a European number until the first strong type(R, L, AL, or sor) is found - //If an AL is found, change the type of the European Number to arbic number. + //If an AL is found, change the type of the European Number to Arabic number. //W3. Change all ALs to R. //The three phases could be combined as one process. Because these phases are standalone. @@ -702,7 +702,7 @@ namespace nana } - //W4. A single european separator between two european numbers changes to a european number. + //W4. A single European separator between two European numbers changes to a European number. //A single common separator between two numbers of the same type changes to that type. // //W5. A sequence of European terminators adjacent to European numbers changes to all European numbers.