Make toolbar height configurable,

started to use extended AES Object types.
This commit is contained in:
Ole Loots 2013-01-15 01:31:35 +01:00
parent a0227890e9
commit 4f64d85dfa
12 changed files with 435 additions and 383 deletions

View File

@ -54,6 +54,20 @@ static void on_abort_click(struct gui_download_window *dw);
static void on_cbrdy_click(struct gui_download_window *dw);
static void on_close(struct gui_download_window * dw);
static void on_redraw(struct gui_download_window *dw, GRECT *clip);
static void toolbar_redraw_cb(GUIWIN *win, uint16_t msg, GRECT *clip);
static void toolbar_redraw_cb(GUIWIN *win, uint16_t msg, GRECT *clip)
{
struct gui_download_window *data;
if (msg != WM_REDRAW) {
data = guiwin_get_user_data(win);
assert(data);
on_redraw(data, clip);
}
}
static short on_aes_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8])
{
@ -236,7 +250,7 @@ static char * select_filepath( const char * path, const char * filename )
struct gui_download_window * gui_download_window_create(download_context *ctx,
struct gui_window *parent)
{
char *filename;
const char *filename;
char *destination;
char gdos_path[PATH_MAX];
const char * url;
@ -254,7 +268,7 @@ struct gui_download_window * gui_download_window_create(download_context *ctx,
return(NULL);
}
filename = download_context_get_filename(ctx);
filename = download_context_get_filename((const download_context*)ctx);
dlgres = form_alert(2, "[2][Accept download?][Yes|Save as...|No]");
if( dlgres == 3){
return( NULL );
@ -298,7 +312,6 @@ struct gui_download_window * gui_download_window_create(download_context *ctx,
char spare[200];
snprintf(spare, 200, "Couldn't open %s for writing!", gdw->destination);
msg_box_show(MSG_BOX_ALERT, spare);
free(filename);
gui_download_window_destroy(gdw);
return( NULL );
}
@ -311,19 +324,17 @@ struct gui_download_window * gui_download_window_create(download_context *ctx,
gdw->aes_handle = wind_create_grect(CLOSER | NAME | MOVER, &desk_area);
wind_set_str(gdw->aes_handle, WF_NAME, "Download");
unsigned long gwflags = GW_FLAG_DEFAULTS;
gwflags &= ~GW_FLAG_TOOLBAR_REDRAW;
gdw->guiwin = guiwin_add(gdw->aes_handle, gwflags, on_aes_event);
if( gdw->guiwin == NULL || gdw->fd == NULL ){
die("could not create guiwin");
free( filename );
gui_download_window_destroy(gdw);
return( NULL );
}
guiwin_set_user_data(gdw->guiwin, gdw);
guiwin_set_toolbar(gdw->guiwin, tree, 0, 0);
guiwin_set_toolbar_redraw_func(gdw->guiwin, toolbar_redraw_cb);
strncpy((char*)&gdw->lbl_file, filename, MAX_SLEN_LBL_FILE-1);
free( filename );
LOG(("created download: %s (total size: %d)",
gdw->destination, gdw->size_total
));

View File

@ -102,11 +102,10 @@ short msg_box_show(short type, const char * msg);
#define GW_FLAG_RECV_PREPROC_WM 0x02 // get notified even when pre-processed
#define GW_FLAG_HAS_VTOOLBAR 0x04 // the attached toolbar is vertical
#define GW_FLAG_CUSTOM_TOOLBAR 0x08 // no internal toolbar handling
#define GW_FLAG_TOOLBAR_REDRAW 0x10 // enable internal toolbar redraw
//#define GW_FLAG_TOOLBAR_REDRAW 0x10 // enable internal toolbar redraw
#define GW_FLAG_CUSTOM_SCROLLING 0x20 // no internal scroller handling
#define GW_FLAG_DEFAULTS (GW_FLAG_PREPROC_WM | GW_FLAG_RECV_PREPROC_WM \
| GW_FLAG_TOOLBAR_REDRAW)
#define GW_FLAG_DEFAULTS (GW_FLAG_PREPROC_WM | GW_FLAG_RECV_PREPROC_WM)
#define GW_STATUS_ICONIFIED 0x01
#define GW_STATUS_SHADED 0x02
@ -137,6 +136,9 @@ typedef struct gui_window_s GUIWIN;
/** GUIWIN event handler */
typedef short (*guiwin_event_handler_f)(GUIWIN *gw,
EVMULT_OUT *ev_out, short msg[8]);
typedef void (*guiwin_redraw_f)(GUIWIN *win, uint16_t msg, GRECT *clip);
struct guiwin_scroll_info_s {
/** Definition of a content unit (horizontal) measured in pixel */
@ -175,84 +177,62 @@ guiwin_init(void);
void
guiwin_exit(void);
GUIWIN *
guiwin_add(short handle, uint32_t flags, guiwin_event_handler_f handler);
GUIWIN * guiwin_add(short handle, uint32_t flags,
guiwin_event_handler_f handler);
GUIWIN *
guiwin_find(short handle);
GUIWIN * guiwin_find(short handle);
short
guiwin_remove(GUIWIN *win);
short guiwin_remove(GUIWIN *win);
GUIWIN *
guiwin_validate_ptr(GUIWIN *win);
GUIWIN * guiwin_validate_ptr(GUIWIN *win);
short
guiwin_dispatch_event(EVMULT_IN *ev_in, EVMULT_OUT *ev_out, short msg[8]);
short guiwin_dispatch_event(EVMULT_IN *ev_in, EVMULT_OUT *ev_out, short msg[8]);
void
guiwin_get_grect(GUIWIN *win, enum guwin_area_e mode, GRECT *dest);
void guiwin_get_grect(GUIWIN *win, enum guwin_area_e mode, GRECT *dest);
short
guiwin_get_handle(GUIWIN *win);
short guiwin_get_handle(GUIWIN *win);
uint32_t
guiwin_get_state(GUIWIN *win);
uint32_t guiwin_get_state(GUIWIN *win);
void
guiwin_set_toolbar(GUIWIN *win, OBJECT *toolbar, short idx, uint32_t flags);
void guiwin_set_toolbar(GUIWIN *win, OBJECT *toolbar, short idx,
uint32_t flags);
void
guiwin_set_event_handler(GUIWIN *win,guiwin_event_handler_f cb);
void guiwin_set_event_handler(GUIWIN *win,guiwin_event_handler_f cb);
void
guiwin_set_user_data(GUIWIN *win, void *data);
void guiwin_set_user_data(GUIWIN *win, void *data);
void *
guiwin_get_user_data(GUIWIN *win);
void * guiwin_get_user_data(GUIWIN *win);
struct guiwin_scroll_info_s *
guiwin_get_scroll_info(GUIWIN *win);
struct guiwin_scroll_info_s * guiwin_get_scroll_info(GUIWIN *win);
void
guiwin_set_scroll_grid(GUIWIN * win, short x, short y);
void guiwin_set_scroll_grid(GUIWIN * win, short x, short y);
void
guiwin_set_content_units(GUIWIN * win, short x, short y);
void guiwin_set_content_units(GUIWIN * win, short x, short y);
void
guiwin_set_form(GUIWIN *win, OBJECT *tree, short index);
void guiwin_set_form(GUIWIN *win, OBJECT *tree, short index);
void
guiwin_set_toolbar_size(GUIWIN *win, uint16_t w, uint16_t h);
void guiwin_set_toolbar_size(GUIWIN *win, uint16_t s);
bool
guiwin_update_slider(GUIWIN *win, short mode);
void guiwin_set_toolbar_redraw_func(GUIWIN *win, guiwin_redraw_f func);
void
guiwin_scroll(GUIWIN *gw, short orientation, int units, bool refresh);
bool guiwin_update_slider(GUIWIN *win, short mode);
void
guiwin_send_msg(GUIWIN *win, short msgtype, short a, short b, short c,
void guiwin_scroll(GUIWIN *gw, short orientation, int units, bool refresh);
void guiwin_send_msg(GUIWIN *win, short msgtype, short a, short b, short c,
short d);
void
guiwin_send_redraw(GUIWIN *win, GRECT *area);
void guiwin_send_redraw(GUIWIN *win, GRECT *area);
VdiHdl
guiwin_get_vdi_handle(GUIWIN *win);
VdiHdl guiwin_get_vdi_handle(GUIWIN *win);
bool
guiwin_has_intersection(GUIWIN *win, GRECT *work);
bool guiwin_has_intersection(GUIWIN *win, GRECT *work);
void
guiwin_toolbar_redraw(GUIWIN *win, GRECT *clip);
void guiwin_toolbar_redraw(GUIWIN *win, uint16_t msg, GRECT *clip);
void
guiwin_form_redraw(GUIWIN *gw, GRECT *clip);
void guiwin_form_redraw(GUIWIN *gw, GRECT *clip);
void
guiwin_clear(GUIWIN *win);
void guiwin_clear(GUIWIN *win);
/* -------------------------------------------------------------------------- */
/* AES SCROLLER MODULE */

View File

@ -26,24 +26,62 @@
#include "gemtk.h"
//#define DEBUG_PRINT(x) printf x
#define DEBUG_PRINT(x)
#define DEBUG_PRINT(x) printf x
//#define DEBUG_PRINT(x)
struct gui_window_s {
/** The AES handle of the window */
short handle;
/** the generic event handler function for events passed to the client */
guiwin_event_handler_f handler_func;
/** The custom toolbar redraw function, if any */
guiwin_redraw_f toolbar_redraw_func;
/** window configuration */
uint32_t flags;
/** window state */
uint32_t state;
/** AES Tree used as toolbar */
OBJECT *toolbar;
/** Current edit object selected in the toolbar, if any. */
short toolbar_edit_obj;
/** Current selected object in the toolbar, if any. */
short toolbar_focus_obj;
/** Describes the start of the toolbar tree (usually 0) */
short toolbar_idx;
GRECT toolbar_dim;
/** depending on the flag GW_FLAG_HAS_VTOOLBAR this defines the toolbar
height or the toolbar width (GW_FLAG_HAS_VTOOLBAR means width).
*/
short toolbar_size;
/** AES Object tree to be used for windowed dialogs. */
OBJECT *form;
/** Current form edit object, if any. */
short form_edit_obj;
/** Current form focus object, if any */
short form_focus_obj;
/** Describes the start of the form tree */
short form_idx;
/** Scroll state */
struct guiwin_scroll_info_s scroll_info;
/** Arbitary data set by the user */
void *user_data;
/** linked list items */
struct gui_window_s *next, *prev;
};
@ -256,13 +294,12 @@ static short preproc_wm(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
break;
case WM_REDRAW:
if ((gw->flags & GW_FLAG_TOOLBAR_REDRAW)
&& (gw->flags & GW_FLAG_CUSTOM_TOOLBAR) == 0) {
if ((gw->flags & GW_FLAG_CUSTOM_TOOLBAR) == 0) {
g.g_x = msg[4];
g.g_y = msg[5];
g.g_w = msg[6];
g.g_h = msg[7];
guiwin_toolbar_redraw(gw, &g);
guiwin_toolbar_redraw(gw, WM_REDRAW, &g);
}
if (gw->form != NULL) {
g.g_x = msg[4];
@ -287,7 +324,7 @@ static short preproc_wm(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
*/
static short preproc_mu_button(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
{
short retval = 0;
short retval = 0, obj_idx = 0;
DEBUG_PRINT(("preproc_mu_button\n"));
@ -301,25 +338,39 @@ static short preproc_mu_button(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
if (POINT_WITHIN(ev_out->emo_mouse.p_x,
ev_out->emo_mouse.p_y, tb_area)) {
// send WM_TOOLBAR message
gw->toolbar[gw->toolbar_idx].ob_x = tb_area.g_x;
gw->toolbar[gw->toolbar_idx].ob_y = tb_area.g_y;
short obj_idx = objc_find(gw->toolbar,
obj_idx = objc_find(gw->toolbar,
gw->toolbar_idx, 8,
ev_out->emo_mouse.p_x,
ev_out->emo_mouse.p_y);
gw->toolbar_focus_obj = obj_idx;
DEBUG_PRINT(("Toolbar index: %d\n", obj_idx));
if (obj_idx > 0) {
if ((gw->toolbar[obj_idx].ob_flags & OF_SELECTABLE)!=0
&& ((gw->flags & GW_FLAG_CUSTOM_TOOLBAR) == 0)
&& ((gw->flags & GW_FLAG_TOOLBAR_REDRAW) == 1)) {
gw->toolbar[obj_idx].ob_state |= OS_SELECTED;
// TODO: optimize redraw by setting the object clip:
guiwin_toolbar_redraw(gw, NULL);
if (obj_idx > -1
&& (gw->toolbar[obj_idx].ob_state & OS_DISABLED)== 0
&& ((gw->flags & GW_FLAG_CUSTOM_TOOLBAR) == 0)) {
uint16_t type = (gw->toolbar[obj_idx].ob_type & 0xFF);
uint16_t nextobj;
DEBUG_PRINT(("type: %d\n", type));
// report mouse click to the tree:
retval = form_wbutton(gw->toolbar, gw->toolbar_focus_obj,
ev_out->emo_mclicks, &nextobj,
gw->handle);
if (nextobj == obj_idx
&& (type == G_FTEXT || type == G_FBOXTEXT)) {
gw->toolbar_edit_obj = obj_idx;
}
else {
gw->toolbar_edit_obj = -1;
}
}
// send WM_TOOLBAR message
short oldevents = ev_out->emo_events;
short msg_out[8] = {WM_TOOLBAR, gl_apid,
0, gw->handle,
@ -354,63 +405,30 @@ static short preproc_mu_button(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
gw->form[gw->form_idx].ob_y = content_area.g_y -
(slid->y_pos * slid->y_unit_px);
gw->form_focus_obj = objc_find(gw->form, gw->form_idx, 8,
obj_idx = objc_find(gw->form, gw->form_idx, 8,
ev_out->emo_mouse.p_x, ev_out->emo_mouse.p_y);
gw->form_focus_obj = obj_idx;
DEBUG_PRINT(("Window Form click, obj: %d\n", gw->form_focus_obj));
if (gw->form_focus_obj > -1
&& (gw->form[gw->form_focus_obj].ob_state & OS_DISABLED)== 0) {
if (obj_idx > -1
&& (gw->form[obj_idx].ob_state & OS_DISABLED)== 0) {
uint16_t type = (gw->form[gw->form_focus_obj].ob_type & 0xFF);
uint16_t xtype = (gw->form[gw->form_focus_obj].ob_type & 0xFF00);
uint16_t nextobj, edit_idx;
uint16_t type = (gw->form[obj_idx].ob_type & 0xFF);
uint16_t nextobj;
DEBUG_PRINT(("type: %d, xtype: %d\n", type, xtype));
DEBUG_PRINT(("type: %d\n", type));
if (type == G_FTEXT || type == G_FBOXTEXT) {
// edit field handling, this causes ugly redraws when the
// form is scrolled and larger than the window in which
// it is attached.
// report mouse click to the tree:
retval = form_wbutton(gw->form, gw->form_focus_obj,
ev_out->emo_mclicks, &nextobj,
gw->handle);
// end edit mode for active edit object:
if(gw->form_edit_obj != -1) {
objc_wedit(gw->form, gw->form_edit_obj,
ev_out->emo_kreturn, &edit_idx,
EDEND, gw->handle);
if (nextobj == obj_idx
&& (type == G_FTEXT || type == G_FBOXTEXT)) {
gw->form_edit_obj = obj_idx;
}
// activate the new edit object:
gw->form_edit_obj = gw->form_focus_obj;
objc_wedit(gw->form, gw->form_edit_obj,
ev_out->emo_kreturn, &edit_idx,
EDINIT, gw->handle);
} else {
// end edit mode for active edit object:
if(gw->form_edit_obj != -1) {
objc_wedit(gw->form, gw->form_edit_obj,
ev_out->emo_kreturn, &edit_idx,
EDEND, gw->handle);
else {
gw->form_edit_obj = -1;
}
if ((xtype & GW_XTYPE_CHECKBOX) != 0) {
if ((gw->form[gw->form_focus_obj].ob_state & OS_SELECTED) != 0) {
gw->form[gw->form_focus_obj].ob_state &= ~(OS_SELECTED|OS_CROSSED);
} else {
gw->form[gw->form_focus_obj].ob_state |= (OS_SELECTED|OS_CROSSED);
}
guiwin_form_redraw(gw, obj_screen_rect(gw->form,
gw->form_focus_obj));
}
short oldevents = ev_out->emo_events;
short msg_out[8] = { GUIWIN_WM_FORM, gl_apid,
0, gw->handle,
@ -426,7 +444,6 @@ static short preproc_mu_button(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
}
}
}
}
return(retval);
}
@ -682,8 +699,6 @@ void guiwin_get_grect(GUIWIN *win, enum guwin_area_e mode, GRECT *dest)
wind_get_grect(win->handle, WF_WORKXYWH, dest);
dbg_grect("gw base rect", dest);
if (mode == GUIWIN_AREA_CONTENT) {
GRECT tb_area;
guiwin_get_grect(win, GUIWIN_AREA_TOOLBAR, &tb_area);
@ -698,9 +713,9 @@ void guiwin_get_grect(GUIWIN *win, enum guwin_area_e mode, GRECT *dest)
} else if (mode == GUIWIN_AREA_TOOLBAR) {
if (win->toolbar) {
if (win->flags & GW_FLAG_HAS_VTOOLBAR) {
dest->g_w = win->toolbar[win->toolbar_idx].ob_width;
dest->g_w = win->toolbar_size;
} else {
dest->g_h = win->toolbar[win->toolbar_idx].ob_height;
dest->g_h = win->toolbar_size;
}
dbg_grect("gw tb rect", dest);
}
@ -923,23 +938,30 @@ void guiwin_set_toolbar(GUIWIN *win, OBJECT *toolbar, short idx, uint32_t flags)
win->toolbar_edit_obj = -1;
if (flags & GW_FLAG_HAS_VTOOLBAR) {
win->flags |= GW_FLAG_HAS_VTOOLBAR;
win->toolbar_size = win->toolbar[idx].ob_width;
}
else {
win->toolbar_size = win->toolbar[idx].ob_height;
}
}
/** Update width/height of the toolbar region
* \param win the GUIWIN
* \param w The new width of the toolbar area
* \param h The new height of the toolbar area
* \param s depending on the flag GW_FLAG_HAS_VTOOLBAR this is the width or the height
*/
void guiwin_set_toolbar_size(GUIWIN *win, uint16_t w, uint16_t h)
void guiwin_set_toolbar_size(GUIWIN *win, uint16_t s)
{
bool is_custom = (win->flags & GW_FLAG_CUSTOM_TOOLBAR);
if (win->toolbar && is_custom == false) {
assert(win->toolbar_idx > -1);
win->toolbar[win->toolbar_idx].ob_width = w;
win->toolbar[win->toolbar_idx].ob_height = h;
win->toolbar_size = s;
}
/** Set an custom toolbar redraw function which is called instead of
* default drawing routine.
* \param win the GUIWIN
* \param func the custom redraw function
*/
void guiwin_set_toolbar_redraw_func(GUIWIN *win, guiwin_redraw_f func)
{
win->toolbar_redraw_func = func;
}
/**
@ -1108,8 +1130,10 @@ bool guiwin_has_intersection(GUIWIN *win, GRECT *work)
}
/** Execute an toolbar redraw
* \param msg specifies the AES message which initiated the redraw, or 0 when
* the function was called without AES message context.
*/
void guiwin_toolbar_redraw(GUIWIN *gw, GRECT *clip)
void guiwin_toolbar_redraw(GUIWIN *gw, uint16_t msg, GRECT *clip)
{
GRECT tb_area, tb_area_ro, g;
@ -1123,6 +1147,15 @@ void guiwin_toolbar_redraw(GUIWIN *gw, GRECT *clip)
if (rc_intersect(clip, &tb_area)) {
if (gw->toolbar_redraw_func != NULL) {
// customized redraw:
gw->toolbar_redraw_func(gw, msg, &tb_area);
} else {
// Default redraw action
// Update object position:
gw->toolbar[gw->toolbar_idx].ob_x = tb_area_ro.g_x;
gw->toolbar[gw->toolbar_idx].ob_y = tb_area_ro.g_y;
@ -1140,6 +1173,7 @@ void guiwin_toolbar_redraw(GUIWIN *gw, GRECT *clip)
}
}
}
}
/** Execute FORM redraw
*/

View File

@ -1,7 +1,7 @@
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <gem.h>
#include <mt_gem.h>
#include "gemtk.h"
/* -------------------------------------------------------------------------- */
@ -64,14 +64,15 @@ int keybd2ascii( int keybd, int shift)
return (shift)?key->shift[keybd>>8]:key->unshift[keybd>>8];
}
void gemtk_clip_grect(VdiHdl vh, GRECT *rect)
{
short pxy[4];
PXY pxy[2];
pxy[0] = rect->g_x;
pxy[1] = rect->g_y;
pxy[2] = pxy[0] + rect->g_w-1;
pxy[3] = pxy[1] + rect->g_h-1;
pxy[0].p_x = rect->g_x;
pxy[0].p_y = rect->g_y;
pxy[1].p_x = pxy[0].p_x + rect->g_w - 1;
pxy[1].p_y = pxy[0].p_y + rect->g_h - 1;
vs_clip_pxy(vh, pxy);
}

Binary file not shown.

View File

@ -41,25 +41,23 @@
#define MAINMENU_M_HELP_CONTENT 61 /* STRING in tree MAINMENU */
#define TOOLBAR 1 /* form/dial */
#define TOOLBAR_AREA_SEARCH 9 /* BOX in tree TOOLBAR */
#define TOOLBAR_BT_SEARCH 10 /* BUTTON in tree TOOLBAR */
#define TOOLBAR_BT_SEARCH_BACK 12 /* BUTTON in tree TOOLBAR */
#define TOOLBAR_CB_CASESENSE 14 /* BOXCHAR in tree TOOLBAR */
#define TOOLBAR_CB_SHOWALL 15 /* BOXCHAR in tree TOOLBAR */
#define TOOLBAR_LBL_SHOWALL 16 /* STRING in tree TOOLBAR */
#define TOOLBAR_LBL_CASESENSE 17 /* TEXT in tree TOOLBAR */
#define TOOLBAR_TB_SRCH 18 /* FTEXT in tree TOOLBAR */
#define TOOLBAR_SEARCH_ALIGN_RIGHT 20 /* IBOX in tree TOOLBAR */
#define TOOLBAR_CLOSE_SEARCH 11 /* BUTTON in tree TOOLBAR */
#define TOOLBAR_AREA_NAVIGATION 19 /* BOX in tree TOOLBAR */
#define TOOLBAR_AREA_BUTTONS 1 /* IBOX in tree TOOLBAR */
#define TOOLBAR_BT_BACK 2 /* CICON in tree TOOLBAR */
#define TOOLBAR_BT_HOME 3 /* CICON in tree TOOLBAR */
#define TOOLBAR_BT_FORWARD 4 /* CICON in tree TOOLBAR */
#define TOOLBAR_BT_STOP 5 /* CICON in tree TOOLBAR */
#define TOOLBAR_BT_RELOAD 6 /* CICON in tree TOOLBAR */
#define TOOLBAR_AREA_URL 7 /* BOX in tree TOOLBAR */
#define TOOLBAR_THROBBER_AREA 8 /* BOX in tree TOOLBAR */
#define TOOLBAR_AREA_SEARCH 1 /* BOX in tree TOOLBAR */
#define TOOLBAR_BT_SEARCH 2 /* BUTTON in tree TOOLBAR */
#define TOOLBAR_BT_SEARCH_BACK 3 /* BUTTON in tree TOOLBAR */
#define TOOLBAR_CB_CASESENSE 5 /* BUTTON in tree TOOLBAR */
#define TOOLBAR_CB_SHOWALL 6 /* BUTTON in tree TOOLBAR */
#define TOOLBAR_TB_SRCH 7 /* FTEXT in tree TOOLBAR */
#define TOOLBAR_SEARCH_ALIGN_RIGHT 8 /* IBOX in tree TOOLBAR */
#define TOOLBAR_CLOSE_SEARCH 9 /* BUTTON in tree TOOLBAR */
#define TOOLBAR_AREA_NAVIGATION 10 /* BOX in tree TOOLBAR */
#define TOOLBAR_AREA_BUTTONS 11 /* IBOX in tree TOOLBAR */
#define TOOLBAR_BT_BACK 12 /* CICON in tree TOOLBAR */
#define TOOLBAR_BT_HOME 13 /* CICON in tree TOOLBAR */
#define TOOLBAR_BT_FORWARD 14 /* CICON in tree TOOLBAR */
#define TOOLBAR_BT_STOP 15 /* CICON in tree TOOLBAR */
#define TOOLBAR_BT_RELOAD 16 /* CICON in tree TOOLBAR */
#define TOOLBAR_AREA_URL 17 /* BOX in tree TOOLBAR */
#define TOOLBAR_THROBBER_AREA 18 /* BOX in tree TOOLBAR */
#define ICONIFY 2 /* form/dial */
#define ICONIFY_GLOBE 1 /* CICON in tree ICONIFY */
@ -137,69 +135,63 @@
#define SETTINGS 13 /* form/dial */
#define SETTINGS_SAVE 1 /* BUTTON in tree SETTINGS */
#define SETTINGS_ABORT 2 /* BUTTON in tree SETTINGS */
#define SETTINGS_GROUP_BROWSER 3 /* IBOX in tree SETTINGS */
#define SETTINGS_EDIT_HOMEPAGE 5 /* FTEXT in tree SETTINGS */
#define SETTINGS_LBL_CB_HIDE_ADVERTISEMENT 6 /* STRING in tree SETTINGS */
#define SETTINGS_LBL_CB_DISABLE_POPUP_WINDOWS 7 /* STRING in tree SETTINGS */
#define SETTINGS_CB_HIDE_ADVERTISEMENT 8 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_CB_DISABLE_POPUP_WINDOWS 9 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_LBL_CB_SEND_HTTP_REFERRER 10 /* STRING in tree SETTINGS */
#define SETTINGS_CB_SEND_HTTP_REFERRER 11 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_LBL_CB_SEND_DO_NOT_TRACK 12 /* STRING in tree SETTINGS */
#define SETTINGS_CB_SEND_DO_NOT_TRACK 13 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_BT_CLEAR_HISTORY 15 /* BUTTON in tree SETTINGS */
#define SETTINGS_BT_SEL_LOCALE 17 /* BUTTON in tree SETTINGS */
#define SETTINGS_BT_GUI_LANG 19 /* BUTTON in tree SETTINGS */
#define SETTINGS_INC_MEM_CACHE 22 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_DEC_MEM_CACHE 23 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_STR_MAX_MEM_CACHE 24 /* STRING in tree SETTINGS */
#define SETTINGS_DEC_HISTORY_AGE 27 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_EDIT_HISTORY_AGE 28 /* FTEXT in tree SETTINGS */
#define SETTINGS_INC_HISTORY_AGE 29 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_GROUP_NETWORK 32 /* IBOX in tree SETTINGS */
#define SETTINGS_CB_USE_PROXY 34 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_LBL_USE_PROXY 35 /* STRING in tree SETTINGS */
#define SETTINGS_EDIT_PROXY_HOST 36 /* FTEXT in tree SETTINGS */
#define SETTINGS_EDIT_PROXY_PORT 38 /* FTEXT in tree SETTINGS */
#define SETTINGS_CB_PROXY_AUTH 39 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_LBL_PROXY_AUTH 40 /* STRING in tree SETTINGS */
#define SETTINGS_EDIT_PROXY_USERNAME 41 /* FTEXT in tree SETTINGS */
#define SETTINGS_EDIT_PROXY_PASSWORD 42 /* FTEXT in tree SETTINGS */
#define SETTINGS_EDIT_MAX_FETCHERS 47 /* FTEXT in tree SETTINGS */
#define SETTINGS_INC_MAX_FETCHERS 48 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_DEC_MAX_FETCHERS 49 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_DEC_MAX_FETCHERS_PER_HOST 51 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_EDIT_MAX_FETCHERS_PER_HOST 52 /* FTEXT in tree SETTINGS */
#define SETTINGS_INC_MAX_FETCHERS_PER_HOST 53 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_DEC_CACHED_CONNECTIONS 55 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_EDIT_MAX_CACHED_CONNECTIONS 56 /* FTEXT in tree SETTINGS */
#define SETTINGS_INC_CACHED_CONNECTIONS 57 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_GROUP_RENDERING 59 /* IBOX in tree SETTINGS */
#define SETTINGS_EDIT_DOWNLOAD_PATH 5 /* FTEXT in tree SETTINGS */
#define SETTINGS_EDIT_HOTLIST_FILE 6 /* FTEXT in tree SETTINGS */
#define SETTINGS_EDIT_CA_BUNDLE 7 /* FTEXT in tree SETTINGS */
#define SETTINGS_EDIT_CA_CERTS_PATH 8 /* FTEXT in tree SETTINGS */
#define SETTINGS_EDIT_EDITOR 9 /* FTEXT in tree SETTINGS */
/* Make sure that initial value is large enough! */
#define SETTINGS_BT_SEL_FONT_RENDERER 62 /* BUTTON in tree SETTINGS */
#define SETTINGS_CB_ANTI_ALIASING 63 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_CB_TRANSPARENCY 65 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_EDIT_DEF_FONT_SIZE 77 /* FTEXT in tree SETTINGS */
#define SETTINGS_DEC_DEF_FONT_SIZE 78 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_INC_DEF_FONT_SIZE 79 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_EDIT_MIN_FONT_SIZE 81 /* FTEXT in tree SETTINGS */
#define SETTINGS_DEC_MIN_FONT_SIZE 82 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_INC_MIN_FONT_SIZE 83 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_EDIT_MIN_GIF_DELAY 72 /* FTEXT in tree SETTINGS */
#define SETTINGS_INC_GIF_DELAY 73 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_DEC_GIF_DELAY 74 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_CB_ENABLE_ANIMATION 67 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_CB_BG_IMAGES 102 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_CB_FG_IMAGES 105 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_EDIT_MIN_REFLOW_PERIOD 109 /* FTEXT in tree SETTINGS */
#define SETTINGS_DEC_INCREMENTAL_REFLOW 110 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_INC_INCREMENTAL_REFLOW 111 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_GROUP_RENDERING_00 86 /* IBOX in tree SETTINGS */
#define SETTINGS_EDIT_DOWNLOAD_PATH 90 /* FTEXT in tree SETTINGS */
#define SETTINGS_EDIT_HOTLIST_FILE 91 /* FTEXT in tree SETTINGS */
#define SETTINGS_EDIT_CA_BUNDLE 92 /* FTEXT in tree SETTINGS */
#define SETTINGS_EDIT_CA_CERTS_PATH 93 /* FTEXT in tree SETTINGS */
#define SETTINGS_EDIT_EDITOR 94 /* FTEXT in tree SETTINGS */
#define SETTINGS_BT_SEL_FONT_RENDERER 16 /* BUTTON in tree SETTINGS */
#define SETTINGS_CB_ANTI_ALIASING 17 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_CB_TRANSPARENCY 19 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_EDIT_DEF_FONT_SIZE 23 /* FTEXT in tree SETTINGS */
#define SETTINGS_DEC_DEF_FONT_SIZE 24 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_INC_DEF_FONT_SIZE 25 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_EDIT_MIN_FONT_SIZE 27 /* FTEXT in tree SETTINGS */
#define SETTINGS_DEC_MIN_FONT_SIZE 28 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_INC_MIN_FONT_SIZE 29 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_EDIT_MIN_GIF_DELAY 34 /* FTEXT in tree SETTINGS */
#define SETTINGS_INC_GIF_DELAY 35 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_DEC_GIF_DELAY 36 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_CB_ENABLE_ANIMATION 39 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_CB_BG_IMAGES 42 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_CB_FG_IMAGES 45 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_EDIT_MIN_REFLOW_PERIOD 49 /* FTEXT in tree SETTINGS */
#define SETTINGS_DEC_INCREMENTAL_REFLOW 50 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_INC_INCREMENTAL_REFLOW 51 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_CB_USE_PROXY 53 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_LBL_USE_PROXY 54 /* STRING in tree SETTINGS */
#define SETTINGS_EDIT_PROXY_HOST 55 /* FTEXT in tree SETTINGS */
#define SETTINGS_EDIT_PROXY_PORT 57 /* FTEXT in tree SETTINGS */
#define SETTINGS_CB_PROXY_AUTH 58 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_LBL_PROXY_AUTH 59 /* STRING in tree SETTINGS */
#define SETTINGS_EDIT_PROXY_USERNAME 60 /* FTEXT in tree SETTINGS */
#define SETTINGS_EDIT_PROXY_PASSWORD 61 /* FTEXT in tree SETTINGS */
#define SETTINGS_EDIT_MAX_FETCHERS 66 /* FTEXT in tree SETTINGS */
#define SETTINGS_INC_MAX_FETCHERS 67 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_DEC_MAX_FETCHERS 68 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_DEC_MAX_FETCHERS_PER_HOST 70 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_EDIT_MAX_FETCHERS_PER_HOST 71 /* FTEXT in tree SETTINGS */
#define SETTINGS_INC_MAX_FETCHERS_PER_HOST 72 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_DEC_CACHED_CONNECTIONS 74 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_EDIT_MAX_CACHED_CONNECTIONS 75 /* FTEXT in tree SETTINGS */
#define SETTINGS_INC_CACHED_CONNECTIONS 76 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_EDIT_HOMEPAGE 78 /* FTEXT in tree SETTINGS */
#define SETTINGS_CB_HIDE_ADVERTISEMENT 79 /* BUTTON in tree SETTINGS */
#define SETTINGS_CB_DISABLE_POPUP_WINDOWS 80 /* BUTTON in tree SETTINGS */
#define SETTINGS_LBL_CB_SEND_HTTP_REFERRER 81 /* STRING in tree SETTINGS */
#define SETTINGS_CB_SEND_HTTP_REFERRER 82 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_LBL_CB_SEND_DO_NOT_TRACK 83 /* STRING in tree SETTINGS */
#define SETTINGS_CB_SEND_DO_NOT_TRACK 84 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_BT_CLEAR_HISTORY 86 /* BUTTON in tree SETTINGS */
#define SETTINGS_BT_SEL_LOCALE 88 /* BUTTON in tree SETTINGS */
#define SETTINGS_BT_GUI_LANG 90 /* BUTTON in tree SETTINGS */
#define SETTINGS_INC_MEM_CACHE 93 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_DEC_MEM_CACHE 94 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_STR_MAX_MEM_CACHE 95 /* STRING in tree SETTINGS */
#define SETTINGS_DEC_HISTORY_AGE 98 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_EDIT_HISTORY_AGE 99 /* FTEXT in tree SETTINGS */
#define SETTINGS_INC_HISTORY_AGE 100 /* BOXCHAR in tree SETTINGS */
#define POP_LANGUAGE 14 /* form/dial */
#define POP_LANGUAGE_CS 1 /* STRING in tree POP_LANGUAGE */

View File

@ -3,7 +3,7 @@ ResourceMaster v3.65
#N 99@32@AZAaza___ _@AZAaza090___ _@@_@
#FoC-Header@rsm2out@C-Header@rsh@@@[C-Header@0@
#R 0@0@2@1@2@1@
#M 20010100@0@7728@635@
#M 20010100@0@7728@637@
#T 0@1@MAINMENU@@62@@
#O 4@32@T_FILE@@
#O 5@32@T_EDIT@@
@ -43,26 +43,24 @@ ResourceMaster v3.65
#O 58@28@M_CHOICES@@
#O 59@28@M_VLOG@@
#O 61@28@M_HELP_CONTENT@@
#T 1@2@TOOLBAR@@21@@
#O 9@20@AREA_SEARCH@@
#O 10@26@BT_SEARCH@@
#O 12@26@BT_SEARCH_BACK@@
#O 14@27@CB_CASESENSE@@
#O 15@27@CB_SHOWALL@@
#O 16@28@LBL_SHOWALL@@
#O 17@21@LBL_CASESENSE@@
#O 18@29@TB_SRCH@@
#O 20@25@SEARCH_ALIGN_RIGHT@@
#O 11@26@CLOSE_SEARCH@@
#O 19@20@AREA_NAVIGATION@@
#O 1@25@AREA_BUTTONS@@
#O 2@33@BT_BACK@@
#O 3@33@BT_HOME@@
#O 4@33@BT_FORWARD@@
#O 5@33@BT_STOP@@
#O 6@33@BT_RELOAD@@
#O 7@20@AREA_URL@@
#O 8@20@THROBBER_AREA@@
#T 1@2@TOOLBAR@@19@@
#O 1@20@AREA_SEARCH@@
#O 2@26@BT_SEARCH@@
#O 3@26@BT_SEARCH_BACK@@
#O 5@26@CB_CASESENSE@@
#O 6@26@CB_SHOWALL@@
#O 7@29@TB_SRCH@@
#O 8@25@SEARCH_ALIGN_RIGHT@@
#O 9@26@CLOSE_SEARCH@@
#O 10@20@AREA_NAVIGATION@@
#O 11@25@AREA_BUTTONS@@
#O 12@33@BT_BACK@@
#O 13@33@BT_HOME@@
#O 14@33@BT_FORWARD@@
#O 15@33@BT_STOP@@
#O 16@33@BT_RELOAD@@
#O 17@20@AREA_URL@@
#O 18@20@THROBBER_AREA@@
#T 2@2@ICONIFY@@3@@
#O 1@33@GLOBE@@
#T 3@2@FAVICON@@2@@
@ -124,71 +122,65 @@ ResourceMaster v3.65
#O 5@33@BT_DOWN_PIC@@
#O 6@25@BT_UP@@
#O 4@33@BT_UP_PIC@@
#T 13@2@SETTINGS@@112@@
#T 13@2@SETTINGS@@102@@
#O 1@26@SAVE@@
#O 2@26@ABORT@@
#O 3@25@GROUP_BROWSER@@
#O 5@29@EDIT_HOMEPAGE@@
#O 6@28@LBL_CB_HIDE_ADVERTISEMENT@@
#O 7@28@LBL_CB_DISABLE_POPUP_WINDOWS@@
#O 8@27@CB_HIDE_ADVERTISEMENT@@
#O 9@27@CB_DISABLE_POPUP_WINDOWS@@
#O 10@28@LBL_CB_SEND_HTTP_REFERRER@@
#O 11@27@CB_SEND_HTTP_REFERRER@@
#O 12@28@LBL_CB_SEND_DO_NOT_TRACK@@
#O 13@27@CB_SEND_DO_NOT_TRACK@@
#O 15@26@BT_CLEAR_HISTORY@@
#O 17@26@BT_SEL_LOCALE@@
#O 19@26@BT_GUI_LANG@@
#O 22@27@INC_MEM_CACHE@@
#O 23@27@DEC_MEM_CACHE@@
#O 24@28@STR_MAX_MEM_CACHE@@
#O 27@27@DEC_HISTORY_AGE@@
#O 28@29@EDIT_HISTORY_AGE@@
#O 29@27@INC_HISTORY_AGE@@
#O 32@25@GROUP_NETWORK@@
#O 34@27@CB_USE_PROXY@@
#O 35@28@LBL_USE_PROXY@@
#O 36@29@EDIT_PROXY_HOST@@
#O 38@29@EDIT_PROXY_PORT@@
#O 39@27@CB_PROXY_AUTH@@
#O 40@28@LBL_PROXY_AUTH@@
#O 41@29@EDIT_PROXY_USERNAME@@
#O 42@29@EDIT_PROXY_PASSWORD@@
#O 47@29@EDIT_MAX_FETCHERS@@
#O 48@27@INC_MAX_FETCHERS@@
#O 49@27@DEC_MAX_FETCHERS@@
#O 51@27@DEC_MAX_FETCHERS_PER_HOST@@
#O 52@29@EDIT_MAX_FETCHERS_PER_HOST@@
#O 53@27@INC_MAX_FETCHERS_PER_HOST@@
#O 55@27@DEC_CACHED_CONNECTIONS@@
#O 56@29@EDIT_MAX_CACHED_CONNECTIONS@@
#O 57@27@INC_CACHED_CONNECTIONS@@
#O 59@25@GROUP_RENDERING@@
#O 62@26@BT_SEL_FONT_RENDERER@Make sure that initial value is large enough!@
#O 63@27@CB_ANTI_ALIASING@@
#O 65@27@CB_TRANSPARENCY@@
#O 77@29@EDIT_DEF_FONT_SIZE@@
#O 78@27@DEC_DEF_FONT_SIZE@@
#O 79@27@INC_DEF_FONT_SIZE@@
#O 81@29@EDIT_MIN_FONT_SIZE@@
#O 82@27@DEC_MIN_FONT_SIZE@@
#O 83@27@INC_MIN_FONT_SIZE@@
#O 72@29@EDIT_MIN_GIF_DELAY@@
#O 73@27@INC_GIF_DELAY@@
#O 74@27@DEC_GIF_DELAY@@
#O 67@27@CB_ENABLE_ANIMATION@@
#O 102@27@CB_BG_IMAGES@@
#O 105@27@CB_FG_IMAGES@@
#O 109@29@EDIT_MIN_REFLOW_PERIOD@@
#O 110@27@DEC_INCREMENTAL_REFLOW@@
#O 111@27@INC_INCREMENTAL_REFLOW@@
#O 86@25@GROUP_RENDERING_00@@
#O 90@29@EDIT_DOWNLOAD_PATH@@
#O 91@29@EDIT_HOTLIST_FILE@@
#O 92@29@EDIT_CA_BUNDLE@@
#O 93@29@EDIT_CA_CERTS_PATH@@
#O 94@29@EDIT_EDITOR@@
#O 5@29@EDIT_DOWNLOAD_PATH@@
#O 6@29@EDIT_HOTLIST_FILE@@
#O 7@29@EDIT_CA_BUNDLE@@
#O 8@29@EDIT_CA_CERTS_PATH@@
#O 9@29@EDIT_EDITOR@@
#O 16@26@BT_SEL_FONT_RENDERER@Make sure that initial value is large enough!@
#O 17@27@CB_ANTI_ALIASING@@
#O 19@27@CB_TRANSPARENCY@@
#O 23@29@EDIT_DEF_FONT_SIZE@@
#O 24@27@DEC_DEF_FONT_SIZE@@
#O 25@27@INC_DEF_FONT_SIZE@@
#O 27@29@EDIT_MIN_FONT_SIZE@@
#O 28@27@DEC_MIN_FONT_SIZE@@
#O 29@27@INC_MIN_FONT_SIZE@@
#O 34@29@EDIT_MIN_GIF_DELAY@@
#O 35@27@INC_GIF_DELAY@@
#O 36@27@DEC_GIF_DELAY@@
#O 39@27@CB_ENABLE_ANIMATION@@
#O 42@27@CB_BG_IMAGES@@
#O 45@27@CB_FG_IMAGES@@
#O 49@29@EDIT_MIN_REFLOW_PERIOD@@
#O 50@27@DEC_INCREMENTAL_REFLOW@@
#O 51@27@INC_INCREMENTAL_REFLOW@@
#O 53@27@CB_USE_PROXY@@
#O 54@28@LBL_USE_PROXY@@
#O 55@29@EDIT_PROXY_HOST@@
#O 57@29@EDIT_PROXY_PORT@@
#O 58@27@CB_PROXY_AUTH@@
#O 59@28@LBL_PROXY_AUTH@@
#O 60@29@EDIT_PROXY_USERNAME@@
#O 61@29@EDIT_PROXY_PASSWORD@@
#O 66@29@EDIT_MAX_FETCHERS@@
#O 67@27@INC_MAX_FETCHERS@@
#O 68@27@DEC_MAX_FETCHERS@@
#O 70@27@DEC_MAX_FETCHERS_PER_HOST@@
#O 71@29@EDIT_MAX_FETCHERS_PER_HOST@@
#O 72@27@INC_MAX_FETCHERS_PER_HOST@@
#O 74@27@DEC_CACHED_CONNECTIONS@@
#O 75@29@EDIT_MAX_CACHED_CONNECTIONS@@
#O 76@27@INC_CACHED_CONNECTIONS@@
#O 78@29@EDIT_HOMEPAGE@@
#O 79@26@CB_HIDE_ADVERTISEMENT@@
#O 80@26@CB_DISABLE_POPUP_WINDOWS@@
#O 81@28@LBL_CB_SEND_HTTP_REFERRER@@
#O 82@27@CB_SEND_HTTP_REFERRER@@
#O 83@28@LBL_CB_SEND_DO_NOT_TRACK@@
#O 84@27@CB_SEND_DO_NOT_TRACK@@
#O 86@26@BT_CLEAR_HISTORY@@
#O 88@26@BT_SEL_LOCALE@@
#O 90@26@BT_GUI_LANG@@
#O 93@27@INC_MEM_CACHE@@
#O 94@27@DEC_MEM_CACHE@@
#O 95@28@STR_MAX_MEM_CACHE@@
#O 98@27@DEC_HISTORY_AGE@@
#O 99@29@EDIT_HISTORY_AGE@@
#O 100@27@INC_HISTORY_AGE@@
#T 14@2@POP_LANGUAGE@@16@@
#O 1@28@CS@@
#O 2@28@DE@@
@ -208,4 +200,4 @@ ResourceMaster v3.65
#T 15@2@POP_FONT_RENDERER@@3@@
#O 1@28@INTERNAL@@
#O 2@28@FREETYPE@@
#c 32249@
#c 27715@

View File

@ -83,6 +83,7 @@ static void on_file_dropped(ROOTWIN *rootwin, short msg[8]);
static short on_window_key_input(ROOTWIN * rootwin, unsigned short nkc);
static bool on_content_mouse_click(ROOTWIN *rootwin);
static bool on_content_mouse_move(ROOTWIN *rootwin, GRECT *content_area);
static void toolbar_redraw_cb(GUIWIN *win, uint16_t msg, GRECT *clip);
static bool redraw_active = false;
@ -92,11 +93,6 @@ static const struct redraw_context rootwin_rdrw_ctx = {
.plot = &atari_plotters
};
/* -------------------------------------------------------------------------- */
/* Module public functions: */
/* -------------------------------------------------------------------------- */
static short handle_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8])
{
short retval = 0;
@ -209,6 +205,9 @@ static short handle_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8])
return(retval);
}
/* -------------------------------------------------------------------------- */
/* Module public functions: */
/* -------------------------------------------------------------------------- */
int window_create(struct gui_window * gw,
struct browser_window * bw,
@ -218,6 +217,8 @@ int window_create(struct gui_window * gw,
int err = 0;
bool tb, sb;
int flags;
struct rootwin_data_s *data;
struct guiwin_scroll_info_s *slid;
tb = (inflags & WIDGET_TOOLBAR);
sb = (inflags & WIDGET_STATUSBAR);
@ -251,24 +252,25 @@ int window_create(struct gui_window * gw,
gw->root->win = guiwin_add(gw->root->aes_handle,
GW_FLAG_PREPROC_WM | GW_FLAG_RECV_PREPROC_WM, handle_event);
struct rootwin_data_s * data = malloc(sizeof(struct rootwin_data_s));
data = malloc(sizeof(struct rootwin_data_s));
data->rootwin = gw->root;
guiwin_set_user_data(gw->root->win, (void*)data);
struct guiwin_scroll_info_s *slid = guiwin_get_scroll_info(gw->root->win);
slid = guiwin_get_scroll_info(gw->root->win);
slid->y_unit_px = 32;
slid->x_unit_px = 32;
/* create toolbar component: */
guiwin_set_toolbar(gw->root->win, get_tree(TOOLBAR), 0, 0);
/* create */
if(tb) {
gw->root->toolbar = toolbar_create(gw->root);
assert(gw->root->toolbar);
guiwin_set_toolbar(gw->root->win, get_tree(TOOLBAR), 0, 0);
guiwin_set_toolbar_redraw_func(gw->root->win, toolbar_redraw_cb);
} else {
gw->root->toolbar = NULL;
}
/* create browser component: */
gw->browser = (CMP_BROWSER)malloc( sizeof(struct s_browser) );
gw->browser = (struct s_browser *)malloc( sizeof(struct s_browser));
assert(gw->browser);
@ -871,7 +873,8 @@ void window_process_redraws(ROOTWIN * rootwin)
redraw_active = true;
window_get_grect(rootwin, BROWSER_AREA_TOOLBAR, &tb_area);
toolbar_get_grect(rootwin->toolbar, 0, &tb_area);
guiwin_set_toolbar_size(rootwin->win, tb_area.g_h);
window_get_grect(rootwin, BROWSER_AREA_CONTENT, &content_area);
//dbg_grect("content area", &content_area);
@ -1230,7 +1233,7 @@ static void on_redraw(ROOTWIN *rootwin, short msg[8])
static void on_resized(ROOTWIN *rootwin)
{
GRECT g, toolbar_area;
GRECT g, work;
OBJECT *toolbar;
struct gui_window *gw;
@ -1244,8 +1247,13 @@ static void on_resized(ROOTWIN *rootwin)
return;
wind_get_grect(rootwin->aes_handle, WF_CURRXYWH, &g);
guiwin_get_grect(rootwin->win, GUIWIN_AREA_WORK, &work);
if (rootwin->loc.g_w != g.g_w || rootwin->loc.g_h != g.g_h) {
/* resized */
toolbar_set_width(rootwin->toolbar, work.g_w);
if ( gw->browser->bw->current_content != NULL ) {
/* Reformat will happen when redraw is processed: */
// TODO: call reformat directly, this was introduced because
@ -1254,26 +1262,12 @@ static void on_resized(ROOTWIN *rootwin)
rootwin->active_gui_window->browser->reformat_pending = true;
}
}
// if (rootwin->loc.g_x != g.g_x || rootwin->loc.g_y != g.g_y) {
// // moved
// }
if (rootwin->loc.g_x != g.g_x || rootwin->loc.g_y != g.g_y) {
/* moved */
toolbar_set_origin(rootwin->toolbar, work.g_x, work.g_y);
}
rootwin->loc = g;
guiwin_get_grect(rootwin->win, GUIWIN_AREA_TOOLBAR, &g);
dbg_grect("new toolbar area1", &g);
/* fetch old, height: */
toolbar_get_grect(rootwin->toolbar, 0, &toolbar_area);
g.g_h = toolbar_area.g_h;
/* update origin and width: */
dbg_grect("new toolbar area2", &g);
toolbar_set_dimensions(rootwin->toolbar, &g);
/* fetch new coords: */
toolbar_get_grect(rootwin->toolbar, 0, &g);
}
static void on_file_dropped(ROOTWIN *rootwin, short msg[8])
@ -1354,3 +1348,15 @@ error:
ddclose( dd_hdl);
}
static void toolbar_redraw_cb(GUIWIN *win, uint16_t msg, GRECT *clip)
{
struct rootwin_data_s * ud;
if (msg != WM_REDRAW) {
ud = guiwin_get_user_data(win);
assert(ud);
toolbar_redraw(ud->rootwin->toolbar, clip);
}
}

View File

@ -368,7 +368,7 @@ SEARCH_FORM_SESSION open_browser_search(struct gui_window * gw)
EvntAdd(sfs->formwind, WM_CLOSED, evnt_close, EV_TOP);
*/
apply_form(searchwin, &sfs->state );
set_text(SEARCH_TB_SRCH, "", 31);
set_text(SEARCH_TB_SRCH, (char*)"", 31);
return(current);

View File

@ -27,6 +27,9 @@
#define SEARCH_MAX_SLEN 24
struct gui_window;
struct browser_window;
struct s_search_form_state
{
char text[32];

View File

@ -485,12 +485,42 @@ void toolbar_update_buttons(struct s_toolbar *tb, struct browser_window *bw,
}
}
void toolbar_set_width(struct s_toolbar *tb, short w)
{
GRECT cur;
toolbar_get_grect(tb, 0, &cur);
if (w != cur.g_w) {
tb->area.g_w = w;
/* reflow now, just for url input calucation: */
toolbar_reflow(tb);
/* this will request an textarea redraw: */
textarea_set_dimensions(tb->url.textarea,
aes_toolbar[TOOLBAR_AREA_URL].ob_width,
aes_toolbar[TOOLBAR_AREA_URL].ob_height);
tb->reflow = true;
}
}
void toolbar_set_origin(struct s_toolbar *tb, short x, short y)
{
GRECT cur;
toolbar_get_grect(tb, 0, &cur);
if (x != cur.g_x || y != cur.g_y) {
tb->area.g_x = x;
tb->area.g_y = y;
tb->reflow = true;
}
}
void toolbar_set_dimensions(struct s_toolbar *tb, GRECT *area)
{
dbg_grect("toolbar_set_dimensions", area);
if (area->g_w != tb->area.g_w || area->g_h != tb->area.g_h) {
if (area->g_w != tb->area.g_w) {
tb->area = *area;
@ -733,6 +763,7 @@ void toolbar_mouse_input(struct s_toolbar *tb, short obj, short button)
}
} else {
struct s_tb_button *bt = find_button(tb, obj);
printf("found button: %p\n", bt);
if (bt != NULL && bt->state != button_off) {
bt->cb_click(tb);
struct gui_window * gw = window_get_active_gui_window(tb->owner);

View File

@ -48,8 +48,6 @@ void toolbar_init(void);
struct s_toolbar *toolbar_create(struct s_gui_win_root *owner);
void toolbar_destroy(struct s_toolbar * tb);
void toolbar_exit( void );
void toolbar_set_dimensions(struct s_toolbar *tb, GRECT *area);
void toolbar_set_url(struct s_toolbar *tb, const char *text);
bool toolbar_text_input(struct s_toolbar *tb, char *text);
bool toolbar_key_input(struct s_toolbar *tb, short nkc);
void toolbar_mouse_input(struct s_toolbar *tb, short obj, short mbut);
@ -62,6 +60,10 @@ void toolbar_set_throbber_state(struct s_toolbar *tb, bool active);
void toolbar_set_attached(struct s_toolbar *tb, bool attached);
void toolbar_set_visible(struct s_toolbar *tb, short area, bool visible);
void toolbar_set_reflow(struct s_toolbar *tb, bool do_reflow);
void toolbar_set_width(struct s_toolbar *tb, short w);
void toolbar_set_origin(struct s_toolbar *tb, short x, short y);
void toolbar_set_dimensions(struct s_toolbar *tb, GRECT *area);
void toolbar_set_url(struct s_toolbar *tb, const char *text);
void toolbar_redraw(struct s_toolbar *tb, GRECT *clip);
void toolbar_throbber_progress(struct s_toolbar *tb);
/* public events handlers: */