Download

Support

Ewl_Scrollport: A Scrollable Viewing Area


Detailed Description

Provides a framework for viewing large sets of widgets in a smaller viewable region. For most uses, Ewl_Scrollpane will be easier to work with.

Remarks:
Inherits from Ewl_Container.
scrolling support to the scrollport


Data Structures

struct  Ewl_Scrollport
 Inherits from Ewl_Container and extends it to provide a framework for panning around larger widgets. Vertical and horizontal scrollbars are provided, but they do not move the enclosed box. It the the job of the user to set the sizes used in this widget. More...
struct  Ewl_Scrollport_Kinetic_Info
 Enables a scrollport to be scrolled with kinetic behaviour. More...

Defines

#define EWL_SCROLLPORT(scrollport)   ((Ewl_Scrollport *) scrollport)
#define EWL_SCROLLPORT_IS(w)   (ewl_widget_type_is(EWL_WIDGET(w), EWL_SCROLLPORT_TYPE))
#define EWL_SCROLLPORT_KINETIC_INFO(scroll_info)   ((Ewl_Scrollport_Scroll_Info_Base *) scroll_info)
#define EWL_SCROLLPORT_TYPE   "scrollport"

Typedefs

typedef Ewl_Scrollport Ewl_Scrollport
typedef Ewl_Scrollport_Kinetic_Info Ewl_Scrollport_Kinetic_Info

Functions

void ewl_scrollport_area_geometry_get (Ewl_Scrollport *s, int *x, int *y, int *w, int *h)
 Gets the geometry used to calculate the scrollbar sizes.
void ewl_scrollport_area_size_set (Ewl_Scrollport *s, int w, int h)
 Sets the content geometry.
void ewl_scrollport_cb_child_resize (Ewl_Container *p, Ewl_Widget *c, int size, Ewl_Orientation o)
void ewl_scrollport_cb_child_show (Ewl_Container *p, Ewl_Widget *c)
void ewl_scrollport_cb_configure (Ewl_Widget *w, void *ev_data, void *user_data)
void ewl_scrollport_cb_hscroll (Ewl_Widget *w, void *ev_data, void *user_data)
void ewl_scrollport_cb_visible_area_configure (Ewl_Widget *w, void *ev_data, void *user_data)
void ewl_scrollport_cb_vscroll (Ewl_Widget *w, void *ev_data, void *user_data)
void ewl_scrollport_cb_wheel_scroll (Ewl_Widget *w, void *ev_data, void *user_data)
Ewl_Scrollport_Flags ewl_scrollport_hscrollbar_flag_get (Ewl_Scrollport *s)
 Get flags for horizontal scrollbar.
void ewl_scrollport_hscrollbar_flag_set (Ewl_Scrollport *s, Ewl_Scrollport_Flags f)
 Set flags for horizontal scrollbar.
Ewl_Widgetewl_scrollport_hscrollbar_get (Ewl_Scrollport *s)
 Retrieves the vertical scrollbar.
double ewl_scrollport_hscrollbar_step_get (Ewl_Scrollport *s)
 Retrieves the value of the stepping of the vertical scrollbar in s.
double ewl_scrollport_hscrollbar_value_get (Ewl_Scrollport *s)
 Retrieves the value of the horizontal scrollbar in s.
void ewl_scrollport_hscrollbar_value_set (Ewl_Scrollport *s, double val)
 Set the value of the horizontal scrollbar in s to val.
int ewl_scrollport_init (Ewl_Scrollport *s)
 Creates a new scrollport.
double ewl_scrollport_kinetic_dampen_get (Ewl_Scrollport *s)
 Gets the minimum velocity for kinetic scrolling.
void ewl_scrollport_kinetic_dampen_set (Ewl_Scrollport *s, double d)
 Sets the multiplier to reduce the velocity of kinetic scrolling.
int ewl_scrollport_kinetic_fps_get (Ewl_Scrollport *s)
void ewl_scrollport_kinetic_fps_set (Ewl_Scrollport *s, int fps)
 Sets the number of times per second to recalculate velocity and update the tree.
double ewl_scrollport_kinetic_max_velocity_get (Ewl_Scrollport *s)
 Gets the maximum velocity for kinetic scrolling.
void ewl_scrollport_kinetic_max_velocity_set (Ewl_Scrollport *s, double v)
 Sets the maximum velocity for kinetic scrolling.
double ewl_scrollport_kinetic_min_velocity_get (Ewl_Scrollport *s)
 Gets the minimum velocity for kinetic scrolling.
