if( frame_id < 0 ) continue;
int swidth = (SWIDTH+1) & ~1, sheight = (SHEIGHT+1) & ~1;
VIFrame *vifrm = new VIFrame(swidth, sheight, BC_YUV420P);
if( frame_id < 0 ) continue;
int swidth = (SWIDTH+1) & ~1, sheight = (SHEIGHT+1) & ~1;
VIFrame *vifrm = new VIFrame(swidth, sheight, BC_YUV420P);
memset(img->get_y(),0x00,swidth * sheight);
memset(img->get_u(),0x80,swidth/2 * sheight/2);
memset(img->get_v(),0x80,swidth/2 * sheight/2);
memset(img->get_y(),0x00,swidth * sheight);
memset(img->get_u(),0x80,swidth/2 * sheight/2);
memset(img->get_v(),0x80,swidth/2 * sheight/2);
- int pady = BC_TextBox::calculate_h(this, MEDIUMFONT, 0, 1) + 5;
+ int xs10 = xS(10), xs15 = xS(15);
+ int ys5 = yS(5), ys10 = yS(10);
+ int pady = BC_TextBox::calculate_h(this, MEDIUMFONT, 0, 1) + ys5;
int padx = BC_Title::calculate_w(this, (char*)"X", MEDIUMFONT);
int x = padx/2, y = pady/4;
text_x = x; text_y = y;
BC_Title *title = new BC_Title(text_x, text_y, _("Text:"), MEDIUMFONT, YELLOW);
add_subwindow(title); x += title->get_w();
int padx = BC_Title::calculate_w(this, (char*)"X", MEDIUMFONT);
int x = padx/2, y = pady/4;
text_x = x; text_y = y;
BC_Title *title = new BC_Title(text_x, text_y, _("Text:"), MEDIUMFONT, YELLOW);
add_subwindow(title); x += title->get_w();
- search_text = new DbWindowText(this, x, y, get_w()-x-10);
+ search_text = new DbWindowText(this, x, y, get_w()-x-xs10);
title_text = new DbWindowTitleText(this, x, y);
add_subwindow(title_text); x += title_text->get_w() + padx;
info_text = new DbWindowInfoText(this, x, y);
add_subwindow(info_text); x += title_text->get_w() + padx;
match_case = new DbWindowMatchCase(this, x, y);
add_subwindow(match_case); x += match_case->get_w() + padx;
title_text = new DbWindowTitleText(this, x, y);
add_subwindow(title_text); x += title_text->get_w() + padx;
info_text = new DbWindowInfoText(this, x, y);
add_subwindow(info_text); x += title_text->get_w() + padx;
match_case = new DbWindowMatchCase(this, x, y);
add_subwindow(match_case); x += match_case->get_w() + padx;
search_start = new DbWindowStart(this, search_x, search_y);
add_subwindow(search_start);
search_start = new DbWindowStart(this, search_x, search_y);
add_subwindow(search_start);
del_items_y = search_y;
del_items = new DbWindowDeleteItems(this, del_items_x, del_items_y);
add_subwindow(del_items);
cancel_w = DbWindowCancel::calculate_w();
cancel_h = DbWindowCancel::calculate_h();
del_items_y = search_y;
del_items = new DbWindowDeleteItems(this, del_items_x, del_items_y);
add_subwindow(del_items);
cancel_w = DbWindowCancel::calculate_w();
cancel_h = DbWindowCancel::calculate_h();
- int list_w = get_w()-10 - list_x;
- int list_h = min(search_y, cancel_y)-10 - list_y;
+ int list_w = get_w()-xs10 - list_x;
+ int list_h = min(search_y, cancel_y)-ys10 - list_y;
search_list = new DbWindowList(this, list_x, list_y, list_w, list_h);
add_subwindow(search_list);
vicon_thread = new DbWindowVIconThread(this);
search_list = new DbWindowList(this, list_x, list_y, list_w, list_h);
add_subwindow(search_list);
vicon_thread = new DbWindowVIconThread(this);
DbWindowGUI::
DbWindowGUI(DbWindow *dwindow)
: BC_Window(_(PROGRAM_NAME ": DbWindow"),
DbWindowGUI::
DbWindowGUI(DbWindow *dwindow)
: BC_Window(_(PROGRAM_NAME ": DbWindow"),
- dwindow->mwindow->gui->get_abs_cursor_x(1) - 900 / 2,
- dwindow->mwindow->gui->get_abs_cursor_y(1) - 600 / 2,
- 900, 600, 400, 400)
+ dwindow->mwindow->gui->get_abs_cursor_x(1) - DBW_W / 2,
+ dwindow->mwindow->gui->get_abs_cursor_y(1) - DBW_H / 2,
+ DBW_W, DBW_H, xS(400), yS(400))
search_column_titles[col_start_time] = _("Start time");
search_column_titles[col_access_time] = _("Access time");
search_column_titles[col_access_count] = _("count");
search_column_titles[col_start_time] = _("Start time");
search_column_titles[col_access_time] = _("Access time");
search_column_titles[col_access_count] = _("count");
- search_column_widths[col_vicon] = 90;
- search_column_widths[col_id] = 60;
- search_column_widths[col_length] = 80;
- search_column_widths[col_source] = 50;
- search_column_widths[col_title] = 160;
- search_column_widths[col_start_time] = 140;
- search_column_widths[col_access_time] = 140;
- search_column_widths[col_access_count] = 60;
+ search_column_widths[col_vicon] = xS(90);
+ search_column_widths[col_id] = xS(60);
+ search_column_widths[col_length] = xS(80);
+ search_column_widths[col_source] = xS(50);
+ search_column_widths[col_title] = xS(160);
+ search_column_widths[col_start_time] = xS(140);
+ search_column_widths[col_access_time] = xS(140);
+ search_column_widths[col_access_count] = xS(60);
- int cancel_x = w - BC_CancelButton::calculate_w() - 10;
- int cancel_y = h - BC_CancelButton::calculate_h() - 10;
+ int cancel_x = w - BC_CancelButton::calculate_w() - xs10;
+ int cancel_y = h - BC_CancelButton::calculate_h() - ys10;
- int list_w = w-10 - list_x;
- int list_h = min(search_y, cancel_y)-10 - list_y;
+ int list_w = w-xs10 - list_x;
+ int list_h = min(search_y, cancel_y)-ys10 - list_y;
canvas->reposition_window(0, canvas_x, canvas_y, canvas_w, canvas_h);
// int wd = 0;
// for( int i=0; i<sizeof_col; ++i )
// if( i != col_title ) wd += search_column_widths[i];
canvas->reposition_window(0, canvas_x, canvas_y, canvas_w, canvas_h);
// int wd = 0;
// for( int i=0; i<sizeof_col; ++i )
// if( i != col_title ) wd += search_column_widths[i];
search_list->reposition_window(list_x, list_y, list_w, list_h);
start_drawing();
return 1;
search_list->reposition_window(list_x, list_y, list_w, list_h);
start_drawing();
return 1;
if( !cp ) continue;
DbSearchItem *item = new DbSearchItem(cp, LTYELLOW);
if( search_columns[k] == col_vicon ) {
if( !cp ) continue;
DbSearchItem *item = new DbSearchItem(cp, LTYELLOW);
if( search_columns[k] == col_vicon ) {
: Canvas(gui->dwindow->mwindow, gui, x, y, w, h, w, h, 0)
{
this->gui = gui;
: Canvas(gui->dwindow->mwindow, gui, x, y, w, h, w, h, 0)
{
this->gui = gui;