Class SelectableScrollArea

Superclasses :
gui::LineBasedScrollArea
Subclasses :
gui::TableContent
gui::TextList
gui::Tree
Package :
gui

This class extends LineBasedScrollArea to provide selection on rows, event handling and selection handling.

Source

Class summary
Methods inherited from gui::LineBasedScrollArea
ensure_row_visible(row) get_curr_lines() get_first_line() get_last_line() get_left_pos() get_line_height() get_line_under_pointer() get_max_lines() get_subject_height() get_subject_horizontal_increment() get_subject_vertical_increment() goto_pos(line, horiz) init()
Variables inherited from gui::LineBasedScrollArea
line_height
Methods inherited from gui::DrawScrollArea
create_view()
Methods inherited from gui::ScrollArea
compute_and_invalidate() create_view() display(buffer_flag) get_areax() get_areay() get_subject_height() get_subject_horizontal_increment() get_subject_vertical_increment() get_subject_width() get_view_x_padding() get_view_y_padding() on_hsb() on_vsb() refresh(redraw) resize() set_internal_fields()
Variables inherited from gui::ScrollArea
hsb last_refresh_x last_refresh_y view vsb
Methods inherited from gui::Component
accepts_focus() add(c, i) all_valid() can_drop(d) child_validated(c) clear_accepts_focus() clear_allow_drag() clear_allow_drop() clear_draw_border() clear_is_shaded() compute_absolutes() create_event_and_fire(type, param) display(buffer_flag) do_handle_event(e) do_shading(W) end_drag(d, c) fatal(s) finally() find_accel(e) find_focus() fire_icon_events_on_mouse(p, e) firstly() generate_components() get_accel() get_cbwin_reference() get_children() get_cwin_reference() get_h_reference() get_parent() get_parent_buffer_win() get_parent_dialog() get_parent_dialog_reference() get_parent_win() get_w_reference() get_x_reference() get_y_reference() got_focus(e) handle_accel(e) in_region() init() invalidate() invoke_can_drag(ev) invoke_can_drop(d) invoke_drag_event(d) invoke_drag_reset() invoke_end_drag(d, c) is_attrib(s) is_dialog_open() is_hidden() is_shaded() is_ticking() is_unhidden() is_unshaded() lost_focus(e) parse_pos(total, s) remove(c) resize() retime_ticker(n) set_abs_coords(x, y) set_abs_size(w, h) set_accel(k) set_accepts_focus() set_align(x_align, y_align) set_allow_drag() set_allow_drop() set_attribs(x[]) set_attribs_list(l) set_draw_border() set_is_shaded() set_parent(c) set_parent_dialog(c) set_pos(x_spec, y_spec) set_size(w_spec, h_spec) set_ticker(n, d) set_tooltip(x) stop_ticker() toggle_draw_border() toggle_is_shaded() unique_end(x) unique_start() validate()
Variables inherited from gui::Component
accel accepts_focus_flag allow_drag_flag allow_drop_flag attribs cbwin children cwin draw_border_flag h h_spec has_focus is_shaded_flag parent parent_dialog ticker tooltip valid w w_spec x x_align x_spec y y_align y_spec
Methods inherited from lang::Object
clone(seen) equals(other, seen) get_class() get_class_name() get_id() hash_code(depth, seen) is_instance(name) to_string(depth, seen)
Methods inherited from util::SetFields
as_attrib(attr, val) attrib(a[]) cset_val(attr, val) field_error(s) int_val(attr, val) int_vals(attr, val, n) numeric_val(attr, val) numeric_vals(attr, val, n) set_fields(l) string_val(attr, val) string_vals(attr, val, n) test_flag(attr, val)
Methods inherited from util::Connectable
connect(obj, meth, type) disconnect(l) fire(type, param) fire_event(e)
Variables inherited from util::Connectable
listeners
Methods defined in this class
can_drag() clear_draggable_cursor() clear_motion_cursor() clear_selection_on_key_moves() clear_selections() constrain_cursor() contents_changed() delete_rows(l) drag_event(d) drag_reset() draw(subject_x, subject_y, vx, vy, vw, vh) draw_line(xp, yp, i, selection_cw, cursor_cw, highlight_cw) end_handle(e) get_checked() get_contents() get_cursor() get_gesture_selections() get_highlight() get_line_count() get_prev_cursor() get_selections() handle_drag(e) handle_event(e) 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_move(e) handle_press(e) handle_release(e) handle_return(e) initially() insert_rows(l, n) keeps(e) move_cursor_on_key(row) move_rows(l, n) object_get_cursor() object_get_gesture_selections() object_get_highlight() object_get_prev_cursor() object_get_selections() object_set_cursor(o) object_set_selections(l) set_checked(l) set_contents(x) set_cursor(row) set_draggable_cursor() set_motion_cursor() set_one(attr, val) set_select_many() set_select_none() set_select_one() set_selection_on_key_moves() set_selections(l) start_handle(e) tick()
Variables defined in this class
checked contents cursor draggable_cursor going_up highlight is_held motion_cursor old_cursor prev_cursor selchange select_many select_one selection_on_key_moves

