rename enum

This commit is contained in:
idea4good 2019-12-30 23:56:12 +08:00
parent 2ceb913448
commit 101040b623
7 changed files with 298 additions and 298 deletions

View File

@ -1170,7 +1170,7 @@ void c_wnd::on_touch(int x, int y, TOUCH_ACTION action)
c_wnd* tmp_child = m_top_child;
while (tmp_child)
{
if ((tmp_child->m_attr & ATTR_MODAL) && (tmp_child->m_attr & ATTR_VISIBLE))
if ((tmp_child->m_attr & ATTR_PRIORITY) && (tmp_child->m_attr & ATTR_VISIBLE))
{
model_wnd = tmp_child;
break;
@ -1204,7 +1204,7 @@ void c_wnd::on_key(KEY_TYPE key)
c_wnd* tmp_child = m_top_child;
while (tmp_child)
{
if ((tmp_child->m_attr & ATTR_MODAL) && (tmp_child->m_attr & ATTR_VISIBLE))
if ((tmp_child->m_attr & ATTR_PRIORITY) && (tmp_child->m_attr & ATTR_VISIBLE))
{
model_wnd = tmp_child;
break;
@ -2766,7 +2766,7 @@ int c_dialog::open_dialog(c_dialog* p_dlg, bool modal_mode)
c_rect rc;
p_dlg->get_screen_rect(rc);
p_dlg->get_surface()->set_frame_layer_visible_rect(rc, Z_ORDER_LEVEL_1);
p_dlg->set_attr(modal_mode ? (WND_ATTRIBUTION)(ATTR_VISIBLE | ATTR_FOCUS | ATTR_MODAL) : (WND_ATTRIBUTION)(ATTR_VISIBLE | ATTR_FOCUS));
p_dlg->set_attr(modal_mode ? (WND_ATTRIBUTION)(ATTR_VISIBLE | ATTR_FOCUS | ATTR_PRIORITY) : (WND_ATTRIBUTION)(ATTR_VISIBLE | ATTR_FOCUS));
p_dlg->show_window();
p_dlg->set_me_the_dialog();
return 1;
@ -2948,7 +2948,7 @@ void c_edit::on_paint()
if (m_z_order == m_parent->get_z_order())
{
m_z_order++;
m_attr = (WND_ATTRIBUTION)(ATTR_VISIBLE | ATTR_FOCUS | ATTR_MODAL);
m_attr = (WND_ATTRIBUTION)(ATTR_VISIBLE | ATTR_FOCUS | ATTR_PRIORITY);
show_keyboard();
}
m_surface->fill_rect(rect.m_left, rect.m_top, rect.m_right, rect.m_bottom, c_theme::get_color(COLOR_WND_PUSHED), m_parent->get_z_order());
@ -3510,7 +3510,7 @@ void c_list_box::on_paint()
m_z_order++;
}
m_surface->set_frame_layer_visible_rect(m_list_screen_rect, m_z_order);
m_attr = (WND_ATTRIBUTION)(ATTR_VISIBLE | ATTR_FOCUS | ATTR_MODAL);
m_attr = (WND_ATTRIBUTION)(ATTR_VISIBLE | ATTR_FOCUS | ATTR_PRIORITY);
show_list();
}
break;

View File

@ -358,7 +358,7 @@ typedef enum
{
ATTR_VISIBLE = 0x40000000L,
ATTR_FOCUS = 0x20000000L,
ATTR_MODAL = 0x10000000L// Handle touch action at high priority
ATTR_PRIORITY = 0x10000000L// Handle touch action at high priority
}WND_ATTRIBUTION;
typedef enum
{

View File

@ -335,7 +335,7 @@ void c_wnd::on_touch(int x, int y, TOUCH_ACTION action)
c_wnd* tmp_child = m_top_child;
while (tmp_child)
{
if ((tmp_child->m_attr & ATTR_MODAL) && (tmp_child->m_attr & ATTR_VISIBLE))
if ((tmp_child->m_attr & ATTR_PRIORITY) && (tmp_child->m_attr & ATTR_VISIBLE))
{
model_wnd = tmp_child;
break;
@ -371,7 +371,7 @@ void c_wnd::on_key(KEY_TYPE key)
c_wnd* tmp_child = m_top_child;
while (tmp_child)
{
if ((tmp_child->m_attr & ATTR_MODAL) && (tmp_child->m_attr & ATTR_VISIBLE))
if ((tmp_child->m_attr & ATTR_PRIORITY) && (tmp_child->m_attr & ATTR_VISIBLE))
{
model_wnd = tmp_child;
break;

View File

@ -11,7 +11,7 @@ typedef enum
{
ATTR_VISIBLE = 0x40000000L,
ATTR_FOCUS = 0x20000000L,
ATTR_MODAL = 0x10000000L// Handle touch action at high priority
ATTR_PRIORITY = 0x10000000L// Handle touch action at high priority
}WND_ATTRIBUTION;
typedef enum

View File

@ -63,7 +63,7 @@ int c_dialog::open_dialog(c_dialog* p_dlg, bool modal_mode)
p_dlg->get_screen_rect(rc);
p_dlg->get_surface()->set_frame_layer_visible_rect(rc, Z_ORDER_LEVEL_1);
p_dlg->set_attr(modal_mode ? (WND_ATTRIBUTION)(ATTR_VISIBLE | ATTR_FOCUS | ATTR_MODAL) : (WND_ATTRIBUTION)(ATTR_VISIBLE | ATTR_FOCUS));
p_dlg->set_attr(modal_mode ? (WND_ATTRIBUTION)(ATTR_VISIBLE | ATTR_FOCUS | ATTR_PRIORITY) : (WND_ATTRIBUTION)(ATTR_VISIBLE | ATTR_FOCUS));
p_dlg->show_window();
p_dlg->set_me_the_dialog();
return 1;

View File

@ -156,7 +156,7 @@ void c_edit::on_paint()
if (m_z_order == m_parent->get_z_order())
{
m_z_order++;
m_attr = (WND_ATTRIBUTION)(ATTR_VISIBLE | ATTR_FOCUS | ATTR_MODAL);
m_attr = (WND_ATTRIBUTION)(ATTR_VISIBLE | ATTR_FOCUS | ATTR_PRIORITY);
show_keyboard();
}
m_surface->fill_rect(rect.m_left, rect.m_top, rect.m_right, rect.m_bottom, c_theme::get_color(COLOR_WND_PUSHED), m_parent->get_z_order());

View File

@ -75,7 +75,7 @@ void c_list_box::on_paint()
m_z_order++;
}
m_surface->set_frame_layer_visible_rect(m_list_screen_rect, m_z_order);
m_attr = (WND_ATTRIBUTION)(ATTR_VISIBLE | ATTR_FOCUS | ATTR_MODAL);
m_attr = (WND_ATTRIBUTION)(ATTR_VISIBLE | ATTR_FOCUS | ATTR_PRIORITY);
show_list();
}
break;