diff options
Diffstat (limited to 'atari')
-rwxr-xr-x | atari/toolbar.c | 22 | ||||
-rwxr-xr-x | atari/toolbar.h | 7 |
2 files changed, 26 insertions, 3 deletions
diff --git a/atari/toolbar.c b/atari/toolbar.c index 081ef43b1..57671ab99 100755 --- a/atari/toolbar.c +++ b/atari/toolbar.c @@ -409,7 +409,7 @@ static void tb_txt_request_redraw(void *data, int x, int y, int w, int h) t->url.rdw_area.g_h = ( oldy1 > newy1 ) ?
oldy1 - t->url.rdw_area.g_y : newy1 - t->url.rdw_area.g_y;
}
-}
+} void tb_url_redraw( struct gui_window * gw )
{
@@ -752,5 +752,25 @@ void tb_home_click( struct gui_window * gw ) void tb_stop_click( struct gui_window * gw )
{
browser_window_stop( gw->browser->bw );
+} + + +void tb_hide( struct gui_window * gw, short mode ) +{ + CMP_TOOLBAR tb = gw->root->toolbar; + assert( tb != NULL ); + if( mode == 1 ){ + tb->hidden = true; + tb->comp->rect.g_h = 0; + tb->comp->bounds.max_height = 0; + + } else { + tb->hidden = false; + tb->comp->rect.g_h = TOOLBAR_HEIGHT; + tb->comp->bounds.max_height = TOOLBAR_HEIGHT; + } + gw->browser->reformat_pending = true; + browser_update_rects( gw ); + snd_rdw( gw->root->handle ); }
diff --git a/atari/toolbar.h b/atari/toolbar.h index ba967f91e..27bf4396f 100755 --- a/atari/toolbar.h +++ b/atari/toolbar.h @@ -70,7 +70,8 @@ struct s_toolbar struct s_throbber_widget throbber; GRECT btdim;
/* size & location of buttons: */ - struct s_tb_button * buttons;
+ struct s_tb_button * buttons; + bool hidden;
int btcnt;
};
@@ -96,6 +97,8 @@ bool tb_url_input( struct gui_window * gw, short keycode ); void tb_url_set( struct gui_window * gw, char * text ); /* perform redraw of invalidated url textinput areas: */ void tb_url_redraw( struct gui_window * gw );
-struct gui_window * tb_gui_window( CMP_TOOLBAR tb );
+struct gui_window * tb_gui_window( CMP_TOOLBAR tb ); +/* hide toolbar, mode = 1: hide, mode = 0: show */ +void tb_hide( struct gui_window * gw, short mode );
#endif
|