Added some APIs to the widget class
This commit is contained in:
@@ -58,7 +58,7 @@ namespace detail
|
||||
static nana::point window_position(native_window_type);
|
||||
static void move_window(native_window_type, int x, int y);
|
||||
static void move_window(native_window_type, const rectangle&);
|
||||
static void bring_to_top(native_window_type);
|
||||
static void bring_top(native_window_type, bool activated);
|
||||
static void set_window_z_order(native_window_type, native_window_type wd_after, z_order_action action_if_no_wd_after);
|
||||
|
||||
static void window_size(native_window_type, const size&);
|
||||
|
||||
@@ -158,7 +158,7 @@ namespace API
|
||||
void move_window(window, int x, int y);
|
||||
void move_window(window wd, const rectangle&);
|
||||
|
||||
void bring_to_top(window);
|
||||
void bring_top(window, bool activated);
|
||||
bool set_window_z_order(window wd, window wd_after, z_order_action action_if_no_wd_after);
|
||||
|
||||
nana::size window_size(window);
|
||||
|
||||
@@ -45,6 +45,8 @@ namespace nana
|
||||
form(window, const ::nana::size& = { 300, 200 }, const appearance& = {});
|
||||
/// Creates a window at the point and size specified by rect, with the specified appearance. This window is always floating above its owner.
|
||||
form(window, const rectangle&, const appearance& = {});
|
||||
|
||||
void modality() const;
|
||||
};
|
||||
|
||||
class nested_form : public widget_object<category::root_tag, drawerbase::form::trigger, detail::events_root_extension>
|
||||
|
||||
@@ -81,6 +81,10 @@ namespace nana
|
||||
general_events& events() const;
|
||||
|
||||
void umake_event(event_handle eh) const; ///< Deletes an event callback by a handle.
|
||||
|
||||
widget& register_shortkey(char_t); ///< Registers a shortkey. To remove a registered key, pass 0.
|
||||
|
||||
widget& take_active(bool activated, window take_if_not_activated);
|
||||
widget& tooltip(const nana::string&);
|
||||
|
||||
operator dummy_bool_type() const;
|
||||
@@ -327,11 +331,6 @@ namespace nana
|
||||
API::activate_window(handle_);
|
||||
}
|
||||
|
||||
void bring_to_top()
|
||||
{
|
||||
API::bring_to_top(handle_);
|
||||
}
|
||||
|
||||
window handle() const
|
||||
{
|
||||
return handle_;
|
||||
@@ -342,6 +341,11 @@ namespace nana
|
||||
return API::root(handle_);
|
||||
}
|
||||
|
||||
void bring_top(bool activated)
|
||||
{
|
||||
API::bring_top(handle(), activated);
|
||||
}
|
||||
|
||||
window owner() const
|
||||
{
|
||||
return API::get_owner_window(handle_);
|
||||
@@ -362,9 +366,15 @@ namespace nana
|
||||
API::zoom_window(handle_, ask_for_max);
|
||||
}
|
||||
|
||||
bool is_zoomed(bool ask_for_max) const
|
||||
bool is_zoomed(bool check_maximized) const
|
||||
{
|
||||
return API::is_window_zoomed(handle_, ask_for_max);
|
||||
return API::is_window_zoomed(handle_, check_maximized);
|
||||
}
|
||||
|
||||
widget_object& z_order(window wd_after, z_order_action action_if_no_wd_after)
|
||||
{
|
||||
API::set_window_z_order(handle_, wd_after, action_if_no_wd_after);
|
||||
return *this;
|
||||
}
|
||||
protected:
|
||||
DrawerTrigger& get_drawer_trigger()
|
||||
|
||||
Reference in New Issue
Block a user