2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0/
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FUiCtrlTableView.h
20 * @brief This is the header file for the %TableView class.
22 * This header file contains the declarations of the %TableView class and its helper classes.
25 #ifndef _FUI_CTRL_TABLE_VIEW_H_
26 #define _FUI_CTRL_TABLE_VIEW_H_
28 #include <FGrpRectangle.h>
29 #include <FGrpColor.h>
30 #include <FUiContainer.h>
31 #include <FUiCtrlTableViewTypes.h>
32 #include <FUiCtrlScrollPanelTypes.h>
34 namespace Tizen { namespace Ui { namespace Controls
36 class ITableViewItemProvider;
37 class ITableViewItemProviderF;
38 class ITableViewItemEventListener;
39 class IFastScrollListener;
40 class IScrollEventListener;
41 class IScrollEventListenerF;
45 * @brief This class defines common behavior for a %TableView control.
49 * The %TableView class defines common behavior for a %TableView control.
51 * The following example demonstrates how to use the %TableView class.
54 //Sample code for TableViewSample.h
58 : public Tizen::Ui::Controls::Form
59 , public Tizen::Ui::Controls::ITableViewItemProvider
60 , public Tizen::Ui::Controls::ITableViewItemEventListener
65 , __pContextItem(null){}
67 bool Initialize(void);
68 virtual result OnInitializing(void);
69 virtual result OnTerminating(void);
71 // ITableViewItemEventListener
72 virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status);
73 virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated);
74 virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView, int itemIndexFrom, int itemIndexTo);
76 // ITableViewItemProvider
77 virtual int GetItemCount(void);
78 virtual Tizen::Ui::Controls::TableViewItem* CreateItem(int itemIndex, int itemWidth);
79 virtual bool DeleteItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
80 virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
81 virtual int GetDefaultItemHeight(void);
84 Tizen::Ui::Controls::TableView* __pTableView;
85 Tizen::Ui::Controls::TableViewContextItem* __pContextItem;
90 //Sample code for TableViewSample.cpp
92 #include <FGraphics.h>
94 #include "TableViewSample.h"
96 using namespace Tizen::App;
97 using namespace Tizen::Base;
98 using namespace Tizen::Graphics;
99 using namespace Tizen::Media;
100 using namespace Tizen::Ui::Controls;
103 TableViewSample::Initialize(void)
105 Construct(FORM_STYLE_NORMAL);
110 TableViewSample::OnInitializing(void)
112 result r = E_SUCCESS;
114 // Creates an instance of TableView
115 __pTableView = new TableView();
116 __pTableView->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height), true, TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT);
117 __pTableView->SetItemProvider(*this);
118 __pTableView->AddTableViewItemEventListener(this);
120 // Adds the TableView to the form
121 AddControl(__pTableView);
123 // Creates an instance of TableViewContextItem
124 __pContextItem = new TableViewContextItem();
125 __pContextItem->Construct(Dimension(720, 100));
127 Button* pButton = new Button();
128 pButton->Construct(Rectangle(10, 10, 200, 80), L"Context1");
130 Button* pButton2 = new Button();
131 pButton2->Construct(Rectangle(250, 10, 200, 80), L"Context2");
133 __pContextItem->AddControl(pButton);
134 __pContextItem->AddControl(pButton2);
140 TableViewSample::OnTerminating(void)
142 result r = E_SUCCESS;
144 // Deallocates the item context
145 delete __pContextItem;
146 __pContextItem = null;
151 // ITableViewItemEventListener implementation
153 TableViewSample::OnTableViewItemStateChanged(TableView& tableView, int itemIndex, TableViewItem* pItem, TableViewItemStatus status)
159 TableViewSample::OnTableViewContextItemActivationStateChanged(TableView& tableView, int itemIndex, TableViewContextItem* pContextItem, bool activated)
165 TableViewSample::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView, int itemIndexFrom, int itemIndexTo)
170 // ITableViewItemProvider implementation
172 TableViewSample::GetItemCount(void)
178 TableViewSample::GetDefaultItemHeight(void)
184 TableViewSample::CreateItem(int itemIndex, int itemWidth)
186 TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL;
187 TableViewItem* pItem = new TableViewItem();
189 switch (itemIndex % 6)
192 style = TABLE_VIEW_ANNEX_STYLE_NORMAL;
195 style = TABLE_VIEW_ANNEX_STYLE_MARK;
198 style = TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING;
201 style = TABLE_VIEW_ANNEX_STYLE_DETAILED;
204 style = TABLE_VIEW_ANNEX_STYLE_RADIO;
207 style = TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER;
213 pItem->Construct(Dimension(itemWidth, GetDefaultItemHeight()), style);
216 text.Format(30, L"TableViewItem %d", itemIndex);
218 Label* pLabel = new Label();
219 pLabel->Construct(Rectangle(0, 0, itemWidth, GetDefaultItemHeight()), text);
221 pItem->AddControl(pLabel);
222 pItem->SetContextItem(__pContextItem);
228 TableViewSample::DeleteItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
236 TableViewSample::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
244 class _OSP_EXPORT_ TableView
245 : public Tizen::Ui::Container
249 * The object is not fully constructed after this constructor is called. @n
250 * For full construction, the %Construct() method must be called right after calling this constructor.
257 * This destructor overrides Tizen::Base::Object::~Object().
261 virtual ~TableView(void);
264 * Initializes this instance of %TableView with the specified parameters.
268 * @return An error code
269 * @param[in] rect An instance of the Graphics::Rectangle class
270 * This instance represents the x and y coordinates of the left top corner of the created %TableView along with the width and height.
271 * @param[in] itemDivider Set to @c true to display an item divider, @n
273 * @param[in] scrollStyle The style of %TableView scroll bar style
274 * @exception E_SUCCESS The method is successful.
275 * @exception E_INVALID_ARG A specified input parameter is invalid, or either the rect.width or rect.height parameter has a negative value.
278 result Construct(const Tizen::Graphics::Rectangle& rect, bool itemDivider, TableViewScrollBarStyle scrollStyle);
281 * Initializes this instance of %TableView with the specified parameters.
285 * @return An error code
286 * @param[in] rect An instance of the Tizen::Graphics::FloatRectangle class @n
287 * This instance represents the x and y coordinates of the left top corner of the created %TableView along with the width and height.
288 * @param[in] itemDivider Set to @c true to display an item divider, @n
290 * @param[in] scrollStyle The style of %TableView scroll bar style
291 * @exception E_SUCCESS The method is successful.
292 * @exception E_INVALID_ARG A specified input parameter is invalid, or either the @c rect.width or @c rect.height parameter has a negative value.
295 result Construct(const Tizen::Graphics::FloatRectangle& rect, bool itemDivider, TableViewScrollBarStyle scrollStyle);
298 * Sets the item provider that creates and deletes items for the simple style table view.
302 * @param[in] pProvider The item provider to create and delete items
304 * - If an item provider is not set for the table view, the table view does not work.
305 * - The specified provider should be allocated in heap memory.
306 * - To reset the item provider, pass @c null to @c pProvider.
308 void SetItemProvider(ITableViewItemProvider* pProvider);
311 * Sets the item provider that creates and deletes items for the simple style table view.
315 * @param[in] pProvider The item provider to create and delete items
317 * - If an item provider is not set for the table view, the table view does not work.
318 * - The specified provider should be allocated in heap memory.
319 * - To reset the item provider, pass @c null to @c pProvider.
321 void SetItemProviderF(ITableViewItemProviderF* pProvider);
324 * Begins the reordering mode.
328 * @see ITableViewViewItemEventListener::OnTableViewItemReordered()
330 void BeginReorderingMode(void);
333 * Ends the reordering mode.
337 * @see ITableViewViewItemEventListener::OnTableViewItemReordered()
339 void EndReorderingMode(void);
342 * Returns whether the %TableView control is in reordering mode or not.
346 * @return @c true if the %TableView is in reordering mode, @n
349 bool IsInReorderingMode(void) const;
352 * Adds a listener instance that listens to state changes of table view items. @n
353 * The added listener can listen to events on the specified event dispatcher's context when they are fired.
357 * @return An error code
358 * @param[in] listener The event listener to add
359 * @exception E_SUCCESS The method is successful.
360 * @exception E_OBJ_ALREADY_EXIST The listener is already added.
361 * @remarks The specified listener should be allocated in heap memory.
363 result AddTableViewItemEventListener(ITableViewItemEventListener& listener);
366 * Removes a listener instance that listens to state changes of table view items. @n
367 * The removed listener cannot listen to events when they are fired.
371 * @return An error code
372 * @param[in] listener The event listener to remove
373 * @exception E_SUCCESS The method is successful.
374 * @exception E_OBJ_NOT_FOUND The listener is not found.
376 result RemoveTableViewItemEventListener(ITableViewItemEventListener& listener);
379 * Adds a listener instance that listens to state changes of a fast scroll. @n
380 * The added listener can listen to events on the specified event dispatcher's context when they are fired.
384 * @return An error code
385 * @param[in] listener The event listener to add
386 * @exception E_SUCCESS The method is successful.
387 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
388 * @exception E_OBJ_ALREADY_EXIST The listener is already added.
389 * @remarks The specified listener should be allocated in heap memory.
391 result AddFastScrollListener(IFastScrollListener& listener);
394 * Removes a listener instance that listens to state changes of a fast scroll. @n
395 * The removed listener cannot listen to events when they are fired.
399 * @return An error code
400 * @param[in] listener The event listener to remove
401 * @exception E_SUCCESS The method is successful.
402 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
403 * @exception E_OBJ_NOT_FOUND The listener is not found.
405 result RemoveFastScrollListener(IFastScrollListener& listener);
408 * Adds a listener instance that listens to state changes of a scroll event. @n
409 * The added listener can listen to events on the specified event dispatcher's context when they are fired.
413 * @return An error code
414 * @param[in] listener The event listener to add
415 * @exception E_SUCCESS The method is successful.
416 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
417 * @exception E_OBJ_ALREADY_EXIST The listener is already added.
418 * @remarks The specified listener should be allocated in heap memory.
419 * @see IScrollEventListener::OnScrollEndReached()
420 * @see RemoveScrollEventListener()
422 result AddScrollEventListener(IScrollEventListener& listener);
425 * Removes a listener instance that listens to state changes of a scroll event. @n
426 * The removed listener cannot listen to events when they are fired.
430 * @return An error code
431 * @param[in] listener The event listener to remove
432 * @exception E_SUCCESS The method is successful.
433 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
434 * @exception E_OBJ_NOT_FOUND The listener is not found.
435 * @see IScrollEventListener::OnScrollEndReached()
436 * @see AddScrollEventListener()
438 result RemoveScrollEventListener(IScrollEventListener& listener);
441 * Adds a listener instance that listens to state changes of a scroll event. @n
442 * The added listener can listen to events on the specified event dispatcher's context when they are fired.
446 * @return An error code
447 * @param[in] listener The event listener to add
448 * @exception E_SUCCESS The method is successful.
449 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
450 * @exception E_OBJ_ALREADY_EXIST The listener is already added.
451 * @remarks The specified listener should be allocated in heap memory.
452 * @see IScrollEventListenerF::OnScrollEndReached()
453 * @see RemoveScrollEventListenerF()
455 result AddScrollEventListener(IScrollEventListenerF& listener);
458 * Removes a listener instance that listens to state changes of a scroll event. @n
459 * The removed listener cannot listen to events when they are fired.
463 * @return An error code
464 * @param[in] listener The event listener to remove
465 * @exception E_SUCCESS The method is successful.
466 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
467 * @exception E_OBJ_NOT_FOUND The listener is not found.
468 * @see IScrollEventListenerF::OnScrollEndReached()
469 * @see AddScrollEventListenerF()
471 result RemoveScrollEventListener(IScrollEventListenerF& listener);
474 * Sets the index table view of the scroll by texts.
478 * @return An error code
479 * @param[in] text The text of the index
480 * @param[in] useSearchIcon Set to @c true to show the magnifying icon, @n
482 * @exception E_SUCCESS The method is successful.
483 * @exception E_INVALID_ARG A specified input parameter is invalid.
484 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
486 result SetFastScrollIndex(const Tizen::Base::String& text, bool useSearchIcon);
489 * Gets the group and item indexes of the top item.
493 * @return The item index
494 * @exception E_SUCCESS The method is successful.
495 * @exception E_OBJ_NOT_FOUND Top drawn item is not found.
497 int GetTopDrawnItemIndex(void) const;
500 * Gets the group and item indexes of the bottom item.
504 * @return The item index
505 * @exception E_SUCCESS The method is successful.
506 * @exception E_OBJ_NOT_FOUND Bottom drawn item is not found.
508 int GetBottomDrawnItemIndex(void) const;
511 * Scrolls to the item at the specified index.
512 * The specified item is drawn at the position specified by the item alignment.
516 * @return An error code
517 * @param[in] itemIndex The targeted item index
518 * @param[in] itemAlignment The item alignment
519 * @exception E_SUCCESS The method is successful.
520 * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
521 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @b Since: @b 2.1
523 * - This method does not work inside the ITableViewItemProvider callback.
524 * - This method should be called only after %TableView items are created. If this method needs to be called early in the lifecycle of
525 * the %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
527 result ScrollToItem(int itemIndex, TableViewScrollItemAlignment itemAlignment = TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP);
530 * Checks or unchecks the item at the specified index.
534 * @return An error code
535 * @param[in] itemIndex The item index to check
536 * @param[in] check Set to @c true to select the item, @n
538 * @exception E_SUCCESS The method is successful.
539 * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
540 * @exception E_INVALID_OPERATION The item is disabled or the current state of the instance prohibits the execution of the specified operation.
542 * - This method works only when the annex style of the item allows selection.
543 * - This method does not work during the ITableViewItemProvider call-back procedure.
544 * - This method should be called only after %TableView items are created. If this method needs to be called early in the lifecycle of
545 * the %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
547 result SetItemChecked(int itemIndex, bool check);
550 * Returns whether the item at the specified index is selected or not.
554 * @return @c true if the item is selected, @n
556 * @param[in] itemIndex The item itemIndex
557 * @exception E_SUCCESS The method is successful.
558 * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
560 * - This method returns @c false, if the annex style of the item does not allow selection.
561 * - This method should be called only after %TableView items are created. If this method needs to be called early in the lifecycle of
562 * the %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
564 bool IsItemChecked(int itemIndex) const;
567 * Enables or disables the item at the specified index.
571 * @return An error code
572 * @param[in] itemIndex The item index
573 * @param[in] enable Set to @c true to enable the specified item, @n
575 * @exception E_SUCCESS The method is successful.
576 * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
577 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @b Since: @b 2.1
579 * - This method does not work during the ITableViewItemProvider call-back procedure.
580 * - This method should be called only after %TableView items are created. If this method needs to be called early in the lifecycle of
581 * the %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
583 result SetItemEnabled(int itemIndex, bool enable);
586 * Returns whether the item at the specified index is enabled or disabled.
590 * @return @c true if the item is enabled, @n
592 * @param[in] itemIndex The item index
593 * @exception E_SUCCESS The method is successful.
594 * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
596 * - This method should be called only after %TableView items are created.
597 * - If this method needs to be called early in the lifecycle of the
598 * %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
600 bool IsItemEnabled(int itemIndex) const;
603 * Counts all the items of the specified group.
607 * @return The total number of items
609 int GetItemCount(void) const;
612 * Updates the specified item. @n
613 * For instance, @c TABLE_VIEW_REFRESH_TYPE_ITEM_ADD is used when a new item needs to be added and
614 * @c TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE is used when an item is deleted from the
615 * table view. Moreover, @c TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY is used when the content of an existing item has changed and it
616 * needs to be updated. @n
617 * Note that calling the %RefreshAllItems() method with @c TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY invokes
618 * ITableViewItemProvider::UpdateItem() or ITableViewItemProviderF::UpdateItem() for the given index in sequence.
622 * @return An error code
623 * @param[in] itemIndex The item index
624 * @param[in] type The item to add, remove, or modify
625 * @exception E_SUCCESS The method is successful.
626 * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
627 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @b Since: @b 2.1
628 * @remarks This method does not work during the ITableViewItemProvider call-back procedure.
630 result RefreshItem(int itemIndex, TableViewRefreshType type);
633 * Updates all items of the table view. @n
634 * Note that calling the %RefreshAllItems() method invokes ITableViewItemProvider::UpdateItem() or ITableViewItemProviderF::UpdateItem() for all loaded items.
638 * @return An error code
639 * @exception E_SUCCESS The method is successful.
640 * @exception E_INVALID_OPERATION The %TableView item provider is processing the other request.
642 result RefreshAllItems(void);
645 * Updates all the items of a table view. @n
646 * This method deletes all the items in the table view and invokes the methods of the item provider again to update the table view.
650 * @exception E_SUCCESS The method is successful.
651 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @b Since: @b 2.1
653 * - This method will delete all the items and recreate them, so it should not be called from the inside of
654 * OnTableViewItemStateChanged() call-back as this leads to self deletion. If you need to update an Item, you should use RefreshItem() method.
655 * - This method should not be called from ITableViewItemProvider implementation because of recursion.
656 * - The specific error code can be accessed using the GetLastResult() method.
658 void UpdateTableView(void);
661 * Gets the index of the item at the specified position.
665 * @return The item index of the item on specified position
666 * @param[in] position The position of the item
668 * - This method returns @c -1 if no item is found at the given position.
669 * - This method should be called only after %TableView items are created.
670 * - If this method needs to be called early in the lifecycle of the %TableView,
671 * then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
673 int GetItemIndexFromPosition(const Tizen::Graphics::Point& position) const;
676 * Gets the index of the item at the specified position.
680 * @return The item index of the item on specified position
681 * @param[in] position The position of the item
683 * - This method returns @c -1 if no item is found at the given position.
684 * - This method should be called only after %TableView items are created.
685 ** - If this method needs to be called early in the lifecycle of the %TableView, then UpdateTableView() method should be called
686 * explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
688 int GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position) const;
691 * Sets the color of a division line between items.
695 * @return An error code
696 * @param[in] color The division line color
698 void SetItemDividerColor(const Tizen::Graphics::Color& color);
701 * Gets the color of a division line between items.
705 * @return The color of a division line
707 Tizen::Graphics::Color GetItemDividerColor(void) const;
710 * Sets the background color of this control.
714 * @param[in] color The background color
715 * @remarks The background bitmap has priority over the background color. When both the background bitmap and the background color are specified,
716 * only the bitmap image is displayed.
718 void SetBackgroundColor(const Tizen::Graphics::Color& color);
721 * Gets the background color of this control.
725 * @return The background color
727 Tizen::Graphics::Color GetBackgroundColor(void) const;
730 * Sets the scroll input handling mode.
734 * @param[in] mode The scroll input handling mode
735 * @see GetScrollInputMode()
737 void SetScrollInputMode(ScrollInputMode mode);
741 * Gets the scroll input handling mode.
745 * @return The scroll input handling mode
746 * @see SetScrollInputMode()
748 ScrollInputMode GetScrollInputMode(void) const;
751 * Scrolls the list contents by a specified number of pixels. @n When it is negative, it scrolls to opposite direction in current scroll style.
755 * @return An error code
756 * @param[in] pixel The amount of pixels to scroll
757 * @exception E_SUCCESS The method is successful.
758 * @exception E_OUT_OF_RANGE The specified @c pixel is out of range.
759 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
761 * - If you call this method with negative @c pixel when position of scroll is already top of contents then
762 * it will return @c E_OUT_OF_RANGE. @n
763 * Likewise, in case of positive @c pixel on the bottom position of scroll it will also return @c E_OUT_OF_RANGE.
764 * - This method does not work during the ITableViewItemProvider call-back procedure.
766 result ScrollByPixel(int pixel);
769 * Scrolls the list contents by a specified number of pixels. @n When it is negative, it scrolls to opposite direction in current scroll style.
773 * @return An error code
774 * @param[in] pixel The amount of pixels to scroll
775 * @exception E_SUCCESS The method is successful.
776 * @exception E_OUT_OF_RANGE The specified @c pixel is out of range.
777 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
779 * - If you call this method with negative @c pixel when position of scroll is already top of contents then it will
780 * return @c E_OUT_OF_RANGE. @n
781 * Likewise, in case of positive @c pixel on the bottom position of scroll it will also return @c E_OUT_OF_RANGE.
782 * - This method does not work during the ITableViewItemProvider call-back procedure.
784 result ScrollByPixel(float pixel);
787 * Gets the current scroll position.
791 int GetCurrentScrollPosition(void) const;
794 * Gets the current scroll position.
798 float GetCurrentScrollPositionF(void) const;
801 * Enables or disables the scroll of %TableView items.
805 void SetScrollEnabled(bool enable);
808 * Checks whether the scroll is enabled or disabled.
812 bool IsScrollEnabled(void) const;
815 * Opens the context item at a specified index.
819 * @return An error code
820 * @param[in] itemIndex The item index
821 * @exception E_SUCCESS The method is successful.
822 * @exception E_OUT_OF_RANGE The specified input parameter is invalid.
823 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
825 result OpenContextItem(int itemIndex);
828 * Closes the context item at a specified index.
832 * @return An error code
833 * @param[in] itemIndex The item index
834 * @exception E_SUCCESS The method is successful.
835 * @exception E_OUT_OF_RANGE The specified input parameter is invalid.
836 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
838 result CloseContextItem(int itemIndex);
841 * Checks whether the context item at a specified index is opened.
845 * @return @c true if the context item is opened, @n
847 * @param[in] itemIndex The item index
848 * @exception E_SUCCESS The method is successful.
849 * @exception E_OUT_OF_RANGE The specified input parameter is invalid.
851 bool IsContextItemOpened(int itemIndex) const;
854 friend class _TableViewImpl;
856 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
857 TableView(const TableView& rhs);
859 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
860 TableView& operator =(const TableView& rhs);
863 }}} // Tizen::Ui::Controls
865 #endif // _FUI_CTRL_TABLE_VIEW_H_