NetSurf
|
#include <assert.h>
#include <stdbool.h>
#include <libnsfb.h>
#include <libnsfb_plot.h>
#include <libnsfb_event.h>
#include <libnsfb_cursor.h>
#include "utils/log.h"
#include "netsurf/browser_window.h"
#include "framebuffer/gui.h"
#include "framebuffer/fbtk.h"
#include "framebuffer/image_data.h"
#include "widget.h"
Go to the source code of this file.
fbtk_widget_t * fbtk_create_hscroll | ( | fbtk_widget_t * | window, |
int | x, | ||
int | y, | ||
int | width, | ||
int | height, | ||
colour | fg, | ||
colour | bg, | ||
fbtk_callback | callback, | ||
void * | context | ||
) |
Create a horizontal scroll widget.
Create a horizontal scroll widget.
window | The window to add the filled area widget to. |
x | X coordinate of widget. |
y | Y coordinate of widget. |
width | Width of the widget |
height | Height of the widget |
bg | background colour |
fg | foreground colour |
callback | Called on scroll |
context | context passed to callback. |
Definition at line 463 of file scroll.c.
References fbtk_widget_s::bg, fbtk_widget_s::btndr, fbtk_widget_s::btnul, FB_WIDGET_TYPE_HSCROLL, FBTK_CBT_CLICK, FBTK_CBT_REDRAW, FBTK_CBT_SCROLLX, fbtk_create_button(), fbtk_set_handler(), fbtk_widget_new(), fbtk_widget_s::fg, height, hscroll_redraw(), hscrollarea_click(), hscrolll_click(), hscrollr_click(), fbtk_widget_s::mapped, parent, fbtk_widget_s::scroll, scrolll, scrollr, fbtk_widget_s::u, fbtk_bitmap::width, and width.
Referenced by create_normal_browser_window(), and fb_corewindow_init().
fbtk_widget_t * fbtk_create_vscroll | ( | fbtk_widget_t * | window, |
int | x, | ||
int | y, | ||
int | width, | ||
int | height, | ||
colour | fg, | ||
colour | bg, | ||
fbtk_callback | callback, | ||
void * | context | ||
) |
Create a vertical scroll widget.
Create a vertical scroll widget.
window | The window to add the filled area widget to. |
x | X coordinate of widget. |
y | Y coordinate of widget. |
width | Width of the widget |
height | Height of the widget |
bg | background colour |
fg | foreground colour |
callback | Called on scroll |
context | context passed to callback. |
Definition at line 224 of file scroll.c.
References fbtk_widget_s::bg, fbtk_widget_s::btndr, fbtk_widget_s::btnul, FB_WIDGET_TYPE_VSCROLL, FBTK_CBT_CLICK, FBTK_CBT_REDRAW, FBTK_CBT_SCROLLY, fbtk_create_button(), fbtk_set_handler(), fbtk_widget_new(), fbtk_widget_s::fg, fbtk_bitmap::height, height, fbtk_widget_s::mapped, parent, fbtk_widget_s::scroll, scrolld, scrollu, fbtk_widget_s::u, vscroll_redraw(), vscrollarea_click(), vscrolld_click(), vscrollu_click(), and width.
Referenced by create_normal_browser_window(), and fb_corewindow_init().
void fbtk_reposition_hscroll | ( | fbtk_widget_t * | scrollh, |
int | x, | ||
int | y, | ||
int | width, | ||
int | height | ||
) |
Move and/or resize a horizontal scroll widget.
scrollh | the horizontal scroll widget |
x | new x pos |
y | new y pos |
width | new width |
height | new height |
Definition at line 515 of file scroll.c.
References fbtk_widget_s::btndr, fbtk_widget_s::btnul, FB_WIDGET_TYPE_HSCROLL, fbtk_set_pos_and_size(), height, fbtk_widget_s::scroll, scrolll, scrollr, fbtk_widget_s::type, fbtk_widget_s::u, fbtk_bitmap::width, and width.
Referenced by resize_normal_browser_window().
void fbtk_reposition_vscroll | ( | fbtk_widget_t * | scrollv, |
int | x, | ||
int | y, | ||
int | width, | ||
int | height | ||
) |
Move and/or resize a vertical scroll widget.
scrollv | the vertical scroll widget |
x | new x pos |
y | new y pos |
width | new width |
height | new height |
Definition at line 280 of file scroll.c.
References fbtk_widget_s::btndr, fbtk_widget_s::btnul, FB_WIDGET_TYPE_VSCROLL, fbtk_set_pos_and_size(), fbtk_bitmap::height, height, fbtk_widget_s::scroll, scrolld, scrollu, fbtk_widget_s::type, fbtk_widget_s::u, and width.
Referenced by resize_normal_browser_window().
bool fbtk_set_scroll_parameters | ( | fbtk_widget_t * | widget, |
int | min, | ||
int | max, | ||
int | thumb, | ||
int | page | ||
) |
Set scoll widget parameters.
widget | The widget to set the parameters for. |
min | The minimum range value. |
max | The maximum range value. |
thumb | The size of the slider. |
page | The amout to scroll for a page. |
Definition at line 535 of file scroll.c.
References FB_WIDGET_TYPE_HSCROLL, FB_WIDGET_TYPE_VSCROLL, fbtk_request_redraw(), max, fbtk_widget_s::maximum, min, fbtk_widget_s::minimum, fbtk_widget_s::page, fbtk_widget_s::position, fbtk_widget_s::scroll, fbtk_widget_s::thumb, fbtk_widget_s::type, and fbtk_widget_s::u.
Referenced by gui_window_update_extent().
bool fbtk_set_scroll_position | ( | fbtk_widget_t * | widget, |
int | pos | ||
) |
set scroll widget position.
widget | The widget to set the position on. |
pos | The position to set |
Definition at line 565 of file scroll.c.
References FB_WIDGET_TYPE_HSCROLL, FB_WIDGET_TYPE_VSCROLL, fbtk_request_redraw(), fbtk_widget_s::maximum, fbtk_widget_s::position, fbtk_widget_s::scroll, fbtk_widget_s::type, and fbtk_widget_s::u.
Referenced by widget_scroll_x(), and widget_scroll_y().
|
static |
Definition at line 392 of file scroll.c.
References fbtk_callback_info::context, fbtk_widget_s::drag, fbtk_widget_s::drag_position, FBTK_CBT_SCROLLX, fbtk_post_callback(), fbtk_widget_s::maximum, fbtk_widget_s::minimum, fbtk_widget_s::position, fbtk_widget_s::scroll, fbtk_widget_s::thumb, fbtk_widget_s::u, fbtk_widget_s::width, and fbtk_callback_info::x.
Referenced by hscrollarea_click().
|
static |
Definition at line 300 of file scroll.c.
References fbtk_widget_s::bg, fbtk_get_bbox(), fbtk_get_root_widget(), fbtk_widget_s::fg, fbtk_widget_s::height, fbtk_widget_s::maximum, fbtk_widget_s::minimum, NSLOG, fbtk_widget_s::position, root, fbtk_widget_s::scroll, fbtk_widget_s::thumb, fbtk_widget_s::u, fbtk_widget_s::width, rect::x0, rect::x1, rect::y0, and rect::y1.
Referenced by fbtk_create_hscroll().
|
static |
Definition at line 415 of file scroll.c.
References fbtk_callback_info::context, fbtk_widget_s::drag, fbtk_widget_s::drag_position, fbtk_callback_info::event, FBTK_CBT_POINTERMOVE, FBTK_CBT_SCROLLX, fbtk_post_callback(), fbtk_set_handler(), fbtk_tgrab_pointer(), hscroll_drag(), fbtk_widget_s::maximum, fbtk_widget_s::minimum, fbtk_widget_s::page, fbtk_widget_s::position, fbtk_widget_s::scroll, fbtk_widget_s::thumb, fbtk_widget_s::u, fbtk_widget_s::width, and fbtk_callback_info::x.
Referenced by fbtk_create_hscroll().
|
static |
Definition at line 352 of file scroll.c.
References fbtk_callback_info::context, fbtk_callback_info::event, FBTK_CBT_SCROLLX, fbtk_post_callback(), fbtk_widget_s::minimum, NSLOG, fbtk_widget_s::page, fbtk_widget_s::position, fbtk_widget_s::scroll, and fbtk_widget_s::u.
Referenced by fbtk_create_hscroll().
|
static |
Definition at line 373 of file scroll.c.
References fbtk_callback_info::context, fbtk_callback_info::event, FBTK_CBT_SCROLLX, fbtk_post_callback(), fbtk_widget_s::maximum, fbtk_widget_s::page, fbtk_widget_s::position, fbtk_widget_s::scroll, fbtk_widget_s::thumb, and fbtk_widget_s::u.
Referenced by fbtk_create_hscroll().
|
static |
Definition at line 93 of file scroll.c.
References fbtk_callback_info::context, fbtk_widget_s::drag, fbtk_widget_s::drag_position, FBTK_CBT_SCROLLY, fbtk_post_callback(), fbtk_widget_s::height, fbtk_widget_s::maximum, fbtk_widget_s::minimum, fbtk_widget_s::position, fbtk_widget_s::scroll, fbtk_widget_s::thumb, fbtk_widget_s::u, and fbtk_callback_info::y.
Referenced by vscrollarea_click().
|
static |
Definition at line 42 of file scroll.c.
References fbtk_widget_s::bg, fbtk_get_bbox(), fbtk_get_root_widget(), fbtk_widget_s::fg, fbtk_widget_s::height, fbtk_widget_s::maximum, fbtk_widget_s::minimum, fbtk_widget_s::position, root, fbtk_widget_s::scroll, fbtk_widget_s::thumb, fbtk_widget_s::u, fbtk_widget_s::width, rect::x0, rect::x1, rect::y0, and rect::y1.
Referenced by fbtk_create_vscroll().
|
static |
Definition at line 154 of file scroll.c.
References fbtk_callback_info::context, fbtk_widget_s::drag, fbtk_widget_s::drag_position, fbtk_callback_info::event, FBTK_CBT_POINTERMOVE, FBTK_CBT_SCROLLY, fbtk_post_callback(), fbtk_set_handler(), fbtk_tgrab_pointer(), fbtk_widget_s::height, fbtk_widget_s::maximum, fbtk_widget_s::minimum, fbtk_widget_s::page, fbtk_widget_s::position, fbtk_widget_s::scroll, fbtk_widget_s::thumb, fbtk_widget_s::u, vscroll_drag(), and fbtk_callback_info::y.
Referenced by fbtk_create_vscroll().
|
static |
Definition at line 135 of file scroll.c.
References fbtk_callback_info::context, fbtk_callback_info::event, FBTK_CBT_SCROLLY, fbtk_post_callback(), fbtk_widget_s::maximum, fbtk_widget_s::page, fbtk_widget_s::position, fbtk_widget_s::scroll, fbtk_widget_s::thumb, and fbtk_widget_s::u.
Referenced by fbtk_create_vscroll().
|
static |
Definition at line 116 of file scroll.c.
References fbtk_callback_info::context, fbtk_callback_info::event, FBTK_CBT_SCROLLY, fbtk_post_callback(), fbtk_widget_s::minimum, fbtk_widget_s::page, fbtk_widget_s::position, fbtk_widget_s::scroll, and fbtk_widget_s::u.
Referenced by fbtk_create_vscroll().