PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFZTableView
Responder which provides a view of tabular form with a table model.
#include <SFZTableView.h.hpp>
class SFZTableView : public SFYWidget;
SFMTYPEDEFRESPONDER(SFZTableView)
        

Inheritance diagram

 Inheritance diagram of SFZTableViewClass

Collaboration diagram

 Collaboration diagram of SFZTableViewClass

Description

Specification of the SFZTableView class

Figure 383. Specification of the SFZTableView class

Specification of the SFZTableView class

The SFZTableView class is a responder which provides a view of a tabular form with a table model (SFOTableModel).

A table view holds some table view columns (SFOTableViewColumn) which correspond to columns to display.

Each table view column displays a title header of the column and holds a table cell reactor (SFOTableCellReactor) which displays and edits table cells.

A table view column can be connected to the cell data by specifying the column index of a table model (SFOTableModel) to it.

Table model

A table model (SFOTableModel) is a tabular form data to display in a table view.

A table model consists of a variable-length array (SFXArray) of items [rows] (SFXTableItemBase).

An item [row] consists of a fixed-length (the size is a template parameter NUM) array of cell objects (SFXAny).

* As a result, the number of columns is fixed and the number of rows is variable in a table model.

How to connect

[Note] Model and view

To connect a model to a table view, call the SFZTableView::SetModel function.

[Note] View and columns

To connect a table view column to the table view, call the SFZTableView::AddColumn function.

[Note] Model column and view column

To connect a model column to a table view column, call the SFOTableViewColumn::NewInstance function or the SFOTableViewColumn::SetModelColumnIndex function.

Connecting the same column of the table model to a number of table view columns makes the table view diplay a number of columns of the same data.

[Note] View column and cell reactor

To connect a table cell reactor to a table view column, call the SFOTableViewColumn::NewInstance function or the SFOTableViewColumn::SetCellReactor function.

The SFOTableCellTextReactor, SFOTableCellToggleReactor and SFOTableCellImageReactor classes are provided as the default concrete table cell reactors. These reactors can display texts, checkboxes, and images in cells per column. Text and checkbox cells can be editable.

Hierarchical properties of the SFZTableView, SFOTableViewColumn, and SFOTableCellReactor classes

These classes hold a hierarchical property (SFXHierarchyProperty).

And these have a parent-child (inheritance) relationship as follows.

SFZTableView property => SFOTableViewColumn property => SFOTableCellReactor property

A property which does not exist in child is inherited from parent. A property which exists in parent can be overridden in child.

[Note] Note

A property which is inherited by other properties is called as a parent property. A property which inherites another property is called as a child property.

And, a property which has no parent property is called as a root property.

Kinds of property

A hierarchical property (SFXHierarchyProperty) consists of a map of a key and a value, and the keys represent the various kinds, for example, a foreground color or a text font (see: Properties of the SFZTableView, SFOTableViewColumn, and SFOTableCellReactor classes).

The SFZTableView, SFOTableViewColumn, SFOTableCellReactor, SFOTableCellTextReactor, SFOTableCellToggleReactor and SFOTableCellImageReactor classes holds the following properties.

[Note] Note

Properties which are described in default value are defined in the table view (SFZTableView) except the SFLPROP_LEFTTOP_MARGIN_SIZE and SFLPROP_RIGHTBOTTOM_MARGIN_SIZE property.

Table 240. Properties of the SFZTableView, SFOTableViewColumn, and SFOTableCellReactor classes

Property key Property value (default value) Description
SFLPROP_FONT - Font: If not set, AEE_FONT_NORMAL
SFLPROP_ALIGNMENT - Alignment: If not set, (IDF_ALIGN_CENTER | IDF_ALIGN_MIDDLE)
SFLPROP_EDITABLE - Editable or non-editable: If not set, false (non-editable)
SFLPROP_HORIZONTAL_RULED_LINE_ENABLE true Whether to display horizontal ruled line: In default, true (the line is displayed)
SFLPROP_VERTICAL_RULED_LINE_ENABLE true Whether to display vertical ruled line: In default, true(the line is displayed)
SFLPROP_FIXED_WIDTH - Fixed width
SFLPROP_FIXED_HEIGHT - Fixed height: currently, this property is not used
SFLPROP_LEFTTOP_MARGIN_SIZE SFOTableCellToggleReactor is (1, 1), SFOTableCellTextReactor is (2, 1) Left top margin size: If not set, (0, 0)
SFLPROP_RIGHTBOTTOM_MARGIN_SIZE SFOTableCellToggleReactor is (1, 1), SFOTableCellTextReactor is (2, 1) Right bottom margin size: If not set, (0, 0)
SFLPROP_COLOR_GRADIENT_STYLE 0 Gradient style: (0: none, 1: vertical two-way gradient)
SFLPROP_HEADER_BEVEL_LIGHT_COLOR SFXRGBColor(0xFF, 0xFF, 0xFF, 0x00) header bevel light color
SFLPROP_HEADER_BEVEL_BASE_COLOR SFXRGBColor(0xDD, 0xDD, 0xDD, 0x00) Header bevel base color
SFLPROP_HEADER_BEVEL_DARK_COLOR SFXRGBColor(0x88, 0x88, 0x88, 0x00) Header bevel dark color
SFLPROP_HEADER_SEPARATOR_COLOR SFXRGBColor(0x6E, 0x6E, 0x6E, 0x00) Header separator line color
SFLPROP_OUTER_BEVEL_LIGHT_COLOR SFXRGBColor(0xAA, 0xAA, 0xAA, 0x00) Outer frame bevel light color
SFLPROP_OUTER_BEVEL_BASE_COLOR SFXRGBColor(0xFF, 0xFF, 0xFF, 0x00) Outer frame bevel base color
SFLPROP_OUTER_BEVEL_DARK_COLOR SFXRGBColor(0xEE, 0xEE, 0xEE, 0x00) Outer frame bevel dark color
SFLPROP_INNER_BEVEL_LIGHT_COLOR SFXRGBColor(0x6E, 0x6E, 0x6E, 0x00) Inner frame bevel light color
SFLPROP_INNER_BEVEL_BASE_COLOR SFXRGBColor(0xFF, 0xFF, 0xFF, 0x00) Inner frame bevel base color
SFLPROP_INNER_BEVEL_DARK_COLOR SFXRGBColor(0xAA, 0xAA, 0xAA, 0x00) Inner frame bevel dark color
SFLPROP_BACKGROUND_COLOR - Background color: currently, this property is not used
SFLPROP_BACKGROUND_GRADIENT_COLOR - Background gradient color: currently, this property is not used
SFLPROP_FOREGROUND_COLOR - Foreground color: If not set, SFXRGBColor(0x00, 0x00, 0x00, 0x00) [black]
SFLPROP_FOREGROUND_GRADIENT_COLOR - Foreground gradient color: currently, this property is not used
SFLPROP_SELECTED_BACKGROUND_COLOR SFXRGBColor(0x71, 0x9C, 0xE2, 0x00) Selected background color (including focused)
SFLPROP_SELECTED_BACKGROUND_GRADIENT_COLOR SFXRGBColor(0x71, 0x9C, 0xE2, 0x00) Selected background gradient color (including focused)
SFLPROP_SELECTED_FOREGROUND_COLOR - Selected foreground color (including focused): If not set, (0xFF, 0xFF, 0xFF, 0x00) [white]
SFLPROP_SELECTED_FOREGROUND_GRADIENT_COLOR - Selected foreground gradient color (including focused): currently, this property is not used
SFLPROP_RULED_LINE_COLOR SFXRGBColor(0xF0, 0xF0, 0xF0, 0x00) Ruled line color
SFLPROP_TEXT_SCROLL_DIRECTION - Text scroll direction: If not set, SFYSingleTextWidget::DEFAULT_DIRECTION
SFLPROP_TEXT_SCROLL_INTERVAL - Text scroll interval [unit: millisecond]: If not set, SFYSingleTextWidget::DEFAULT_SCROLL
SFLPROP_TEXT_SCROLL_WAITINTERVAL - Text scroll wait interval [unit: millisecond]: If not set, SFYSingleTextWidget::DEFAULT_WAIT
SFLPROP_TEXT_SCROLL_STEP - Text scroll step [unit: pixel]: If not set, SFYSingleTextWidget::DEFAULT_STEP
[Note] Note

Interpretation of the property and the default value are free to be changed or set in user defined classes.

User defined property key can be set from SFLPROP_USER_CLASS_BEGIN (0x8000) to SFLPROP_USER_CLASS_END (0xFFFE).

* Sample code

For actual code, see here (mvcfactory-en.zip).

