add throw() for some functions
This commit is contained in:
@@ -61,7 +61,7 @@ namespace API
|
||||
widget_colors* get_scheme(window);
|
||||
|
||||
void attach_drawer(widget&, drawer_trigger&);
|
||||
nana::string window_caption(window);
|
||||
nana::string window_caption(window) throw();
|
||||
void window_caption(window, nana::string);
|
||||
|
||||
window create_window(window, bool nested, const rectangle&, const appearance&, widget* attached);
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* Nana C++ Library(http://www.nanapro.org)
|
||||
* Copyright(C) 2003-2015 Jinhao(cnjinhao@hotmail.com)
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||
* http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
* @file: nana/gui/widgets/combox.hpp
|
||||
@@ -43,7 +43,7 @@ namespace nana
|
||||
};
|
||||
|
||||
class drawer_impl;
|
||||
|
||||
|
||||
class trigger
|
||||
: public drawer_trigger
|
||||
{
|
||||
@@ -101,7 +101,7 @@ namespace nana
|
||||
throw std::runtime_error("combox::item_proxy.value<T>() invalid type of value");
|
||||
return *p;
|
||||
}
|
||||
|
||||
|
||||
template<typename T>
|
||||
item_proxy& value(const T& t)
|
||||
{
|
||||
@@ -169,7 +169,7 @@ namespace nana
|
||||
combox(window, nana::string, bool visible = true);
|
||||
combox(window, const nana::char_t*, bool visible = true);
|
||||
combox(window, const rectangle& r = rectangle(), bool visible = true);
|
||||
|
||||
|
||||
void clear();
|
||||
void editable(bool);
|
||||
bool editable() const;
|
||||
@@ -209,8 +209,8 @@ namespace nana
|
||||
_m_erase(p.get());
|
||||
}
|
||||
|
||||
/// \brief Set user-defined item renderer object.
|
||||
/// It is an address therefore the user should not destroy the renderer object
|
||||
/// \brief Set user-defined item renderer object.
|
||||
/// It is an address therefore the user should not destroy the renderer object
|
||||
/// after it is set to the combox. Passing null_ptr cancels the user-defined renderer object.
|
||||
void renderer(item_renderer*);
|
||||
|
||||
@@ -224,7 +224,7 @@ namespace nana
|
||||
const drawerbase::combox::drawer_impl& _m_impl() const;
|
||||
private:
|
||||
//Overrides widget's virtual functions
|
||||
nana::string _m_caption() const override;
|
||||
nana::string _m_caption() const throw() override;
|
||||
void _m_caption(nana::string&&) override;
|
||||
nana::any * _m_anyobj(std::size_t pos, bool alloc_if_empty) const override;
|
||||
};
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace nana{
|
||||
void _m_add_child(const char* field, widget*);
|
||||
void _m_init();
|
||||
void _m_complete_creation() override;
|
||||
::nana::string _m_caption() const override;
|
||||
::nana::string _m_caption() const throw() override;
|
||||
void _m_caption(::nana::string&&) override;
|
||||
private:
|
||||
std::unique_ptr<implement> impl_;
|
||||
|
||||
@@ -58,16 +58,15 @@ namespace nana
|
||||
label();
|
||||
label(window, bool visible);
|
||||
label(window, const nana::string& text, bool visible = true);
|
||||
label(window, const nana::char_t* text, bool visible = true);
|
||||
label(window, const rectangle& = {}, bool visible = true);
|
||||
label& transparent(bool); ///< Switchs the label widget to the transparent background mode.
|
||||
bool transparent() const;
|
||||
bool transparent() const throw();
|
||||
label& format(bool); ///< Switches the format mode of the widget.
|
||||
label& add_format_listener(std::function<void(command, const nana::string&)>);
|
||||
|
||||
void click_for(window associated_window); // as same as the "for" attribute of a label
|
||||
label& click_for(window associated_window) throw(); // as same as the "for" attribute of a label
|
||||
|
||||
/// \briefReturn the size of the text. If *allowed_width_in_pixel* is not zero, returns a
|
||||
/// Returns the size of the text. If *allowed_width_in_pixel* is not zero, returns a
|
||||
/// "corrected" size that changes lines to fit the text into the specified width
|
||||
nana::size measure(unsigned allowed_width_in_pixel) const;
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ namespace nana
|
||||
void modifier(std::wstring prefix, std::wstring suffix);
|
||||
void modifier(const std::string & prefix_utf8, const std::string& suffix_utf8);
|
||||
private:
|
||||
::nana::string _m_caption() const;
|
||||
::nana::string _m_caption() const throw();
|
||||
void _m_caption(::nana::string&&);
|
||||
}; //end class spinbox
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ namespace nana
|
||||
/// Appends an string. If `at_caret` is `true`, the string is inserted at the position of caret, otherwise, it is appended at end of the textbox.
|
||||
textbox& append(const nana::string& text, bool at_caret);
|
||||
|
||||
/// Determine wheter the text is line wrapped.
|
||||
/// Determine wheter the text is line wrapped.
|
||||
bool line_wrapped() const;
|
||||
textbox& line_wrapped(bool);
|
||||
|
||||
@@ -187,7 +187,7 @@ namespace nana
|
||||
void erase_keyword(const nana::string& kw);
|
||||
protected:
|
||||
//Overrides widget's virtual functions
|
||||
::nana::string _m_caption() const override;
|
||||
::nana::string _m_caption() const throw() override;
|
||||
void _m_caption(::nana::string&&) override;
|
||||
void _m_typeface(const paint::font&) override;
|
||||
};
|
||||
|
||||
@@ -41,9 +41,9 @@ namespace nana
|
||||
|
||||
window parent() const;
|
||||
|
||||
nana::string caption() const;
|
||||
nana::string caption() const throw();
|
||||
void caption(std::string utf8);
|
||||
void caption(nana::string);
|
||||
void caption(std::wstring);
|
||||
|
||||
template<typename ...Args>
|
||||
void i18n(std::string msgid, Args&&... args)
|
||||
@@ -105,7 +105,7 @@ namespace nana
|
||||
virtual void _m_complete_creation();
|
||||
|
||||
virtual general_events& _m_get_general_events() const = 0;
|
||||
virtual nana::string _m_caption() const;
|
||||
virtual nana::string _m_caption() const throw();
|
||||
virtual void _m_caption(nana::string&&);
|
||||
virtual nana::cursor _m_cursor() const;
|
||||
virtual void _m_cursor(nana::cursor);
|
||||
|
||||
Reference in New Issue
Block a user