void ewl_scrollport_kinetic_min_velocity_set (Ewl_Scrollport *s, double v)
 Sets the minimum velocity for kinetic scrolling.
Ewl_Kinetic_Scroll ewl_scrollport_kinetic_scrolling_get (Ewl_Scrollport *s)
 Gets the type of kinetic scrolling used.
void ewl_scrollport_kinetic_scrolling_set (Ewl_Scrollport *s, Ewl_Kinetic_Scroll type)
 Sets up default values and callbacks for kinetic scrolling.
Ewl_Widgetewl_scrollport_new (void)
 Create a new scrollpane.
void ewl_scrollport_visible_area_geometry_get (Ewl_Scrollport *s, int *x, int *y, int *w, int *h)
 Gets the geometry of the visible area.
void ewl_scrollport_visible_area_geometry_set (Ewl_Scrollport *s, int x, int y, int w, int h)
 Sets the visible current geometry.
Ewl_Containerewl_scrollport_visible_area_get (Ewl_Scrollport *s)
 Retrieves the visible area container.
Ewl_Scrollport_Flags ewl_scrollport_vscrollbar_flag_get (Ewl_Scrollport *s)
 Get flags for vertical scrollbar.
void ewl_scrollport_vscrollbar_flag_set (Ewl_Scrollport *s, Ewl_Scrollport_Flags f)
 Set flags for vertical scrollbar.
Ewl_Widgetewl_scrollport_vscrollbar_get (Ewl_Scrollport *s)
 Retrieves the vertical scrollbar.
double ewl_scrollport_vscrollbar_step_get (Ewl_Scrollport *s)
 Retrieves the value of the stepping of the vertical scrollbar in s.
double ewl_scrollport_vscrollbar_value_get (Ewl_Scrollport *s)
 Retrieves the value of the vertical scrollbar in s.
void ewl_scrollport_vscrollbar_value_set (Ewl_Scrollport *s, double val)
 Set the value of the vertical scrollbar in s to val.

Variables

int Ewl_Scrollport::area_h
int Ewl_Scrollport::area_w
int Ewl_Scrollport::area_x_offset
int Ewl_Scrollport::area_y_offset
Ewl_Scrollport_Flags Ewl_Scrollport::hflag
Ewl_WidgetEwl_Scrollport::hscrollbar
Ewl_Scrollport_Kinetic_InfoEwl_Scrollport::kinfo
Ewl_Kinetic_Scroll Ewl_Scrollport::type
Ewl_Scrollport_Flags Ewl_Scrollport::vflag
Ewl_WidgetEwl_Scrollport::visible_area
Ewl_WidgetEwl_Scrollport::vscrollbar

Define Documentation

#define EWL_SCROLLPORT ( scrollport   )     ((Ewl_Scrollport *) scrollport)

Typecasts a pointer to an Ewl_Scrollport pointer.

#define EWL_SCROLLPORT_IS (  )     (ewl_widget_type_is(EWL_WIDGET(w), EWL_SCROLLPORT_TYPE))

Returns TRUE if the widget is an Ewl_Scrollport, FALSE otherwise

#define EWL_SCROLLPORT_KINETIC_INFO ( scroll_info   )     ((Ewl_Scrollport_Scroll_Info_Base *) scroll_info)

#define EWL_SCROLLPORT_TYPE   "scrollport"

The type name for the Ewl_Scrollport widget


Typedef Documentation

The scrollport provides a framework for panning around larger widgets.

This is a forward declaration, the actual structure is defined in ewl_scrollport_kinetic.c


Function Documentation

void ewl_scrollport_area_geometry_get ( Ewl_Scrollport s,
int *  x,
int *  y,
int *  w,
int *  h 
)

Gets the geometry used to calculate the scrollbar sizes.

Parameters:
s,: the scrollport to get the geometry from
x,: the current x offset of the content
y,: the current y offset of the content
w,: used to return the width
h,: used to return the height
Returns:
Returns no value

void ewl_scrollport_area_size_set ( Ewl_Scrollport s,
int  w,
int  h 
)

Sets the content geometry.

Parameters:
s,: The scrollport to set the geometry of
w,: The content width
h,: The content height
Returns:
Returns no value

void ewl_scrollport_cb_child_resize ( Ewl_Container p,
Ewl_Widget c,
int  size,
Ewl_Orientation  o 
)

void ewl_scrollport_cb_child_show ( Ewl_Container p,
Ewl_Widget c 
)