Void UserAppClass::Main(Void)
{
    static ACharConst                           marks[][16] = {
        "sun",
        "cloud",
        "snowman",
        "star",
        "white star",
        "telephone",
        "spade",
        "heart",
        "diamond",
        "club",
        "quaver",
        "semiquaver"
    };
    SFZScrollBarControlSmp                      bar;
    SFZTableViewSmp                             view;
    SFOTableModelSmp                            model;
    SFOTableViewColumnSmp                       vcol;
    SFOTableCellReactorSmp                      rtor;
    SFXTableItem<3>                             item;
    SFBImageSmp                                 icon[12];

    // *** Create a table view ***

    view = SFZTableView::NewInstance();

    view->SetParent(GetThis());
    view->SetRealBound(GetLocalBound().Deflate(5, 5, 10, 5));
    view->SetState(true, true, true, true);

    // Set the row height to 24 pixel
    view->SetItemHeight(24);

    // Set the horizontal cursor loop
    view->SetXLoop(true);

    // Set the vertical cursor loop
    view->SetYLoop(true);

    // Create a scroll bar
    bar = SFZScrollBarControl::NewInstance();

    bar->SetParent(GetThis());
    SFXRectangle bound(view->GetRealBound());
    bar->SetRealBound(bound.AddX(bound.GetWidth()).SetWidth(5));
    bar->SetState(true, true, false, false);

    // Set the scroll bar to the view
    view->SetScrollBarControl(bar);

    // *** Create a table model ***

    // Create an instance of a table model
    model = SFOTableModel::NewInstance();

    // Get icon images from a resource file
    for (SInt16 i = 0; i < 12; i++) {
        icon[i] = SFBShell::GetInstance()->LoadResImage("userapp.bar", IDI_OBJECT_5001 + i);
    }

    // Set each items, and append it to the model
    for (SInt32 row = 0; row < 60; ++row) {
        item.data[0] = SFXAnsiString(marks[row % 12]);
        item.data[1] = icon[row % 12];
        item.data[2] = static_cast<Bool>(row % 2);
        model->InsertLast(item);
    }

    // *** Connect the model to the view ***

    view->SetModel(model);

    // *** Create the first table view column ***

    // Create a table cell toggle reactor
    rtor = SFOTableCellToggleReactor::NewInstance();

    // Set editable
    rtor->SetProperty(SFLPROP_EDITABLE, true);

    // Connect it to the third table model column (Bool type): the header title is "" (empty string)
    vcol = SFOTableViewColumn::NewInstance("", 2, rtor);

    // Fix the column width to 24 pixel
    vcol->SetProperty(SFLPROP_FIXED_WIDTH, 24);

    // Append the column to the view
    view->AddColumn(vcol);

    // *** Create the second table view column ***

    // Create a table cell image reactor
    rtor = SFOTableCellImageReactor::NewInstance();

    // Connect it to the second table model column (SFBImageSmp type): the header title is "" (empty string)
    vcol = SFOTableViewColumn::NewInstance("", 1, rtor);

    // Fix the column width to 24 pixel
    vcol->SetProperty(SFLPROP_FIXED_WIDTH, 24);

    // Append the column to the view
    view->AddColumn(vcol);

    // *** Create the third table view column ***

    // Create a table cell text reactor
    rtor = SFOTableCellTextReactor::NewInstance();

    // Set editable
    rtor->SetProperty(SFLPROP_EDITABLE, true);

    // Connect it to the first table model column (SFXAnsiString type): the header title is "marks"
    vcol = SFOTableViewColumn::NewInstance("marks", 0, rtor);

    // Set the column to left align
    vcol->SetProperty(SFLPROP_ALIGNMENT, IDF_ALIGN_LEFT | IDF_ALIGN_MIDDLE);

    // Append the column to the view
    view->AddColumn(vcol);

    return;
}

Figure 384. Execution example of the SFZTableView class

Execution example of the SFZTableView class

Reference

SFOTableModel | SFXTableItem | SFOTableViewColumn | SFOTableCellReactor | SFOTableCellToggleReactor | SFOTableCellImageReactor | SFOTableCellTextReactor | SFXHierarchyProperty

Member

