Class ScrollArea

Summary

#
  This class acts as a superclass for any object which wishes
  to display several items within a scrollable area.

Superclasses:
Component

Package:
(main)
File:
scrollarea.icn
Methods:
actual_line, clear_selections, compute_and_redisplay, display, draw, end_state, finally, get_checked, get_contents, get_last_line, get_left_pos, get_line, get_line_height, get_max_width, get_page_size, get_prev_down, get_selections, get_which_down, goto_pos, handle_drag, handle_event, handle_key_down, handle_key_end, handle_key_home, handle_key_left, handle_key_page_down, handle_key_page_up, handle_key_right, handle_key_up, handle_notify, handle_press, handle_release, handle_tab_texts, object_get_prev_down, object_get_selections, object_get_which_down, object_set_selections, refresh, resize, set_checked, set_contents, set_internal_fields, set_select_many, set_select_one, set_selections, text_area_to_buffer, tick

Methods inherited from Component:
accepts_tab_focus, attrib, clear_accepts_tab_focus, clear_draw_border, clear_is_shaded, clear_no_updates, do_shading, error, final_setup, firstly, generate_all_components, generate_components, get_cbwin_reference, get_cwin_reference, get_h_reference, get_parent_Dialog, get_parent_buffer_win, get_parent_win, get_visible_reference, get_w_reference, get_x_reference, get_y_reference, got_focus, in_region, is_hidden, is_shaded, is_unhidden, is_unshaded, lost_focus, parse_pos, redisplay, set_abs_coords, set_abs_size, set_accepts_tab_focus, set_align, set_attribs, set_attribs_list, set_draw_border, set_is_shaded, set_no_updates, set_parent_Dialog, set_pos, set_size, set_tooltip, toggle_draw_border, toggle_is_shaded, unique_end, unique_start

Methods inherited from MetaComponent:
set_fields

Methods inherited from Ticker:
is_ticking, retime_ticker, set_ticker, stop_ticker

Fields:
checked, contents, going_up, hsb, is_held, last_refresh_x, last_refresh_y, line_height, max_width, prev_down, rev, select_many, select_one, tab_line, th, tw, tx, ty, vsb, which_down

Source code.

Details
Constructor

ScrollArea(argv)

Methods:

actual_line(tab_line)


  method added to support tabs
  return the line after the "\t" are replaced with the correct
  amount of spaces


clear_selections()

#
  Clear the checked selections.


compute_and_redisplay()


display(buffer_flag)

This method overrides display in class Component

draw(N, left_pos, yp, i)

#
  This method is overridden by the subclass to draw the given
  line at the given position
  @param N  The object to be drawn
  @param left_pos  The left position it should be drawn at
  @param yp   The y position it should be drawn at
  @param i   The index into the data corresponding to N


end_state()


finally()

This method overrides finally in class Component

get_checked()

#
  Get the checked lines.
  @return A list corresponding to the data.  If an element is not {&null}, then
  @ the corresponding line is checked.


get_contents()

#
  Return the contents of the {ScrollArea}


get_last_line()


get_left_pos()


get_line()


get_line_height()


get_max_width()


get_page_size()


 Present page size


get_prev_down()

#
 Return the item previously under the clicked cursor
 @return The item number


get_selections()

#
  Return a list of items checked (highlighted)
  @return A list of items currently checked


get_which_down()

#
 Return item currently under the clicked cursor
 @return The item number


goto_pos(x, y)


 Goto line, pos


handle_drag(e)


handle_event(e)

This method overrides handle_event in class Component

handle_key_down(e)


handle_key_end(e)


handle_key_home(e)


handle_key_left(e)


handle_key_page_down(e)


handle_key_page_up(e)


handle_key_right(e)


handle_key_up(e)


handle_notify(e)

This method overrides handle_notify in class Component

handle_press(e)


handle_release(e)


handle_tab_texts(posx, result_line)


  helper method for actual_line


object_get_prev_down()

#
 Return object currently under the clicked cursor
 @return The object


object_get_selections()

#
  Return a list of objects checked (highlighted)
  @return A list of objects currently checked


object_get_which_down()

#
 Return object currently under the clicked cursor
 @return The object


object_set_selections(l)

#
  Set the current selections to the list l, which is a list of objects
  @param l  The list of objects.


refresh(redraw)


 Re-draw the text area.  Use double-buffering to avoid flicker.


resize()

This method overrides resize in class Component

set_checked(l)

#
  Set the checked (highlighted) lines.
  @param l   A list.  Each element in the list corresponds to an element in
  @ the data.  If the element is not {&null}, the line is checked.


set_contents(x)

#
  Set the data to be displayed.
  @param x  The list of data.


set_internal_fields()


 Called on resize, buttons resized, or contents amended


set_select_many()

#
 Configure the object so that several lines may be highlighted


set_select_one()

#
 Configure the object so that only one line may be highlighted


set_selections(l)

#
  Set the current selections to the list l, which is a list of
  item numbers.
  @param l   The list of item numbers.


text_area_to_buffer()


tick()

This method overrides tick in class Ticker
Fields:
checked

contents

going_up

hsb

is_held

last_refresh_x

last_refresh_y

line_height

max_width

prev_down

rev -- Cloned reverse field window

select_many

select_one

tab_line

th

tw

tx

ty

vsb

which_down


This page produced by UniDoc on 2021/04/15 @ 23:59:54.