void ewl_scrollport_cb_configure ( Ewl_Widget w,
void *  ev_data,
void *  user_data 
)

void ewl_scrollport_cb_hscroll ( Ewl_Widget w,
void *  ev_data,
void *  user_data 
)

void ewl_scrollport_cb_visible_area_configure ( Ewl_Widget w,
void *  ev_data,
void *  user_data 
)

void ewl_scrollport_cb_vscroll ( Ewl_Widget w,
void *  ev_data,
void *  user_data 
)

void ewl_scrollport_cb_wheel_scroll ( Ewl_Widget w,
void *  ev_data,
void *  user_data 
)

Ewl_Scrollport_Flags ewl_scrollport_hscrollbar_flag_get ( Ewl_Scrollport s  ) 

Get flags for horizontal scrollbar.

Parameters:
s,: the scrollport that contains the scrollbar to retrieve
Returns:
Returns the flags of the horizontal scrollbar, 0 on failure.

void ewl_scrollport_hscrollbar_flag_set ( Ewl_Scrollport s,
Ewl_Scrollport_Flags  f 
)

Set flags for horizontal scrollbar.

Parameters:
s,: the scrollport that contains the scrollbar to change
f,: the flags to set on the horizontal scrollbar in s
Returns:
Returns no value.
The scrollbar flags for the horizontal scrollbar are set to f.

Ewl_Widget* ewl_scrollport_hscrollbar_get ( Ewl_Scrollport s  ) 

Retrieves the vertical scrollbar.

Parameters:
s,: the scrollport to retrieve the vertical scrollbar from
Returns:
Returns the vertical scrollbar

double ewl_scrollport_hscrollbar_step_get ( Ewl_Scrollport s  ) 

Retrieves the value of the stepping of the vertical scrollbar in s.

Parameters:
s,: the scrollport to retrieve its vertical scrollbar stepping
Returns:
Returns the value of the stepping of the vertical scrollbar in s on success.

double ewl_scrollport_hscrollbar_value_get ( Ewl_Scrollport s  ) 

Retrieves the value of the horizontal scrollbar in s.

Parameters:
s,: the scrollport to retrieve it's horizontal scrollbar value
Returns:
Returns the value of the horizontal scrollbar in s on success.

void ewl_scrollport_hscrollbar_value_set ( Ewl_Scrollport s,
double  val 
)

Set the value of the horizontal scrollbar in s to val.

Parameters:
s,: the scrollport to set the horizontal scrollbar value
val,: the value to set the scrollbar too
Returns:
Returns nothing

int ewl_scrollport_init ( Ewl_Scrollport s  ) 

Creates a new scrollport.

Parameters:
s,: the scrollport to initialize
Returns:
Returns no value.

double ewl_scrollport_kinetic_dampen_get ( Ewl_Scrollport s  ) 

Gets the minimum velocity for kinetic scrolling.

Parameters:
s,: The scrollport to work with
Returns:
Returns the minimum velocity

void ewl_scrollport_kinetic_dampen_set ( Ewl_Scrollport s,
double  d 
)

Sets the multiplier to reduce the velocity of kinetic scrolling.

Parameters:
s,: The scrollport to work with
d,: The multiplier to reduce velocity
Returns:
Returns no value

int ewl_scrollport_kinetic_fps_get ( Ewl_Scrollport s  ) 

Parameters:
s,: The scrollport to work with
Returns:
Returns the current frames per second brief Gets the times per second the timer used for scrolling will be called

void ewl_scrollport_kinetic_fps_set ( Ewl_Scrollport s,
int  fps 
)

Sets the number of times per second to recalculate velocity and update the tree.

Parameters:
s,: The scrollport to work with
fps,: The desired frames per second
Returns:
Returns no value

double ewl_scrollport_kinetic_max_velocity_get ( Ewl_Scrollport s  ) 

Gets the maximum velocity for kinetic scrolling.

Parameters:
s,: The scrollport to work with
Returns:
Returns the maximum velocity

void ewl_scrollport_kinetic_max_velocity_set ( Ewl_Scrollport s,
double  v 
)

Sets the maximum velocity for kinetic scrolling.

Parameters:
s,: The scrollport to work with
v,: The maximum velocity
Returns:
Returns no value

double ewl_scrollport_kinetic_min_velocity_get ( Ewl_Scrollport s  ) 

Gets the minimum velocity for kinetic scrolling.

Parameters:
s,: The scrollport to work with
Returns:
Returns the minimum velocity

