refactor
remove typedef-name core_window_t remove get_color and get_text_color of the internal class drawable
This commit is contained in:
@@ -73,7 +73,7 @@ namespace nana
|
||||
class bedrock::flag_guard
|
||||
{
|
||||
public:
|
||||
flag_guard(bedrock* brock, core_window_t * wd)
|
||||
flag_guard(bedrock* brock, basic_window * wd)
|
||||
: brock_{ brock }, wd_(wd)
|
||||
{
|
||||
wd_->flags.refreshing = true;
|
||||
@@ -86,7 +86,7 @@ namespace nana
|
||||
}
|
||||
private:
|
||||
bedrock *const brock_;
|
||||
core_window_t *const wd_;
|
||||
basic_window *const wd_;
|
||||
};
|
||||
|
||||
//class root_guard
|
||||
@@ -107,7 +107,7 @@ namespace nana
|
||||
}
|
||||
//end class root_guard
|
||||
|
||||
bedrock::core_window_t* bedrock::focus()
|
||||
basic_window* bedrock::focus()
|
||||
{
|
||||
auto wd = wd_manager().root(native_interface::get_focus_window());
|
||||
return (wd ? wd->other.attribute.root->focus : nullptr);
|
||||
@@ -123,7 +123,7 @@ namespace nana
|
||||
return pi_data_->wd_manager;
|
||||
}
|
||||
|
||||
void bedrock::manage_form_loader(core_window_t* wd, bool insert_or_remove)
|
||||
void bedrock::manage_form_loader(basic_window* wd, bool insert_or_remove)
|
||||
{
|
||||
if (insert_or_remove)
|
||||
{
|
||||
@@ -140,7 +140,7 @@ namespace nana
|
||||
|
||||
void bedrock::close_thread_window(thread_t thread_id)
|
||||
{
|
||||
std::vector<core_window_t*> v;
|
||||
std::vector<basic_window*> v;
|
||||
wd_manager().all_handles(v);
|
||||
|
||||
std::vector<native_window_type> roots;
|
||||
@@ -159,7 +159,7 @@ namespace nana
|
||||
native_interface::close_window(i);
|
||||
}
|
||||
|
||||
void bedrock::event_expose(core_window_t * wd, bool exposed)
|
||||
void bedrock::event_expose(basic_window * wd, bool exposed)
|
||||
{
|
||||
if (nullptr == wd) return;
|
||||
|
||||
@@ -171,7 +171,7 @@ namespace nana
|
||||
if (emit(event_code::expose, wd, arg, false, get_thread_context()))
|
||||
{
|
||||
//Get the window who has the activated caret
|
||||
const core_window_t * caret_wd = ((wd->annex.caret_ptr && wd->annex.caret_ptr->activated()) ? wd : wd->child_caret());
|
||||
auto const caret_wd = ((wd->annex.caret_ptr && wd->annex.caret_ptr->activated()) ? wd : wd->child_caret());
|
||||
if (caret_wd)
|
||||
{
|
||||
if (exposed)
|
||||
@@ -194,7 +194,7 @@ namespace nana
|
||||
}
|
||||
}
|
||||
|
||||
void bedrock::event_move(core_window_t* wd, int x, int y)
|
||||
void bedrock::event_move(basic_window* wd, int x, int y)
|
||||
{
|
||||
if (wd)
|
||||
{
|
||||
@@ -206,7 +206,7 @@ namespace nana
|
||||
}
|
||||
}
|
||||
|
||||
bool bedrock::event_msleave(core_window_t* hovered)
|
||||
bool bedrock::event_msleave(basic_window* hovered)
|
||||
{
|
||||
if (wd_manager().available(hovered) && hovered->flags.enabled)
|
||||
{
|
||||
@@ -225,7 +225,7 @@ namespace nana
|
||||
}
|
||||
|
||||
//The wd must be a root window
|
||||
void bedrock::event_focus_changed(core_window_t* root_wd, native_window_type receiver, bool getting)
|
||||
void bedrock::event_focus_changed(basic_window* root_wd, native_window_type receiver, bool getting)
|
||||
{
|
||||
auto focused = root_wd->other.attribute.root->focus;
|
||||
|
||||
@@ -256,7 +256,7 @@ namespace nana
|
||||
}
|
||||
}
|
||||
|
||||
void bedrock::update_cursor(core_window_t * wd)
|
||||
void bedrock::update_cursor(basic_window * wd)
|
||||
{
|
||||
internal_scope_guard isg;
|
||||
if (wd_manager().available(wd))
|
||||
@@ -278,7 +278,7 @@ namespace nana
|
||||
}
|
||||
}
|
||||
|
||||
void bedrock::set_menubar_taken(core_window_t* wd)
|
||||
void bedrock::set_menubar_taken(basic_window* wd)
|
||||
{
|
||||
auto pre = pi_data_->menu.taken_window;
|
||||
pi_data_->menu.taken_window = wd;
|
||||
@@ -392,7 +392,7 @@ namespace nana
|
||||
return pi_data_->scheme;
|
||||
}
|
||||
|
||||
void bedrock::_m_emit_core(event_code evt_code, core_window_t* wd, bool draw_only, const ::nana::event_arg& event_arg, const bool bForce__EmitInternal)
|
||||
void bedrock::_m_emit_core(event_code evt_code, basic_window* wd, bool draw_only, const ::nana::event_arg& event_arg, const bool bForce__EmitInternal)
|
||||
{
|
||||
auto retain = wd->annex.events_ptr;
|
||||
auto evts_ptr = retain.get();
|
||||
@@ -622,7 +622,7 @@ namespace nana
|
||||
}
|
||||
}
|
||||
|
||||
void bedrock::thread_context_destroy(core_window_t * wd)
|
||||
void bedrock::thread_context_destroy(basic_window * wd)
|
||||
{
|
||||
auto ctx = get_thread_context(0);
|
||||
if(ctx && ctx->event_window == wd)
|
||||
@@ -633,15 +633,15 @@ namespace nana
|
||||
{
|
||||
auto ctx = get_thread_context(0);
|
||||
if(ctx && ctx->event_window)
|
||||
ctx->event_window->other.upd_state = core_window_t::update_state::refreshed;
|
||||
ctx->event_window->other.upd_state = basic_window::update_state::refreshed;
|
||||
}
|
||||
|
||||
bool bedrock::emit(event_code evt_code, core_window_t* wd, const ::nana::event_arg& arg, bool ask_update, thread_context* thrd, const bool bForce__EmitInternal)
|
||||
bool bedrock::emit(event_code evt_code, basic_window* wd, const ::nana::event_arg& arg, bool ask_update, thread_context* thrd, const bool bForce__EmitInternal)
|
||||
{
|
||||
if(wd_manager().available(wd) == false)
|
||||
return false;
|
||||
|
||||
core_window_t * prev_wd = nullptr;
|
||||
basic_window * prev_wd = nullptr;
|
||||
if(thrd)
|
||||
{
|
||||
prev_wd = thrd->event_window;
|
||||
@@ -676,7 +676,7 @@ namespace nana
|
||||
return good_wd;
|
||||
}
|
||||
|
||||
void bedrock::_m_event_filter(event_code event_id, core_window_t * wd, thread_context * thrd)
|
||||
void bedrock::_m_event_filter(event_code event_id, basic_window * wd, thread_context * thrd)
|
||||
{
|
||||
auto not_state_cur = (wd->root_widget->other.attribute.root->state_cursor == nana::cursor::arrow);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user