Constructor/Destructor
SFZTableView( Void )
Constructor of the SFZTableView class.
~SFZTableView( Void )
Destructor of the SFZTableView class.
Public Functions
SFCError AddColumn( SFOTableViewColumnSmpConstRef viewcolumn )
Add a column in the tail (right end) of the table view.
Void ClearColumn( Void )
Clear the all table view columns.
AVKType GetDownKey( Void )
Get the DOWN key.
SInt32 GetFocusedCellColumnIndex( Void )
Get the column index of the focused cell.
SInt32 GetFocusedCellRowIndex( Void )
Get the row index of the focused cell.
Bool GetFrameVisible( Void )
Get the frame visibility.
Bool GetFullRowSelect( Void )
Get the cell/row select mode.
SInt16 GetHeaderHeight( Void )
Get the header height. [unit: pixel]
Bool GetHeaderVisible( Void )
Get the header visibility.
SInt16 GetItemHeight( Void )
Get the item [row] height. [unit: pixel]
AVKType GetLeftKey( Void )
Get the LEFT key.
AVKType GetOperateKey( Void )
Get the operate key.
SInt32 GetPreferredColumn( Void )
Get the preferred column index.
ValueRec GetProperty( UInt32 key , BoolPtr found = null )
Get the property value corresponding to the specified key.
AVKType GetRightKey( Void )
Get the RIGHT key.
SFYScrollBarControlSmpConstRef GetScrollBarControl( Void )
Get the scroll bar control which is connected to the table view.
AVKType GetUpKey( Void )
Get the UP key.
Bool GetXLoop( Void )
Get the X cursor loop flag.
Bool GetYLoop( Void )
Get the Y cursor loop flag.
Bool HasProperty( UInt32 key )
Check if the specified property key is contained.
static
SFZTableViewSmp
NewInstance( SFCErrorPtr exception = null )
Create a new instance of this class.
SFCError Select( Void )
Select the focused cell.
Void SetDownKey( AVKType param )
Set the DOWN key of the table view.
SFCError SetFocusedCellIndex( SInt32 column , SInt32 row )
Set the focus to the cell which is specified by the row index and the column index.
Void SetFrameVisible( Bool param )
Set frame visibility.
Void SetFullRowSelect( Bool param )
Set the cell/row select mode.
Void SetHeaderHeight( SInt16 param )
Set the header height. [unit: pixel]
Void SetHeaderVisible( Bool param )
Set the header visibility.
Void SetItemHeight( SInt16 param )
Set the item [row] height. [unit: pixel]
Void SetLeftKey( AVKType param )
Set the LEFT key of the table view.
Void SetModel( SFOTableModelBaseSmpConstRef param )
Set the table model.
Void SetOperateKey( AVKType param )
Set the operate key.
Void SetPreferredColumn( SInt32 param )
Set the preferred column index .
SFCError SetProperty( UInt32 key , ValueRec value )
Set the property value corresponding to the specified key.
Void SetRightKey( AVKType param )
Set the LEFT key of the table view.
Void SetScrollBarControl( SFYScrollBarControlSmpConstRef bar )
Set the scroll bar control which is connected to the table view.
Void SetUpKey( AVKType param )
Set the UP key of the table view.
Void SetXLoop( Bool param )
Set the X cursor loop flag.
Void SetYLoop( Bool param )
Set the Y cursor loop flag.
Void ClearHandler( Void ) (inherits from SFYResponder)
Unregister all handlers from this responder.
Void ClearTracer( Void ) (inherits from SFYResponder)
Unregister all dispatching rules from the tracer of this responder.
SFCError Distribute( SFXEventConstRef event , BoolPtr result = null ) (inherits from SFYResponder)
Distribute the specified event.
SFXRGBColorConstRef GetBackgroundColor( Void ) (inherits from SFYWidget)
Get the background color.
SFYResponderSmp GetChildBack( Void ) (inherits from SFYResponder)
Get the backmost child responder of this responder, which matches the specified search condition.
SFYResponderSmp GetChildBack( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the backmost child responder of this responder, which matches the specified search condition.
SFYResponderSmp GetChildBack( UInt32 id ) (inherits from SFYResponder)
Get the backmost child responder of this responder, which matches the specified search condition.
SFYResponderSmp GetChildBack( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the backmost child responder of this responder, which matches the specified search condition.
SFYResponderSmp GetChildBackward( SInt32 index ) (inherits from SFYResponder)
Get the child responder of this responder at the specified position from the back side, which matches the specified search condition.
SFYResponderSmp GetChildBackward( SInt32 index , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the child responder of this responder at the specified position from the back side, which matches the specified search condition.
SFYResponderSmp GetChildBackward( SInt32 index , UInt32 id ) (inherits from SFYResponder)
Get the child responder of this responder at the specified position from the back side, which matches the specified search condition.
SFYResponderSmp GetChildBackward( SInt32 index , UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the child responder of this responder at the specified position from the back side, which matches the specified search condition.
SInt32 GetChildCount( Void ) (inherits from SFYResponder)
Get the number of child responders of this responder, which match the specified search condition.
SInt32 GetChildCount( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the number of child responders of this responder, which match the specified search condition.
SInt32 GetChildCount( UInt32 id ) (inherits from SFYResponder)
Get the number of child responders of this responder, which match the specified search condition.
SInt32 GetChildCount( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the number of child responders of this responder, which match the specified search condition.
SFYResponderSmp GetChildForward( SInt32 index ) (inherits from SFYResponder)
Get the child responder of this responder at the specified position from the front side, which matches the specified search condition.
SFYResponderSmp GetChildForward( SInt32 index , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the child responder of this responder at the specified position from the front side, which matches the specified search condition.
SFYResponderSmp GetChildForward( SInt32 index , UInt32 id ) (inherits from SFYResponder)
Get the child responder of this responder at the specified position from the front side, which matches the specified search condition.
SFYResponderSmp GetChildForward( SInt32 index , UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the child responder of this responder at the specified position from the front side, which matches the specified search condition.
SFYResponderSmp GetChildFront( Void ) (inherits from SFYResponder)
Get the foremost child responder of this responder, which matches the specified search condition.
SFYResponderSmp GetChildFront( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the foremost child responder of this responder, which matches the specified search condition.
SFYResponderSmp GetChildFront( UInt32 id ) (inherits from SFYResponder)
Get the foremost child responder of this responder, which matches the specified search condition.
SFYResponderSmp GetChildFront( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the foremost child responder of this responder, which matches the specified search condition.
SFYDistributerPtr GetDistributer( Void ) (inherits from SFYResponder)
Get the distributer bound with this responder.
SFYResponderSmp GetFrame( Void ) (inherits from SFYResponder)
Get the frame which has been attached to this responder.
SFXRectangle GetGlobalBound( Void ) (inherits from SFYResponder)
Get the globle region of this responder.
UInt32 GetID( Void ) (inherits from SFYResponder)
Get the ID of this responder instance.
SFXRectangle GetLocalBound( Void ) (inherits from SFYResponder)
Get the local region of this responder.
SInt32 GetNthBackward( Void ) (inherits from SFYResponder)
Get the position counted from the back side of this responder among a group of sibling responders, which match the specified search condition.
SInt32 GetNthBackward( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the position counted from the back side of this responder among a group of sibling responders, which match the specified search condition.
SInt32 GetNthBackward( UInt32 id ) (inherits from SFYResponder)
Get the position counted from the back side of this responder among a group of sibling responders, which match the specified search condition.
SInt32 GetNthBackward( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the position counted from the back side of this responder among a group of sibling responders, which match the specified search condition.
SInt32 GetNthForward( Void ) (inherits from SFYResponder)
Get the position counted from the front side of this responder among a group of sibling responders, which match the specified search condition.
SInt32 GetNthForward( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the position counted from the front side of this responder among a group of sibling responders, which match the specified search condition.
SInt32 GetNthForward( UInt32 id ) (inherits from SFYResponder)
Get the position counted from the front side of this responder among a group of sibling responders, which match the specified search condition.
SInt32 GetNthForward( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the position counted from the front side of this responder among a group of sibling responders, which match the specified search condition.
SFYResponderSmp GetParent( Void ) (inherits from SFYResponder)
Get the parent responder of this responder.
Bool GetPropertyTransparent( Void ) (inherits from SFYResponder)
Get the transparency attribute of this responder.
SFXRectangleConstRef GetRealBound( Void ) (inherits from SFYResponder)
Get the real region of this responder.
VoidPtr GetReference( Void ) (inherits from SFYResponder)
Get the reference of this responder.
SFYRendererPtr GetRenderer( Void ) (inherits from SFYResponder)
Get the renderer bound with this responder.
SFYResponderSmp GetRoot( Void ) (inherits from SFYResponder)
Get the root responder.
Bool GetStateActive( Bool inherit = false ) (inherits from SFYResponder)
Get the active state of this responder.
Bool GetStateEnable( Bool inherit = false ) (inherits from SFYResponder)
Get the enable state of this responder.
Bool GetStateFocus( Bool inherit = false ) (inherits from SFYResponder)
Get the focus state of this responder.
Bool GetStateValid( Bool inherit = false ) (inherits from SFYResponder)
Get the valid state of this responder.
Bool GetStateVisible( Bool inherit = false ) (inherits from SFYResponder)
Get the visible state of this responder.
SFXRectangle GetSuitableBound( Void ) (inherits from SFYResponder)
Get the suitable region of this responder.
SFXRectangle GetSuitableBound( SFXRectangleConstRef rectangle ) (inherits from SFYResponder)
Get the suitable region of this responder.
SFXRectangle GetSuitableBound( SFXRectangleConstRef param , HorizontalEnum horizontal , VerticalEnum vertical ) (inherits from SFYResponder)
Get the suitable region of this responder.
SFXMargin GetSuitableMargin( Void ) (inherits from SFYResponder)
Get the suitable frame margin region of this responder.
SFCType GetType( Void ) (inherits from SFYResponder)
Get the type of this responder class.
SFXRectangleConstRef GetVirtualBound( Void ) (inherits from SFYResponder)
Get the virtual region of this responder.
Bool HasFrame( Void ) (inherits from SFYResponder)
Check whether or not this responder is a content-responder.
Void Initialize( Void ) (inherits from SFYResponder)
Initialize this responder.
Bool IsBack( Void ) (inherits from SFYResponder)
Check whether or not this responder is the backmost responder among a group of the sibling responders which match the specified search condition.
Bool IsBack( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Check whether or not this responder is the backmost responder among a group of the sibling responders which match the specified search condition.
Bool IsBack( UInt32 id ) (inherits from SFYResponder)
Check whether or not this responder is the backmost responder among a group of the sibling responders which match the specified search condition.
Bool IsBack( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Check whether or not this responder is the backmost responder among a group of the sibling responders which match the specified search condition.
Bool IsFrame( Void ) (inherits from SFYResponder)
Check whether or not this responder is an attachment-frame.
Bool IsFront( Void ) (inherits from SFYResponder)
Check whether or not this responder is the foremost responder among a group of the sibling responders which match the specified search condition.
Bool IsFront( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Check whether or not this responder is the foremost responder among a group of the sibling responders which match the specified search condition.
Bool IsFront( UInt32 id ) (inherits from SFYResponder)
Check whether or not this responder is the foremost responder among a group of the sibling responders which match the specified search condition.
Bool IsFront( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Check whether or not this responder is the foremost responder among a group of the sibling responders which match the specified search condition.
Bool IsNthBackward( SInt32 index ) (inherits from SFYResponder)
Check whether or not this responder is at the specified position from the back side among a group of the sibling responders which match the specified search condition.
Bool IsNthBackward( SInt32 index , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Check whether or not this responder is at the specified position from the back side among a group of the sibling responders which match the specified search condition.
Bool IsNthBackward( SInt32 index , UInt32 id ) (inherits from SFYResponder)
Check whether or not this responder is at the specified position from the back side among a group of the sibling responders which match the specified search condition.
Bool IsNthBackward( SInt32 index , UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Check whether or not this responder is at the specified position from the back side among a group of the sibling responders which match the specified search condition.
Bool IsNthForward( SInt32 index ) (inherits from SFYResponder)
Check whether or not this responder is at the specified position from the front side among a group of the sibling responders which match the specified search condition.
Bool IsNthForward( SInt32 index , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Check whether or not this responder is at the specified position from the front side among a group of the sibling responders which match the specified search condition.
Bool IsNthForward( SInt32 index , UInt32 id ) (inherits from SFYResponder)
Check whether or not this responder is at the specified position from the front side among a group of the sibling responders which match the specified search condition.
Bool IsNthForward( SInt32 index , UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Check whether or not this responder is at the specified position from the front side among a group of the sibling responders which match the specified search condition.
Bool IsRoot( Void ) (inherits from SFYResponder)
Check whether or not this responder is the root responder.
SFCError Recover( Void ) (inherits from SFYResponder)
Recover the intersection region between this responder and the responder space by using the saved bitmap to restore the device bitmap.
SFCError RegisterHandler( SFXEventRangeConstRef range , SFYHandler::RuleRecConstRef rule ) (inherits from SFYResponder)
Register specified handlers into this responder.
SFCError RegisterHandler( SFXEventRangeConstRef range , SFYHandler::HandlerSPP spp , VoidPtr reference ) (inherits from SFYResponder)
Register specified handlers into this responder.
SFCError RegisterHandler( SFXEventRangeConstPtr range , SFYHandler::RuleRecConstPtr rule , SInt32 length ) (inherits from SFYResponder)
Register specified handlers into this responder.
SFCError RegisterHandler( SFXEventRangeConstPtr range , SFYHandler::HandlerSPPConstPtr spp , VoidPtrConstPtr reference , SInt32 length ) (inherits from SFYResponder)
Register specified handlers into this responder.
SFCError RegisterTracer( SFXEventRangeConstRef range , SFYTracer::RuleRecConstRef rule ) (inherits from SFYResponder)
Register specified dispatching rules into the tracer of this responder.
SFCError RegisterTracer( SFXEventRangeConstRef range , SFYTracer::OrderEnum order , SFYTracer::StateEnum state , Bool overload ) (inherits from SFYResponder)
Register specified dispatching rules into the tracer of this responder.
SFCError RegisterTracer( SFXEventRangeConstPtr range , SFYTracer::RuleRecConstPtr rule , SInt32 length ) (inherits from SFYResponder)
Register specified dispatching rules into the tracer of this responder.
SFCError RegisterTracer( SFXEventRangeConstPtr range , SFYTracer::OrderEnumConstPtr order , SFYTracer::StateEnumConstPtr state , BoolConstPtr overload , SInt32 length ) (inherits from SFYResponder)
Register specified dispatching rules into the tracer of this responder.
SFCError Render( Bool force = false ) (inherits from SFYResponder)
Boot up the renderer for redrawing this responder and its descendant responders.
Void SetBackgroundColor( SFXRGBColorConstRef param ) (inherits from SFYWidget)
Set the background color to the specified value.
Void SetDistributer( SFYDistributerPtr param ) (inherits from SFYResponder)
Bind this responder with the specified distributer.
SFCError SetFrame( SFYResponderSmpConstRef param ) (inherits from SFYResponder)
Attach the specified frame to this frame.
Void SetID( UInt32 param ) (inherits from SFYResponder)
Set the ID value of this responder to the specified value.
SFCError SetParent( SFYResponderSmpConstRef param ) (inherits from SFYResponder)
Set the parent responder of this responder to the specified responder.
Void SetPropertyTransparent( Bool param ) (inherits from SFYResponder)
Set the transparency attribute of this responder to the specified value.
Void SetRealBound( SFXRectangleConstRef param ) (inherits from SFYResponder)
Set the real region of this responder to the specified region.
Void SetReference( VoidPtr param ) (inherits from SFYResponder)
Set the reference value of this responder to the specified value.
Void SetRenderer( SFYRendererPtr param ) (inherits from SFYResponder)
Bind this responder with the specified renderer.
Void SetState( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Set all states of this responder to specified values together.
Void SetStateActive( Bool param ) (inherits from SFYResponder)
Set the active state of this responder to the specified value.
Void SetStateEnable( Bool param ) (inherits from SFYResponder)
Set the enable state of this responder to the specified value.
Void SetStateFocus( Bool param ) (inherits from SFYResponder)
Set the focus state of this responder to the specified value.
Void SetStateVisible( Bool param ) (inherits from SFYResponder)
Set the visible state of this responder to the specified value.
Void SetVirtualBound( SFXRectangleConstRef param ) (inherits from SFYResponder)
Set the virtual region of this responder to the specified value.
SFCError Snapshot( SFBBitmapSmpConstRef bitmap ) (inherits from SFYResponder)
Get a snapshot image of the intersection region between this responder and the responder space by using the saved bitmap.
Void Terminate( Void ) (inherits from SFYResponder)
Terminate this responder.
Void ToBack( Void ) (inherits from SFYResponder)
Move this responder to the backmost position among a group of the sibling responders which match the specified search condition.
Void ToBack( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Move this responder to the backmost position among a group of the sibling responders which match the specified search condition.
Void ToBack( UInt32 id ) (inherits from SFYResponder)
Move this responder to the backmost position among a group of the sibling responders which match the specified search condition.
Void ToBack( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Move this responder to the backmost position among a group of the sibling responders which match the specified search condition.
Void ToFront( Void ) (inherits from SFYResponder)
Move this responder to the foremost position among a group of the sibling responders which match the specified search condition.
Void ToFront( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Move this responder to the foremost position among a group of the sibling responders which match the specified search condition.
Void ToFront( UInt32 id ) (inherits from SFYResponder)
Move this responder to the foremost position among a group of the sibling responders which match the specified search condition.
Void ToFront( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Move this responder to the foremost position among a group of the sibling responders which match the specified search condition.
Void ToNthBackward( SInt32 index ) (inherits from SFYResponder)
Move this responder to the specified position from the back side among a group of the sibling responders which match the specified search condition.
Void ToNthBackward( SInt32 index , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Move this responder to the specified position from the back side among a group of the sibling responders which match the specified search condition.
Void ToNthBackward( SInt32 index , UInt32 id ) (inherits from SFYResponder)
Move this responder to the specified position from the back side among a group of the sibling responders which match the specified search condition.
Void ToNthBackward( SInt32 index , UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Move this responder to the specified position from the back side among a group of the sibling responders which match the specified search condition.
Void ToNthForward( SInt32 index ) (inherits from SFYResponder)
Move this responder to the specified position from the front side among a group of the sibling responders which match the specified search condition.
Void ToNthForward( SInt32 index , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Move this responder to the specified position from the front side among a group of the sibling responders which match the specified search condition.
Void ToNthForward( SInt32 index , UInt32 id ) (inherits from SFYResponder)
Move this responder to the specified position from the front side among a group of the sibling responders which match the specified search condition.
Void ToNthForward( SInt32 index , UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Move this responder to the specified position from the front side among a group of the sibling responders which match the specified search condition.
Void UnregisterHandler( SFXEventRangeConstRef range , SFYHandler::RuleRecConstRef rule ) (inherits from SFYResponder)
Unregister the handler from this responder which matches the specified condition.
Void UnregisterHandler( SFXEventRangeConstRef range , SFYHandler::HandlerSPP spp , VoidPtr reference ) (inherits from SFYResponder)
Unregister the handler from this responder which matches the specified condition.
Void UnregisterHandler( SFXEventRangeConstPtr range , SFYHandler::RuleRecConstPtr rule , SInt32 length ) (inherits from SFYResponder)
Unregister the handler from this responder which matches the specified condition.
Void UnregisterHandler( SFXEventRangeConstPtr range , SFYHandler::HandlerSPPConstPtr spp , VoidPtrConstPtr reference , SInt32 length ) (inherits from SFYResponder)
Unregister the handler from this responder which matches the specified condition.
Void UnregisterTracer( SFXEventRangeConstRef range ) (inherits from SFYResponder)
Unregister the dispatching rule from the tracer of this responder which matches the specified condition.
Void UnregisterTracer( SFXEventRangeConstPtr range , SInt32 length ) (inherits from SFYResponder)
Unregister the dispatching rule from the tracer of this responder which matches the specified condition.
T const & static_catch( Void ) (inherits from static_exception)
Get the current exception.
Protected Functions
SFXMarginConstRef GetFrameMargin( Void )
Get the frame margin.
Void HandleBoundVirtual( Void )
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event is received. [Perform the processing when the virtual region is changed.]
Bool HandleDownKey( Void )
This function will be called when the SFEVT_KEY event of the DOWN key is received.
Bool HandleLeftKey( Void )
This function will be called when the SFEVT_KEY event of the LEFT key is received.
Bool HandleOperateKey( Void )
This function will be called when the SFEVT_KEY event of the operate key is received.
Bool HandleRightKey( Void )
This function will be called when the SFEVT_KEY event of the RIGHT key is received.
Bool HandleUpKey( Void )
This function will be called when the SFEVT_KEY event of the UP key is received.
static
SFYResponderSmp
Factory( SFYResponderPtr responder , SFCErrorPtr exception = null ) (inherits from SFYResponder)
This function is used to implement the NewInstance function.
SFYResponderSmp GetThis( Void ) (inherits from SFYResponder)
Get the smart pointer of this responder.
Void HandleBoundGlobal( SFXRectangleConstRef rectangle ) (inherits from SFYWidget)
This function will be called when the global region is changed.
Void HandleBoundOptimize( SFXRectanglePtr rectangle ) (inherits from SFYWidget)
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_OPTIMIZE) event is received. [Calculate the suitable rectangle size of this responder within the specified hint rectangle.]
Void HandleBoundReal( Void ) (inherits from SFYWidget)
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_REAL) event is received. [Perform the processing when the real region is changed.]
Void HandleBoundRequest( SFXRectanglePtr rectangle ) (inherits from SFYWidget)
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_REQUEST) event is received. [Calculate the suitable rectangle size of this responder.]
Void HandleRenderRequest( SFXGraphicsPtr graphics ) (inherits from SFYWidget)
This function will be called when the (SFEVT_RESPONDER_RENDER, SFP16_RENDER_REQUEST) event is received. [Draw this responder.]
Void Invalidate( Void ) (inherits from SFYResponder)
Register the specified redraw region of this responder.
Void Invalidate( SFXRectangleConstRef param ) (inherits from SFYResponder)
Register the specified redraw region of this responder.
Void InvokeBackward( SFXEventConstRef event , Bool overload , BoolPtr result = null ) (inherits from SFYResponder)
Call the handlers for the specified event from the end of the handler list registered into this responder.
Void InvokeForward( SFXEventConstRef event , Bool overload , BoolPtr result = null ) (inherits from SFYResponder)
Call the handlers for the specified event from the head of the handler list registered into this responder.
Void SetType( SFCType param ) (inherits from SFYResponder)
Set the Type value of this responder to the specified 4-character value.
Void static_throw( static_exception< T > const & param ) (inherits from static_exception)
Set an exception.
Void static_throw( T const & param ) (inherits from static_exception)
Set an exception.
Bool static_try( Void ) (inherits from static_exception)
Confirm whether or not the exception is retained.
Types
CodeEnum
Constant that represents the SFZTableView class.
HorizontalEnum (inherits from SFYResponder)
Constants that represent the horizontal alignment.
VerticalEnum (inherits from SFYResponder)
Constants that represent the vertical alignment.

SFZTableView::SFZTableView
Constructor of the SFZTableView class.
[ protected, explicit ]
SFZTableView(Void);

Description

This constructor makes the following initialization.

  • Set the type to "+tbv".
  • Initialize the various properties. See the appended table.
  • Set the operate key to AVK_SELECT.
  • Set the UP key to AVK_UP.
  • Set the DOWN key to AVK_DOWN.
  • Set the LEFT key to AVK_LEFT.
  • Set the RIGHT key to AVK_RIGHT.
  • Set the preferred column index to 0.
  • Set the header height to 22 pixels.
  • Set the item height to 22 pixels.
  • Set the frame visible.
  • Set the header visible.
  • Set the X cursor loop flag to false.
  • Set the Y cursor loop flag to false.
  • Set the full row select to false.
Property key Property value
SFLPROP_COLOR_GRADIENT_STYLE 0
SFLPROP_HORIZONTAL_RULED_LINE_ENABLE true
SFLPROP_VERTICAL_RULED_LINE_ENABLE true
SFLPROP_SELECTED_BACKGROUND_COLOR SFXRGBColor(0x71, 0x9C, 0xE2, 0x00)
SFLPROP_SELECTED_BACKGROUND_GRADIENT_COLOR SFXRGBColor(0x40, 0x50, 0xA0, 0x00)
SFLPROP_RULED_LINE_COLOR SFXRGBColor(0xF0, 0xF0, 0xF0, 0x00)
SFLPROP_HEADER_BEVEL_LIGHT_COLOR SFXRGBColor(0xFF, 0xFF, 0xFF, 0x00)
SFLPROP_HEADER_BEVEL_BASE_COLOR SFXRGBColor(0xDD, 0xDD, 0xDD, 0x00)
SFLPROP_HEADER_BEVEL_DARK_COLOR SFXRGBColor(0x88, 0x88, 0x88, 0x00)
SFLPROP_HEADER_SEPARATOR_COLOR SFXRGBColor(0x6E, 0x6E, 0x6E, 0x00)
SFLPROP_FRAME_OUTER_BEVEL_LIGHT_COLOR SFXRGBColor(0xAA, 0xAA, 0xAA, 0x00)
SFLPROP_FRAME_OUTER_BEVEL_BASE_COLOR SFXRGBColor(0xFF, 0xFF, 0xFF, 0x00)
SFLPROP_FRAME_OUTER_BEVEL_DARK_COLOR SFXRGBColor(0xEE, 0xEE, 0xEE, 0x00)
SFLPROP_FRAME_INNER_BEVEL_LIGHT_COLOR SFXRGBColor(0x6E, 0x6E, 0x6E, 0x00)
SFLPROP_FRAME_INNER_BEVEL_BASE_COLOR SFXRGBColor(0xFF, 0xFF, 0xFF, 0x00)
SFLPROP_FRAME_INNER_BEVEL_DARK_COLOR SFXRGBColor(0xAA, 0xAA, 0xAA, 0x00)

Reference

SFXHierarchyProperty


SFZTableView::~SFZTableView
Destructor of the SFZTableView class.
[ protected, virtual ]
~SFZTableView(Void);

Description

This destructor clears the all table view columns.

[Note] Note

This function calls the SFZTableView::ClearColumn funtion.

Reference

SFZTableView::ClearColumn


SFZTableView::AddColumn
Add a column in the tail (right end) of the table view.
[ public ]
SFCError AddColumn(
    SFOTableViewColumnSmpConstRef viewcolumn   // table view column
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If inefficient memory: SFERR_NO_MEMOERY

Description

This function adds a column in the tail (right end) of the table view.

[Note] Note

This operation increments the reference count of the column (SFOTableViewColumn) which is specified as the "viewcolumn" argument.

Example

The following is a code to add a column to a table view.

SFZTableViewSmp view = SFZTableView::NewInstance();
SFOTableViewColumnSmp vcol = SFOTableViewColumn::NewInstance("title", 0, SFOTableCellTextReactor::NewInstance());

view->AddColumn(vcol);

Reference

SFOTableViewColumn | SFOTableCellTextReactor


SFZTableView::ClearColumn
Clear the all table view columns.
[ public ]
Void ClearColumn(Void);

Description

This function clears the all table view columns.

[Note] Note

This operation decrements the reference count of the each columns (SFOTableViewColumn).

Reference

SFOTableViewColumn


SFZTableView::GetDownKey
Get the DOWN key.
[ public, const ]
AVKType GetDownKey(Void);

Return value

The DOWN key of the table view.

Description

This function gets the DOWN key of the table view.

[Note] Note

The DOWN key of the table view is set by the SFZTableView::SetDownKey function.

Reference

SFZTableView::SetDownKey | SFZTableView::HandleDownKey | AVKType


SFZTableView::GetFocusedCellColumnIndex
Get the column index of the focused cell.
[ public, const ]
SInt32 GetFocusedCellColumnIndex(Void);

Return value

The column index of the focused cell.

Description

This function gets the column index of the focused cell.

[Note] Note

The column index of the cell which has cursor is returned. When the mode is full row select, the preferred column index which is set by the SFZTableView::SetPreferredColumn function is returned.

Reference

SFZTableView::GetFocusedCellRowIndex | SFZTableView::SetPreferredColumn | SFZTableView::SetFocusedCellIndex


SFZTableView::GetFocusedCellRowIndex
Get the row index of the focused cell.
[ public, const ]
SInt32 GetFocusedCellRowIndex(Void);

Return value

The row index of the focused cell.

Description

This function gets the row index of the focused cell.

[Note] Note

The row index of the cell which has cursor is returned.

Reference

SFZTableView::GetFocusedCellColumnIndex | SFZTableView::SetFocusedCellIndex


SFZTableView::GetFrameMargin
Get the frame margin.
[ protected, const ]
SFXMarginConstRef GetFrameMargin(Void);

Return value

Description

This function gets the frame margin of the table view.

[Note] Note

The frame visibility can be set by the SFZTableView::SetFrameVisible function.

Reference

SFZTableView::SetFrameVisible | SFXMargin


SFZTableView::GetFrameVisible
Get the frame visibility.
[ public, const ]
Bool GetFrameVisible(Void);

Return value

  • If visible: true
  • Otherwise: false

Description

This function gets the visible state of the frame of the table view.

[Note] Note

The frame visibility can be set by the SFZTableView::SetFrameVisible function.

Reference

SFZTableView::SetFrameVisible


SFZTableView::GetFullRowSelect
Get the cell/row select mode.
[ public, const ]
Bool GetFullRowSelect(Void);

Return value

  • If the mode is row select: true
  • If the mode is cell select: false

Description

This function gets the cell/row select mode.

Reference

SFZTableView::SetFullRowSelect


SFZTableView::GetHeaderHeight
Get the header height. [unit: pixel]
[ public, const ]
SInt16 GetHeaderHeight(Void);

Return value

Height of the header (in which the column title is drawn). [unit: pixel]

Description

This function gets the height of the header (in which the column title is drawn). [unit: pixel]

[Note] Note

Regardless of the header visibility which is set by the SFZTableView::SetHeaderVisible function, the value which is set by the SFZTableView::SetHeaderHeight function is gotten by this function.

Reference

SFZTableView::SetHeaderHeight | SFZTableView::SetHeaderVisible


SFZTableView::GetHeaderVisible
Get the header visibility.
[ public, const ]
Bool GetHeaderVisible(Void);

Return value

  • If header is visible: true
  • Otherwise: false

Description

This function gets the visibility of the header (in which the title is drawn).

[Note] Note

To set the visibility, call the SFZTableView::SetHeaderVisible function.

Reference

SFZTableView::SetHeaderVisible


SFZTableView::GetItemHeight
Get the item [row] height. [unit: pixel]
[ public, const ]
SInt16 GetItemHeight(Void);

Return value

Height of the item [row]. [unit: pixel]

Description

This function gets the header of the item [row] of the table view. [unit: pixel]

[Note] Note

The height is set by the SFZTableView::SetItemHeight function.

Reference

SFZTableView::SetItemHeight


SFZTableView::GetLeftKey
Get the LEFT key.
[ public, const ]
AVKType GetLeftKey(Void);

Return value

The LEFT key of the table view.

Description

This function gets the LEFT key of the table view.

[Note] Note

The LEFT key is set by the SFZTableView::SetLeftKey function.

Reference

SFZTableView::SetLeftKey | SFZTableView::HandleLeftKey | AVKType


SFZTableView::GetOperateKey
Get the operate key.
[ public, const ]
AVKType GetOperateKey(Void);

Return value

The operate key of the table view.

Description

This function gets the operate key of the table view.

[Note] Note

The operate key is set by the SFZTableView::SetOperateKey function.

Reference

SFZTableView::SetOperateKey | SFZTableView::HandleOperateKey | AVKType


SFZTableView::GetPreferredColumn
Get the preferred column index.
[ public, const ]
SInt32 GetPreferredColumn(Void);

Return value

The preferred column index.

Description

This function gets the preferred column index (which is effective only when the row select mode is on).

[Note] About preferred column index

The preferred column index is effective only when the row select mode is on by calling the SFZTableView::SetFullRowSelect function.

When the cursor row is selected by pressing the operate key or by calling the SFZTableView::Select function on row select mode, only the cell of this column index of the row is internally selected and processed.

Reference

SFZTableView::SetPreferredColumn | SFZTableView::SetFullRowSelect | SFZTableView::HandleOperateKey


SFZTableView::GetProperty
Get the property value corresponding to the specified key.
[ public, const ]
ValueRec GetProperty(
    UInt32 key             // property key to search
    BoolPtr found = null   // whether the key is found or not
);

Return value

Property value (SFXHierarchyProperty::ValueRec) corresponding to the specified key.

Description

This function gets the property value corresponding to the specified key.

If the key is not found, the return value is null.

[Note] null value of the SFXHierarchyProperty::ValueRec

SFXHierarchyProperty::ValueRec is a union at most 4 bytes. The null value means that it is filled with 0 bits. If the union type is SFXRGBColor, the null value is SFXRGBColor(0x00, 0x00, 0x00, 0x00) that is black. If Bool, it is false.

When the "found" arugment except null is specified, whether the key is found is returned as Bool value. If you want to only check the key existence, use the SFOTableCellReactor::HasProperty function.

[Note] Note

For more details about the hierarchical property, see the SFXHierarchyProperty class of the reference.

Reference

SFXHierarchyProperty::ValueRec | SFZTableView::HasProperty | SFXHierarchyProperty


SFZTableView::GetRightKey
Get the RIGHT key.
[ public, const ]
AVKType GetRightKey(Void);

Return value

The RIGHT key of the table view.

Description

This function gets the RIGHT key of the table view.

[Note] Note

The RIGHT key of the table view is set by the SFZTableView::SetRightKey function.

Reference

SFZTableView::SetRightKey | SFZTableView::HandleRightKey | AVKType


SFZTableView::GetScrollBarControl
Get the scroll bar control which is connected to the table view.
[ public, const ]
SFYScrollBarControlSmpConstRef GetScrollBarControl(Void);

Return value

Scroll bar control.

Description

This function gets the scroll bar control which is connected to the table view.

Reference

SFZTableView::SetScrollBarControl


SFZTableView::GetUpKey
Get the UP key.
[ public, const ]
AVKType GetUpKey(Void);

Return value

The UP key of the table view.

Description

This function gets the UP key.

[Note] Note

The UP key of the table view is set by the SFZTableView::SetUpKey function.

Reference

SFZTableView::SetUpKey | SFZTableView::HandleUpKey | AVKType


SFZTableView::GetXLoop
Get the X cursor loop flag.
[ public, const ]
Bool GetXLoop(Void);

Return value

  • If the X cursor loops: true
  • Otherwise: false

Description

This function gets the X cursor loop flag.

Reference

SFZTableView::SetXLoop


SFZTableView::GetYLoop
Get the Y cursor loop flag.
[ public, const ]
Bool GetYLoop(Void);

Return value

  • If the Y cursor loops: true
  • Otherwise: false

Description

This function gets the Y cursor loop flag.

Reference

SFZTableView::SetYLoop


SFZTableView::HandleBoundVirtual
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event is received. [Perform the processing when the virtual region is changed.]
[ protected, virtual ]
Void HandleBoundVirtual(Void);

Description

This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event is received.

In case you want to perform your own processing when the virtual region is changed, override this virtual function.

The default implementation is to recalculate the row position to draw and the column width.

[Note] Sending the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event

The (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event will occur when the virtual region is changed by calling the SFYResponder::SetRealBound or SFYResponder::SetVirtualBound function.

[Note] Another method when the virtual region is changed

Other than overriding this virtual function, it is possible to define and implement the handler for region event[XANDLER_DECLARE_VOIDBOUND], and register it into the responder.

In the processing when the virtual region is updated, this virtual function is executed first, and next the handlers for region event are executed in the registered order.

In almost all cases, the method to override this virtual function is adopted since defining, implementing and registering the handler for region event can be omitted.

Internal implementation

Internal implementation of this function is as follows:

/*protected virtual */Void SFZTableView::HandleBoundVirtual(Void)
{
    RefreshYOffset();
    RefreshColumnWidth();
    return;
}// SFZTableView::HandleBoundVirtual //

/*private */Void SFZTableView::RefreshYOffset(Void)
{
    SInt16                                      boundHeight;

    _yoffset += ExpectYOffsetMovement(_ysel, &boundHeight);
    if (_bar != null) {
        if (_model != null) {
            _bar->SetMinimumValue(0);
            _bar->SetMaximumValue((_itemHeight + _ypadding) *  _model->GetRowLength() - _ypadding);
            _bar->SetPageValue(boundHeight);
            _bar->SetCurrentValue(-_yoffset);
        }
        else {
            _bar->SetMinimumValue(0);
            _bar->SetMaximumValue(0);
        }
    }
    return;
}// SFZTableView::RefreshYOffset //

/*private */SFCError SFZTableView::RefreshColumnWidth(Void)
{
    SInt32                                      colLen;
    SFCError                                    error(SFERR_NO_ERROR);

    if ((colLen = _vcolSeq.GetSize()) > 0) {
        if (_colWidth.GetSize() < colLen) {
            error = _colWidth.SetSize(colLen);
        }
        if (error == SFERR_NO_ERROR) {
            SFXRectangle                        bound;
            SInt32                              share;
            bound.Set(GetLocalBound());
            bound.Deflate(GetFrameMargin());
            share = bound.GetWidth();
            share -= _xpadding * (colLen - 1);
            if (share > 0) {
                SInt32                          i;
                SInt32                          nAuto(0);
                for (i = 0; i < colLen; ++i) {
                    Bool                        found;
                    SInt16                      temp;
                    temp = _vcolSeq[i]->GetProperty(SFLPROP_FIXED_WIDTH, &found).s16;
                    if (found) {
                        _colWidth[i] = temp;
                        share -= temp;
                    }
                    else {
                        nAuto++;
                        _colWidth[i] = -1;
                    }
                }
                if (share > 0 && nAuto > 0) {
                    SInt32                      width;
                    SInt32                      residue;
                    width = share / nAuto;
                    residue = share - width * nAuto;
                    for (i = 0; i < colLen; ++i) {
                        if (_colWidth[i] == -1) {
                            if (--nAuto > 0) {
                                _colWidth[i] = static_cast<SInt16>(width);
                            }
                            else {
                                _colWidth[i] = static_cast<SInt16>(width + residue);
                            }
                        }
                    }
                }
            }
        }
    }
    return error;
}// SFZTableView::RefreshColumnWidth //

Reference

SFYResponder::SetRealBound | SFYResponder::SetVirtualBound | Region Event[SFEVT_RESPONDER_BOUND]


SFZTableView::HandleDownKey
This function will be called when the SFEVT_KEY event of the DOWN key is received.
[ protected, virtual ]
Bool HandleDownKey(Void);

Description

This function will be called when the SFEVT_KEY event(key event[SFEVT_KEY]) of the DOWN key set with the SFZTableView::SetDownKey function is received.

In case you want to perform your own processing, override this function.

The default implementation is as follows:

Move the focus down by one item.

If the focused cell is the last one, the behavior is different depending on the value of the Y cursor loop flag.

  • If true: Move the focus to the first cell.
  • Otherwise: Not move.
[Note] Note

To set the Y cursor loop flag, call the SFZTableView::SetYLoop function.

[Note] Cursor

Depending on the select mode (cell or row), the focus which is called as cursor is moved by cell or row.

The select mode is set by the SFZTableView::SetFullRowSelect function.

* The preferred column index which is set by the SFZTableView::SetPreferredColumn function is not changed.

Internal implementation

Internal implementation of this function is as follows.

/*protected virtual */Bool SFZTableView::HandleDownKey(Void)
{
    SInt32                                      colLen;
    SInt32                                      rowLen;
    SInt32                                      row;

    if (_model != null) {
        colLen = _vcolSeq.GetSize();
        rowLen = _model->GetRowLength();
        if (colLen > 0 && rowLen > 0) {
            row = (_ysel + 1 < rowLen) ? _ysel + 1 : _yloop ? 0 : rowLen - 1;
            OffFocusCell();
            _ysel = row;
            RefreshYOffset();
            OnFocusCell();
            Invalidate();
        }
    }
    return true;
}// SFZTableView::HandleDownKey //

Reference

SFZTableView::SetDownKey | SFZTableView::SetYLoop | SFZTableView::SetFullRowSelect | SFZTableView::SetPreferredColumn | SFXEvent | key event [SFEVT_KEY]


SFZTableView::HandleLeftKey
This function will be called when the SFEVT_KEY event of the LEFT key is received.
[ protected, virtual ]
Bool HandleLeftKey(Void);

Description

This function will be called when the SFEVT_KEY event(key event[SFEVT_KEY]) of the LEFT key set with the SFZTableView::SetLeftKey function is received.

In case you want to perform your own processing, override this function.

The default implementation is as follows:

The behavior is different depending on the select mode (cell or row).

[Note] Select mode: cell or row

Depending on the select mode (cell or row), the focus which is called as cursor is moved by cell or row.

The select mode is set by the SFZTableView::SetFullRowSelect function.

On cell select mode

Move the focus (which is called as cursor) to the left by one cell.

If the focus is in the left edge, the behavior is different depending on the value of the X cursor loop flag.

  • If true: Move the focus to the cell of the right edge.
  • Otherwise: Not move.
[Note] Note

To set the X cursor loop flag, call the SFZTableView::SetXLoop function.

On row select mode

Not move.

* The preferred column index which is set by the SFZTableView::SetPreferredColumn function is not changed.

Internal implementation

Internal implementation of this function is as follows.

/*protected virtual */Bool SFZTableView::HandleLeftKey(Void)
{
    SInt32                                      colLen;
    SInt32                                      rowLen;
    SInt32                                      col;

    if (_model != null) {
        colLen = _vcolSeq.GetSize();
        rowLen = _model->GetRowLength();
        if (colLen > 0 && rowLen > 0) {
            col = _fullRowSelect ? _preferXsel : (_xsel > 0) ? _xsel - 1 : _xloop ? colLen - 1 : 0;
            OffFocusCell();
            _xsel = col;
            OnFocusCell();
            Invalidate(GetItemBound(_ysel));
        }
    }
    return true;
}// SFZTableView::HandleLeftKey //

Reference

SFZTableView::SetLeftKey | SFZTableView::SetFullRowSelect | SFZTableView::SetPreferredColumn | SFZTableView::SetXLoop | SFXEvent | key event [SFEVT_KEY]


SFZTableView::HandleOperateKey
This function will be called when the SFEVT_KEY event of the operate key is received.
[ protected, virtual ]
Bool HandleOperateKey(Void);

Description

This function will be called when the SFEVT_KEY event(key event[SFEVT_KEY]) of the operate key set with the SFZTableView::SetOperateKey function is received.

In case you want to perform your own processing, override this function.

The default implementation is as follows:

Unfocus the selected cell temporally, and operate (select) the cell by calling the SFOTableCellReactor::Handle function. Then, focus back the cell.

The time the cell is focused back is when the SFOTableCellReactor::InvokeResultCell function is invoked.

[Note] Row select mode

If the operate key is pressed on row select mode, the cell to be selected is the preferred column cell on the row.

The select mode or the preferred column index is set by the SFZTableView::SetFullRowSelect function or the SFZTableView::SetPreferredColumn function.

[Note] About the select operation

The behavior of the SFOTableCellReactor::Handle function is different as follows depending on the kind of cells and its status.

If the cell is an editable text, the native text input control is invoked (See: the SFOTableCellTextReactor::Handle function).

If the cell is an editable checkbox, the checkmark is toggled. (See: the SFOTableCellToggleReactor::Handle function).

Otherwise, nothing is done.

Internal implementation

Internal implementation of this fucntion is as follows.

/*protected virtual */Bool SFZTableView::HandleOperateKey(Void)
{
    Select();
    return true;
}// SFZTableView::HandleOperateKey //

Reference

SFZTableView::SetOperateKey | SFZTableView::SetFullRowSelect | SFZTableView::SetPreferredColumn | SFOTableCellReactor::Handle | SFOTableCellTextReactor::Handle | SFOTableCellToggleReactor::Handle | SFOTableCellReactor::InvokeResultCell | SFXEvent | key event [SFEVT_KEY]


SFZTableView::HandleRightKey
This function will be called when the SFEVT_KEY event of the RIGHT key is received.
[ protected, virtual ]
Bool HandleRightKey(Void);

Description

This function will be called when the SFEVT_KEY event(key event[SFEVT_KEY]) of the RIGHT key set with the SFZTableView::SetRightKey function is received.

In case you want to perform your own processing, override this function.

The default implementation is as follows:

The behavior is different depending on the select mode (cell or row).

[Note] Select mode: cell or row

Depending on the select mode (cell or row), the focus which is called as cursor is moved by cell or row.

The select mode is set by the SFZTableView::SetFullRowSelect function.

On cell select mode

Move the focus (which is called as cursor) to the right by one cell.

If the focus is in the right edge, the behavior is different depending on the value of the X cursor loop flag.

  • If true: Move the focus to the cell of the left edge.
  • Otherwise: Not move.
[Note] Note

To set the X cursor loop flag, call the SFZTableView::SetXLoop function.

On row select mode

Not move.

* The preferred column index which is set by the SFZTableView::SetPreferredColumn function is not changed.

Internal implementation

Internal implementation of this function is as follows.

/*protected virtual */Bool SFZTableView::HandleRightKey(Void)
{
    SInt32                                      length;

    if (_model != null) {
        if (_fullRowSelect) {
            OffFocusCell();
            _xsel = _preferXsel;
            OnFocusCell();
            Invalidate(GetItemBound(_ysel));
        }
        else {
            length = _vcolSeq.GetSize();
            if (_xsel + 1 < length) {
                OffFocusCell();
                ++_xsel;
                OnFocusCell();
                Invalidate(GetItemBound(_ysel));
            }
            else if (_yloop) {
                if (length > 0) {
                    OffFocusCell();
                    _xsel = 0;
                    OnFocusCell();
                    Invalidate(GetItemBound(_ysel));
                }
            }
        }
    }
    return true;
}// SFZTableView::HandleRightKey //

Reference

SFZTableView::SetRightKey | SFZTableView::SetFullRowSelect | SFZTableView::SetPreferredColumn | SFZTableView::SetXLoop | SFXEvent | key event [SFEVT_KEY]


SFZTableView::HandleUpKey
This function will be called when the SFEVT_KEY event of the UP key is received.
[ protected, virtual ]
Bool HandleUpKey(Void);

Description

This function will be called when the SFEVT_KEY event(key event[SFEVT_KEY]) of the UP key set with the SFZTableView::SetUpKey function is received.

In case you want to perform your own processing, override this function.

The default implementation is as follows:

Move the focus up by one item.

If the focused cell is the first one, the behavior is different depending on the value of the Y cursor loop flag.

  • If true: Move the focus to the last cell.
  • Otherwise: Not move.
[Note] Note

To set the Y cursor loop flag, call the SFZTableView::SetYLoop function.

[Note] Cursor

Depending on the select mode (cell or row), the focus which is called as cursor is moved by cell or row.

The select mode is set by the SFZTableView::SetFullRowSelect function.

* The preferred column index which is set by the SFZTableView::SetPreferredColumn function is not changed.

Internal implementation

Internal implementation of this function is as follows.

/*protected virtual */Bool SFZTableView::HandleUpKey(Void)
{
    SInt32                                      colLen;
    SInt32                                      rowLen;
    SInt32                                      row;

    if (_model != null) {
        colLen = _vcolSeq.GetSize();
        rowLen = _model->GetRowLength();
        if (colLen > 0 && rowLen > 0) {
            row = (_ysel > 0) ? _ysel - 1 : _yloop ? rowLen - 1 : 0;
            OffFocusCell();
            _ysel = row;
            RefreshYOffset();
            OnFocusCell();
            Invalidate();
        }
    }
    return true;
}// SFZTableView::HandleUpKey //

Reference

SFZTableView::SetUpKey | SFZTableView::SetYLoop | SFZTableView::SetFullRowSelect | SFZTableView::SetPreferredColumn | SFXEvent | key event [SFEVT_KEY]


SFZTableView::HasProperty
Check if the specified property key is contained.
[ public, const ]
Bool HasProperty(
    UInt32 key   // property key to search
);

Return value

  • If the key is found: true
  • Otherwise: false

Description

This function checks if the specified property key is contained.

[Note] Note

To search the property key and get its value simultaneously, the SFZTableView::GetProperty function is better to use. Because the searching is only once.

Reference

SFZTableView::GetProperty | SFXHierarchyProperty


SFZTableView::NewInstance
Create a new instance of this class.
[ public, static ]
SFZTableViewSmp NewInstance(
    SFCErrorPtr exception = null   // error value
);

Argument

exception

Return the error value generated inside the function.

Return value

  • If succeeds: not null pointer
  • Otherwise: null pointer

Description

This function creates a new instance of the SFZTableView class.

If succeeds, a not null pointer will be returned, and the "exception" argument is SFERR_NO_ERROR. If fails, a null pointer will be returned, and "exception" argument holds the error value.

Example

The following is a code to generate a new instance of the SFZTableView class.

SFZTableViewSmp view;
SFCError error;

if ((view = SFZTableView::NewInstance(&error)) != null) {
    // .. (omitted) ..
}

Reference

SFZTableView


SFZTableView::Select
Select the focused cell.
[ public ]
SFCError Select(Void);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If no table model is connected to the table view, the table model has no data, row or column index of the focused cell is out of range, or the cell object is null: SFERR_INVALID_STATE

Description

This function selects the focused cell.

Unfocus the selected cell temporally, and operate (select) the cell by calling the SFOTableCellReactor::Handle function. Then, focus back the cell.

The time the cell is focused back is when the SFOTableCellReactor::InvokeResultCell function is invoked.

[Note] Row select mode

If the operate key is pressed on row select mode, the cell to be selected is the preferred column cell on the row.

The select mode or the preferred column index is set by the SFZTableView::SetFullRowSelect function or the SFZTableView::SetPreferredColumn function.

[Note] About the select operation

The behavior of the SFOTableCellReactor::Handle function is different as follows depending on the kind of cells and its status.

If the cell is an editable text, the native text input control is invoked (See: the SFOTableCellTextReactor::Handle function).

If the cell is an editable checkbox, the checkmark is toggled. (See: the SFOTableCellToggleReactor::Handle function).

Otherwise, nothing is done.

Internal implementation

Internal implementation of this fucntion is as follows.

/*public */SFCError SFZTableView::Select(Void)
{
    SInt32                                      colLen;
    SInt32                                      rowLen;
    SInt32                                      col;
    SInt32                                      row;
    SFXAnyPtr                                   cellobj;
    SFCError                                    error(SFERR_NO_ERROR);

    if (_model != null) {
        colLen = _vcolSeq.GetSize();
        rowLen = _model->GetRowLength();
        if (colLen > 0 && rowLen > 0) {
            col = _fullRowSelect ? _preferXsel : _xsel;
            row = _ysel;
            if (col >= 0 && col < colLen && row >= 0 && row < rowLen) {
                cellobj = _model->GetColumnRow(_vcolSeq[col]->GetModelColumnIndex(), row);
                if (cellobj != null) {
                    OffFocusCell();
                    if (_vcolSeq[col]->HandleCell(*cellobj, row, OnFocusCellSPP, this, &_property)) {
                        Invalidate();
                    }
                }
                else {
                    error = SFERR_INVALID_STATE;
                }
            }
            else {
                error = SFERR_INVALID_STATE;
            }
        }
        else {
            error = SFERR_INVALID_STATE;
        }
    }
    else {
        error = SFERR_INVALID_STATE;
    }
    return error;
}// SFZTableView::Select //

Reference

SFZTableView::SetFocusedCellIndex | SFZTableView::SetFullRowSelect | SFZTableView::SetPreferredColumn | SFOTableCellReactor::Handle | SFOTableCellTextReactor::Handle | SFOTableCellToggleReactor::Handle | SFOTableCellReactor::InvokeResultCell


SFZTableView::SetDownKey
Set the DOWN key of the table view.
[ public ]
Void SetDownKey(
    AVKType param   // key
);

Description

This function sets the DOWN key of the table view.

Default value: AVK_DOWN

If the DOWN key is pressed, the focus of the cell/row is moved down by one item by the internal handler (SFZTableView::HandleDownKey function).

If the focused cell is the last one, the behavior is different depending on the value of the Y cursor loop flag.

  • If true: Move the focus to the first cell/row.
  • Otherwise: Not move.
[Note] Note

To set the Y cursor loop flag, call the SFZTableView::SetYLoop function.

[Note] Cursor

Depending on the select mode (cell or row), the focus which is called as cursor is moved by cell or row.

The select mode is set by the SFZTableView::SetFullRowSelect function.

* The preferred column index which is set by the SFZTableView::SetPreferredColumn function is not changed.

Reference

SFZTableView::GetDownKey | SFZTableView::HandleDownKey | SFZTableView::SetYLoop | SFZTableView::SetFullRowSelect | SFZTableView::SetPreferredColumn | SFZTableView::SetUpKey | SFZTableView::SetLeftKey | SFZTableView::SetRightKey | SFZTableView::SetYLoop | AVKType


SFZTableView::SetFocusedCellIndex
Set the focus to the cell which is specified by the row index and the column index.
[ public ]
SFCError SetFocusedCellIndex(
    SInt32 column   // column index
    SInt32 row      // row index
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If no table model is connected to the table view, or the model has no data: SFERR_INVALID_STATE
  • If the out of range indexes are specified: SFERR_INVALID_PARAM

Description

This function focuses the cell which is specified by the row index and the column index.

[Note] Note

When the select mode is row select, the real focus is moved to the cell of the preferred column index which is set by the SFZTableView::SetPreferredColumn function.

Reference

SFZTableView::GetFocusedCellColumnIndex | SFZTableView::GetFocusedCellRowIndex | SFZTableView::SetPreferredColumn


SFZTableView::SetFrameVisible
Set frame visibility.
[ public ]
Void SetFrameVisible(
    Bool param   // If visible: true, Otherwise: false
);

Description

This function sets the visibility of the frame of the table view.

Default value: true.

If the "param" argument is set to false, the frame is invisible and its margin area is not allocated.

[Note] Note

The frame visibility influences the margin which is gotten by the SFZTableView::GetFrameMargin function.

Reference

SFZTableView::GetFrameVisible | SFZTableView::GetFrameMargin


SFZTableView::SetFullRowSelect
Set the cell/row select mode.
[ public ]
Void SetFullRowSelect(
    Bool param   // true: row select mode, false: cell select mode
);

Description

This function sets the cell/row select mode.

Default value: false (cell select mode).

When the "param" arugment is set to true, the mode is row select. Then the cursor is drawn by row and the element of the table view is selected by row.

When false, the mode is cell select. Then drawn and selected by cell.

[Note] Selection of the cell when the mode is row select

When the operate key is pressed in row select mode, the cell of the preferred column index is selected. (Default: the cell of the zero-th column).

* To set the preferred column index, call the SFZTableView::SetPreferredColumn function.

Reference

SFZTableView::GetFullRowSelect | SFZTableView::SetPreferredColumn | SFZTableView::HandleLeftKey | SFZTableView::HandleRightKey


SFZTableView::SetHeaderHeight
Set the header height. [unit: pixel]
[ public ]
Void SetHeaderHeight(
    SInt16 param   // header height [unit: pixel]
);

Description

This function sets the height of the header in which the column title is drawn. [unit: pixel]

Default value: 22 pixel.

Reference

SFZTableView::GetHeaderHeight


SFZTableView::SetHeaderVisible
Set the header visibility.
[ public ]
Void SetHeaderVisible(
    Bool param   // If visible: true, Otherwise: false
);

Description

This function sets the visibility of the header in which the column title is drawn.

Default value: true

If the "param" argument is set to false, the header is invisible and not drawn.

[Note] Note

The header visibility does not influence the value which is gotten by the SFZTableView::GetHeaderHeight function.

That is the value which is set by the SFZTableView::SetHeaderHeight function.

Reference

SFZTableView::GetHeaderVisible | SFZTableView::GetHeaderHeight | SFZTableView::SetHeaderHeight


SFZTableView::SetItemHeight
Set the item [row] height. [unit: pixel]
[ public ]
Void SetItemHeight(
    SInt16 param   // Item [row] height [unit: pixel]
);

Description

This function sets the height of the item [row] of the table view. [unit: pixel]

Default value: 22 pixels.

Reference

SFZTableView::GetItemHeight


SFZTableView::SetLeftKey
Set the LEFT key of the table view.
[ public ]
Void SetLeftKey(
    AVKType param   // key
);

Description

This function sets the LEFT key of the table view.

Default value: AVK_LEFT

The behavior is different depending on the select mode as follows.

[Note] Cell/Row select mode

Depending on the select mode (cell or row), the focus which is also called as cursor is moved by cell or row.

The select mode is set by the SFZTableView::SetFullRowSelect function.

On cell select mode

If the LEFT key is pressed, the focus of the cell is moved left by one cell by the internal handler (SFZTableView::HandleLeftKey function).

If the focused cell is in the left edge, the behavior is different depending on the value of the X cursor loop flag.

  • If ture: Move the focus to the cell in the right edge.
  • Otherwise: Not move.
[Note] Note

To set the X cursor loop flag, call the SFZTableView::SetXLoop function.

On row select mode

Not move.

* The preferred column index which is set by the SFZTableView::SetPreferredColumn function is not changed.

Reference

SFZTableView::GetLeftKey | SFZTableView::HandleLeftKey | SFZTableView::SetFullRowSelect | SFZTableView::SetPreferredColumn | SFZTableView::SetXLoop | SFZTableView::SetRightKey | SFZTableView::SetDownKey | SFZTableView::SetUpKey | SFZTableView::SetXLoop | AVKType


SFZTableView::SetModel
Set the table model.
[ public ]
Void SetModel(
    SFOTableModelBaseSmpConstRef param   // table model
);

Description

This function sets the specified table model.

[Note] Table model

Table model (SFOTableModel class) represents the data which is displayed and edited in the table view (SFZTableView class).

Example

The following is a code to set the table model.

SFZTableViewSmp view;
SFOTableModelSmp model;

view = SFZTableView::NewInstance();
model = SFOTableModel::NewInstance();

view->SetModel(model);

Reference

SFOTableModelBase | SFOTableModel


SFZTableView::SetOperateKey
Set the operate key.
[ public ]
Void SetOperateKey(
    AVKType param   // key
);

Description

This function sets the operate key of the table view.

Default value: AVK_SELECT

[Note] Note

If the operate key is pressed, the SFZTableView::HandleOperateKey function is called.

Reference

SFZTableView::GetOperateKey | SFZTableView::HandleOperateKey | AVKType


SFZTableView::SetPreferredColumn
Set the preferred column index .
[ public ]
Void SetPreferredColumn(
    SInt32 param   // column index
);

Description

This function sets the preferred column index (that is effective only on row select mode).

Default value: 0.

[Note] About the preferred column index

The preferred column index is effective only on row select mode.

If the focused cells are selected on row select mode, the selection is assigned to the cell which has the preferred column index.

* The select mode is set by the SFZTableView::SetFullRowSelect function.

Reference

SFZTableView::GetPreferredColumn | SFZTableView::SetFullRowSelect | SFZTableView::HandleOperateKey | SFZTableView::HandleLeftKey | SFZTableView::HandleRightKey


SFZTableView::SetProperty
Set the property value corresponding to the specified key.
[ public ]
SFCError SetProperty(
    UInt32 key       // property key
    ValueRec value   // property value
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If insufficient memory: SFERR_NO_MEMOERY

Description

This function sets the property value corresponding to the specified key.

[Note] Note

For more details about the property, see the reference of the SFXHierarchyProperty class.

Reference

SFXHierarchyProperty::ValueRec | SFXHierarchyProperty


SFZTableView::SetRightKey
Set the LEFT key of the table view.
[ public ]
Void SetRightKey(
    AVKType param   // key
);

Description

This function sets the RIGHT key of the table view.

Default value: AVK_RIGHT

The behavior is different depending on the select mode as follows.

[Note] Cell/Row select mode

Depending on the select mode (cell or row), the focus which is also called as cursor is moved by cell or row.

The select mode is set by the SFZTableView::SetFullRowSelect function.

On cell select mode

If the RIGHT key is pressed, the focus of the cell is moved right by one cell by the internal handler (SFZTableView::HandleRightKey function).

If the focused cell is in the right edge, the behavior is different depending on the value of the X cursor loop flag.

  • If ture: Move the focus to the cell in the left edge.
  • Otherwise: Not move.
[Note] Note

To set the X cursor loop flag, call the SFZTableView::SetXLoop function.

On row select mode

Not move.

* The preferred column index which is set by the SFZTableView::SetPreferredColumn function is not changed.

Reference

SFZTableView::GetRightKey | SFZTableView::HandleRightKey | SFZTableView::SetFullRowSelect | SFZTableView::SetPreferredColumn | SFZTableView::SetXLoop | SFZTableView::SetLeftKey | SFZTableView::SetDownKey | SFZTableView::SetUpKey | SFZTableView::SetXLoop | AVKType


SFZTableView::SetScrollBarControl
Set the scroll bar control which is connected to the table view.
[ public ]
Void SetScrollBarControl(
    SFYScrollBarControlSmpConstRef bar   // scroll bar control
);

Description

This function connects the scroll bar control to the table view.

Default value: SFYScrollBarControlSmp::EmptyInstance() [In default, no scroll bar is set].

[Note] Note

Scroll bar control whose direction is vertical (SFYScrollBarControl::VERTICAL) is only supported.

Example

The following is a code to set the scroll bar control.

SFZTableViewSmp view;
SFZScollBarControlSmp bar;

view = SFZTableView::NewInstance();
view->SetParent(GetThis());
view->SetRealBound(GetLocalBound().Deflate(5, 5, 10, 5));
view->SetState(true, true, true, true);

bar = SFZScrollBarConrol::NewInstance();
bar->SetParent(GetThis());
SFXRectangle bound(view->GetRealBound());
bar->SetRealBound(bound.AddX(bound.GetWidth()).SetWidth(5));

view->SetScrollBarControl(bar);

Reference

SFZTableView::GetScrollBarControl | SFYScrollBarControl::OrientationEnum | SFYScrollBarControl


SFZTableView::SetUpKey
Set the UP key of the table view.
[ public ]
Void SetUpKey(
    AVKType param   // key
);

Description

This function sets the UP key of the table view.

Default value: AVK_UP

If the UP key is pressed, the focus of the cell/row is moved up by one item by the internal handler (SFZTableView::HandleUpKey function).

If the focused cell is the first one, the behavior is different depending on the value of the Y cursor loop flag.

  • If true: Move the focus to the last cell/row.
  • Otherwise: Not move.
[Note] Note

To set the Y cursor loop flag, call the SFZTableView::SetYLoop function.

[Note] Cursor

Depending on the select mode (cell or row), the focus which is called as cursor is moved by cell or row.

The select mode is set by the SFZTableView::SetFullRowSelect function.

* The preferred column index which is set by the SFZTableView::SetPreferredColumn function is not changed.

Reference

SFZTableView::GetUpKey | SFZTableView::HandleUpKey | SFZTableView::SetYLoop | SFZTableView::SetFullRowSelect | SFZTableView::SetPreferredColumn | SFZTableView::SetDownKey | SFZTableView::SetLeftKey | SFZTableView::SetRightKey | SFZTableView::SetYLoop | AVKType


SFZTableView::SetXLoop
Set the X cursor loop flag.
[ public ]
Void SetXLoop(
    Bool param   // When the X cursor loops: true, Otherwise: false
);

Description

This function sets the X cursor loop flag.

Default value: false.

[Note] X cursor loop

The X cursor loop is the hehavior of the focus move of the cell in the right/left edge to the cell in the left/right edge by pressing the RIGHT/LEFT key.

Reference

SFZTableView::GetXLoop | SFZTableView::HandleRightKey | SFZTableView::HandleLeftKey


SFZTableView::SetYLoop
Set the Y cursor loop flag.
[ public ]
Void SetYLoop(
    Bool param   // When the Y cursor loops: true, Otherwise: false
);

Description

This function sets the Y cursor loop flag.

Default value: false.

[Note] Y cursor loop

The Y cursor loop is the behavior of the focus move of the first/last cell to the last/first cell by pressing the UP/DOWN key.

Reference

SFZTableView::GetYLoop | SFZTableView::HandleDownKey | SFZTableView::HandleUpKey


SFZTableView::CodeEnum
Constant that represents the SFZTableView class.
enum CodeEnum {
    CODE_TYPE = four_char_code('+', 't', 'b', 'v'),
};
SFMTYPEDEFTYPE(CodeEnum)

Reference

SFYResponder::GetType | SFYResponder::SetType |