Method detail

can_drag()

Overrides can_drag(ev) in gui::Component
Source

clear_draggable_cursor()

Configure the object so that drags don't move the cursor
Source

clear_motion_cursor()

Configure the object so that mouse motion doesn't move the cursor
Source

clear_selection_on_key_moves()

Configure the object so that moving the cursor via the keyboard does not alter the selection.
Source

clear_selections()

Clear the checked selections.
Source

constrain_cursor()

Private method, not intended for client invocation

contents_changed()

Call this method if the contents list, previously set with set_contents(), has changed.
Source

delete_rows(l)

Delete lines from content
Parameters :
l - the list of lines in ascending order.
Source

drag_event(d)

Overrides drag_event(d) in gui::Component
Source

drag_reset()

Overrides drag_reset() in gui::Component
Source

draw(subject_x, subject_y, vx, vy, vw, vh)

Overrides draw(subject_x, subject_y, vx, vy, vw, vh) in gui::DrawScrollArea
Source

draw_line(xp, yp, i, selection_cw, cursor_cw, highlight_cw)

This method is overridden by the subclass to draw the given line at the given position
Parameters :
xp - The left position it should be drawn at
yp - The y position it should be drawn at
i - The line number to draw
selection_cw - If non-null, this cloned window must be used to show a selected row
cursor_cw - If non-null, this cloned window must be used to show the cursor
highlight_cw - If non-null, this cloned window must be used to show the highlight
Source

end_handle(e)

Private method, not intended for client invocation

get_checked()

Get the checked lines.
Returns :
A list corresponding to the data. If an element is not &null, then the corresponding line is checked.
Source

get_contents()

Return the contents of the ScrollArea
Source

get_cursor()

Return item currently under the clicked cursor
Returns :
The item number
Source

get_gesture_selections()

Source

get_highlight()

Return item currently under the dnd highlight
Returns :
The item number
Source

get_line_count()

Overrides get_line_count() in gui::LineBasedScrollArea
Source

get_prev_cursor()

Return the item previously under the clicked cursor
Returns :
The item number
Source

get_selections()

Return a list of items checked (highlighted)
Returns :
A list of items currently checked
Source

handle_drag(e)

Source

handle_event(e)

Overrides handle_event(e) in gui::Component
Source

handle_key_down(e)

Source

handle_key_end(e)

Source

handle_key_home(e)

Source

handle_key_left(e)

Source

handle_key_page_down(e)

Source

handle_key_page_up(e)

Source

handle_key_right(e)

Source

handle_key_up(e)

Source

handle_move(e)

Source

handle_press(e)

Source

handle_release(e)

Source

handle_return(e)

Source

initially()

Overrides initially() in util::Connectable

insert_rows(l, n)

Insert rows into content at pos n
Parameters :
l - the rows
n - the position
Source

keeps(e)

Overrides keeps(e) in gui::Component
Source

move_cursor_on_key(row)

Private method, not intended for client invocation

move_rows(l, n)

Move the given list of rows to the given position.
Parameters :
l - the rows
n - the position
Source

object_get_cursor()

Return object currently under the clicked cursor
Returns :
The object
Source

object_get_gesture_selections()

Source

object_get_highlight()

Return object currently under the dnd highlight
Returns :
The object
Source

object_get_prev_cursor()

Return object currently under the clicked cursor
Returns :
The object
Source

object_get_selections()

Return a list of objects checked (highlighted)
Returns :
A list of objects currently checked
Source

object_set_cursor(o)

Set the cursor to the given object. Has no effect if o is not in the contents list.
Source

object_set_selections(l)

Set the current selections to the list l, which is a list of objects
Parameters :
l - The list of objects.
Source

set_checked(l)

Set the checked (highlighted) lines.
Parameters :
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.
Source

set_contents(x)

Set the data to be displayed.
Parameters :
x - The list of data.
Source

set_cursor(row)

Set the cursor to the given object
Source

set_draggable_cursor()

Configure the object so that drags move the cursor (precludes using d&d with the component).
Source

set_motion_cursor()

Configure the object so that mouse motion moves the cursor.
Source

set_one(attr, val)

Overrides set_one(attr, val) in util::SetFields
Source

set_select_many()

Configure the object so that several lines may be highlighted
Source

set_select_none()

Configure the object so that no lines may be highlighted (this is the default).
Source

set_select_one()

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

set_selection_on_key_moves()

Configure the object so that moving the cursor via the keyboard does alter the selection (the default behaviour).
Source

set_selections(l)

Set the current selections to the list l, which is a list of item numbers.
Parameters :
l - The list of item numbers.
Source

start_handle(e)

Private method, not intended for client invocation

tick()

Overrides tick() in gui::Component
Source

Variable detail

checked


contents


cursor


draggable_cursor


going_up


highlight


is_held


motion_cursor


old_cursor


prev_cursor


selchange


select_many


select_one


selection_on_key_moves