void ewl_scrollport_kinetic_min_velocity_set ( Ewl_Scrollport s,
double  v 
)

Sets the minimum velocity for kinetic scrolling.

Parameters:
s,: The scrollport to work with
v,: The minimum velocity
Returns:
Returns no value

Ewl_Kinetic_Scroll ewl_scrollport_kinetic_scrolling_get ( Ewl_Scrollport s  ) 

Gets the type of kinetic scrolling used.

Parameters:
s,: The scrollport to use
Returns:
Returns the type of scrolling used

void ewl_scrollport_kinetic_scrolling_set ( Ewl_Scrollport s,
Ewl_Kinetic_Scroll  type 
)

Sets up default values and callbacks for kinetic scrolling.

Parameters:
s,: The scrollport to setup
type,: To use kinetic scrolling or not
Returns:
Returns no value

Ewl_Widget* ewl_scrollport_new ( void   ) 

Create a new scrollpane.

Returns:
Returns a new scrollport on success, NULL on failure

void ewl_scrollport_visible_area_geometry_get ( Ewl_Scrollport s,
int *  x,
int *  y,
int *  w,
int *  h 
)

Gets the geometry of the visible area.

Parameters:
s,: The scrollport to get the geometry from
x,: Used to return the x offset
y,: Used to return the y offset
w,: Used to return the width
h,: Used to return the height
Returns:
Returns no value

void ewl_scrollport_visible_area_geometry_set ( Ewl_Scrollport s,
int  x,
int  y,
int  w,
int  h 
)

Sets the visible current geometry.

Parameters:
s,: The scrollport to set the visible geometry of
x,: The horizontal offset of the visible content
y,: The vertical offset of the visible content
Returns:
Returns no value

Ewl_Container* ewl_scrollport_visible_area_get ( Ewl_Scrollport s  ) 

Retrieves the visible area container.

Parameters:
s,: the scrollport to retrieve its visible area container
Returns:
Returns the container holding the children added to the scrollport.
This function returns the container, that holds the children added to the scrollport. This is a plain container, so you can add the container callbacks to keep track of children size changes. You must not change the position and geometry of it.

Ewl_Scrollport_Flags ewl_scrollport_vscrollbar_flag_get ( Ewl_Scrollport s  ) 

Get flags for vertical scrollbar.

Parameters:
s,: the scrollport that contains the scrollbar to retrieve
Returns:
Returns the flags of the vertical scrollbar on success, 0 on failure.

void ewl_scrollport_vscrollbar_flag_set ( Ewl_Scrollport s,
Ewl_Scrollport_Flags  f 
)

Set flags for vertical scrollbar.

Parameters:
s,: the scrollport that contains the scrollbar to change
f,: the flags to set on the vertical scrollbar in s
Returns:
Returns no value.
The scrollbar flags for the vertical scrollbar are set to f.

Ewl_Widget* ewl_scrollport_vscrollbar_get ( Ewl_Scrollport s  ) 

Retrieves the vertical scrollbar.

Parameters:
s,: the scrollport to retrieve the vertical scrollbar from
Returns:
Returns the vertical scrollbar

double ewl_scrollport_vscrollbar_step_get ( Ewl_Scrollport s  ) 

Retrieves the value of the stepping of the vertical scrollbar in s.

Parameters:
s,: the scrollport to retrieve its vertical scrollbar stepping
Returns:
Returns the value of the stepping of the vertical scrollbar in s on success.

double ewl_scrollport_vscrollbar_value_get ( Ewl_Scrollport s  ) 

Retrieves the value of the vertical scrollbar in s.

Parameters:
s,: the scrollport to retrieve it's vertical scrollbar value
Returns:
Returns the value of the vertical scrollbar in s on success.

void ewl_scrollport_vscrollbar_value_set ( Ewl_Scrollport s,
double  val 
)

Set the value of the vertical scrollbar in s to val.

Parameters:
s,: the scrollport to set the vertical scrollbar value
val,: the value to set the scrollbar too
Returns:
Returns nothing


Variable Documentation

int Ewl_Scrollport::area_h [inherited]

int Ewl_Scrollport::area_w [inherited]

Flags for horizontal scrollbar

Horizontal scrollbar

Kinetic scrolling info

If the scrollport is to use kinetic scrolling

Flags for vertical scrollbar

Clips the enclosed widget

Vertical scrollbar


Copyright © Enlightenment.org

Enlightened Widget Library Documentation Generated: Sun Sep 27 01:49:47 2009