2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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 FUiCtrlContextMenu.h
20 * @brief This is the header file for the %ContextMenu class.
22 * This header file contains the declarations of the %ContextMenu class and its helper classes.
25 #ifndef _FUI_CTRL_CONTEXT_MENU_H_
26 #define _FUI_CTRL_CONTEXT_MENU_H_
28 #include <FBaseObject.h>
29 #include <FBaseTypes.h>
30 #include <FBaseString.h>
31 #include <FGrpBitmap.h>
32 #include <FGrpRectangle.h>
33 #include <FUiWindow.h>
34 #include <FUiContainer.h>
35 #include <FUiIActionEventListener.h>
37 namespace Tizen { namespace Graphics
43 namespace Tizen { namespace Ui { namespace Controls
47 * @enum ContextMenuStyle
49 * Defines the %ContextMenu style.
55 CONTEXT_MENU_STYLE_LIST,/**< The style of the vertical list of image + text */
56 CONTEXT_MENU_STYLE_GRID,/**< The style of the grid of buttons */
57 CONTEXT_MENU_STYLE_ICON /**<@if OSPDEPREC @deprecated This enum value is deprecated because this style can be implemented using the CONTEXT_MENU_STYLE_GRID style @endif */
61 * @enum ContextMenuItemStatus
63 * Defines the possible states of the %ContextMenu control item.
67 enum ContextMenuItemStatus
69 CONTEXT_MENU_ITEM_STATUS_NORMAL, /**< The normal state */
70 CONTEXT_MENU_ITEM_STATUS_PRESSED, /**< The pressed state */
71 CONTEXT_MENU_ITEM_STATUS_HIGHLIGHTED /**< The highlighted state */
75 * @enum ContextMenuAnchorDirection
77 * Defines the direction of the %ContextMenu control.
81 enum ContextMenuAnchorDirection
83 CONTEXT_MENU_ANCHOR_DIRECTION_LEFTWARD, /**< The anchor arrow direction is leftward */
84 CONTEXT_MENU_ANCHOR_DIRECTION_RIGHTWARD,/**< The anchor arrow direction is rightward */
85 CONTEXT_MENU_ANCHOR_DIRECTION_UPWARD, /**< The anchor arrow direction is upward */
86 CONTEXT_MENU_ANCHOR_DIRECTION_DOWNWARD, /**< The anchor arrow direction is downward */
87 CONTEXT_MENU_ANCHOR_DIRECTION_AUTO /**< The anchor arrow direction is auto */
92 * @brief This class defines the common behavior of a %ContextMenu control.
96 * The %ContextMenu class displays a special purpose window that is used to present users with context-sensitive options.
98 * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_contextmenus.htm">ContextMenu</a>.
100 * The following example demonstrates how to use the %ContextMenu class.
104 // Sample code for ContextMenuSample.h
106 class ContextMenuSample
107 : public Tizen::Ui::Controls::Form
108 , public Tizen::Ui::IActionEventListener
111 ContextMenuSample(void)
112 :__pContextMenu(null){}
114 bool Initialize(void);
115 void ShowContextMenu(bool show);
116 virtual result OnInitializing(void);
117 virtual result OnTerminating(void);
119 // IActionEventListener
120 virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
123 static const int ID_CONTEXTMENU_ITEM1 = 101;
124 static const int ID_CONTEXTMENU_ITEM2 = 102;
125 static const int ID_BTN_SHOW_CONTEXTMENU = 103;
127 Tizen::Ui::Controls::ContextMenu *__pContextMenu;
134 // Sample code for ContextMenuSample.cpp
135 #include <FGraphics.h>
137 #include "ContextMenuSample.h"
139 using namespace Tizen::Graphics;
140 using namespace Tizen::Ui::Controls;
143 ContextMenuSample::Initialize(void)
145 Construct(FORM_STYLE_NORMAL);
150 ContextMenuSample::OnInitializing(void)
152 result r = E_SUCCESS;
154 // Creates an instance of ContextMenu
155 __pContextMenu = new ContextMenu();
156 __pContextMenu->Construct(Point(400, 150), CONTEXT_MENU_STYLE_LIST);
158 __pContextMenu->AddItem(L"Item1", ID_CONTEXTMENU_ITEM1);
159 __pContextMenu->AddItem(L"Item2", ID_CONTEXTMENU_ITEM2);
160 __pContextMenu->AddActionEventListener(*this);
162 // Creates an instance of Button to show the context menu
163 Button* pButton = new Button();
164 pButton->Construct(Rectangle(50, 50, 400, 100), L"Show ContextMenu");
165 pButton->SetActionId(ID_BTN_SHOW_CONTEXTMENU);
166 pButton->AddActionEventListener(*this);
168 // Adds the button to the form
169 AddControl(*pButton);
174 // Sets the anchor position of the context menu
176 ContextMenuSample::ShowContextMenu(bool show)
178 __pContextMenu->SetAnchorPosition(Point(300, 200));
180 // Change to desired show state
181 __pContextMenu->SetShowState(show);
183 //Calls Show() of the control
186 __pContextMenu->Show();
195 ContextMenuSample::OnTerminating(void)
197 result r = E_SUCCESS;
199 // Deallocates the __pContextMenu
200 __pContextMenu->Destroy();
205 // IActionEventListener implementation
207 ContextMenuSample::OnActionPerformed(const Control& source, int actionId)
211 case ID_CONTEXTMENU_ITEM1:
216 case ID_CONTEXTMENU_ITEM2:
221 case ID_BTN_SHOW_CONTEXTMENU:
223 ShowContextMenu(true);
233 class _OSP_EXPORT_ ContextMenu
234 : public Tizen::Ui::Window
239 * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor.
247 * This destructor overrides Tizen::Base::Object::~Object().
252 virtual ~ContextMenu(void);
255 * Initializes this instance of %ContextMenu with the specified parameters.
259 * @return An error code
260 * @param[in] point The x and y coordinates of the anchor of %ContextMenu
261 * @param[in] style The context menu style
262 * @exception E_SUCCESS The method is successful.
263 * @exception E_INVALID_STATE This instance has already been constructed.
264 * @exception E_SYSTEM A system error has occurred.
266 result Construct(const Tizen::Graphics::Point& point, ContextMenuStyle style);
269 * Initializes this instance of %ContextMenu with the specified parameters.
273 * @return An error code
274 * @param[in] point The x and y coordinates of the anchor of %ContextMenu
275 * @param[in] style The context menu style
276 * @exception E_SUCCESS The method is successful.
277 * @exception E_INVALID_STATE This instance has already been constructed.
278 * @exception E_SYSTEM A system error has occurred.
280 result Construct(const Tizen::Graphics::FloatPoint& point, ContextMenuStyle style);
283 * Initializes this instance of %ContextMenu with the specified parameters.
287 * @return An error code
288 * @param[in] point The x and y coordinates of the anchor of the %ContextMenu control
289 * @param[in] style The context menu style
290 * @param[in] direction The anchor arrow direction
291 * @exception E_SUCCESS The method is successful.
292 * @exception E_INVALID_STATE This instance has already been constructed.
293 * @exception E_SYSTEM A system error has occurred.
295 result Construct(const Tizen::Graphics::Point& point, ContextMenuStyle style, ContextMenuAnchorDirection direction);
298 * Initializes this instance of %ContextMenu with the specified parameters.
302 * @return An error code
303 * @param[in] point The x and y coordinates of the anchor of the %ContextMenu control
304 * @param[in] style The context menu style
305 * @param[in] direction The anchor arrow direction
306 * @exception E_SUCCESS The method is successful.
307 * @exception E_INVALID_STATE This instance has already been constructed.
308 * @exception E_SYSTEM A system error has occurred.
310 result Construct(const Tizen::Graphics::FloatPoint& point, ContextMenuStyle style, ContextMenuAnchorDirection direction);
313 * Adds a listener instance.
314 * The added listener can listen to events on the given context of the event dispatcher when they are fired.
318 * @param[in] listener The event listener to add
320 void AddActionEventListener(Tizen::Ui::IActionEventListener& listener);
323 * Removes the specified listener instance.
324 * The removed listener cannot listen to events when they are fired.
328 * @param[in] listener The event listener to remove
330 void RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener);
335 * Appends the specified item at the end of the %ContextMenu control.
339 * @return An error code
340 * @param[in] normalBitmap The normal bitmap of the item
341 * @param[in] pPressedBitmap The pressed bitmap of the item
342 * @param[in] actionId The action ID for this item
343 * @exception E_SUCCESS The method is successful.
344 * @exception E_MAX_EXCEEDED The number of items has exceeded the maximum limit.
345 * @exception E_SYSTEM A system error has occurred.
346 * @remarks This method can only be used when the style of the context menu is @c CONTEXT_MENU_STYLE_GRID.
348 result AddItem(const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, int actionId);
351 * Appends the specified item at the end of the %ContextMenu control.
355 * @return An error code
356 * @param[in] normalBitmap The normal bitmap of the item
357 * @param[in] pPressedBitmap The pressed bitmap of the item
358 * @param[in] pHighlightedBitmap The highlighted bitmap of the item
359 * @param[in] actionId The action ID for this item
360 * @exception E_SUCCESS The method is successful.
361 * @exception E_MAX_EXCEEDED The number of items has exceeded the maximum limit.
362 * @exception E_SYSTEM A system error has occurred.
363 * @remarks This method can only be used when the style of the context menu is @c CONTEXT_MENU_STYLE_GRID. @n
364 * When a user navigates the user interface using the directional keys, the selected UI control is highlighted and the control takes the
367 result AddItem(const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap, int actionId);
370 * Appends the specified item at the end of the %ContextMenu control.
374 * @return An error code
375 * @param[in] text The string of the item to append
376 * @param[in] actionId The specified action ID for this item
377 * @exception E_SUCCESS The method is successful.
378 * @exception E_MAX_EXCEEDED The number of items has exceeded the maximum limit.
379 * @exception E_SYSTEM A system error has occurred.
381 result AddItem(const Tizen::Base::String& text, int actionId);
384 * Appends the specified item at the end of the %ContextMenu control.
388 * @return An error code
389 * @param[in] text The string of the item to append
390 * @param[in] actionId The specified action ID for this item
391 * @param[in] normalBitmap The normal bitmap of the item
392 * @param[in] pPressedBitmap The pressed bitmap of the item
393 * @param[in] pHighlightedBitmap The highlighted bitmap of the item
394 * @exception E_SUCCESS The method is successful.
395 * @exception E_MAX_EXCEEDED The total number of items has exceeded the maximum limit.
396 * @exception E_SYSTEM A system error has occurred.
397 * @remarks This method can only be used when the style of the context menu is @c CONTEXT_MENU_STYLE_LIST.
399 result AddItem(const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap = null, const Tizen::Graphics::Bitmap* pHighlightedBitmap = null);
402 * Inserts the specified item at the given index of the %ContextMenu control.
406 * @return An error code
407 * @param[in] index The location
408 * @param[in] normalBitmap The normal bitmap of the item
409 * @param[in] pPressedBitmap The pressed bitmap of the item
410 * @param[in] actionId The specified action ID for this item
411 * @exception E_SUCCESS The method is successful.
412 * @exception E_MAX_EXCEEDED The number of items has exceeded the maximum limit.
413 * @exception E_OUT_OF_RANGE The specified @c index is less than @c 0 or greater than the number of items in %ContextMenu.
414 * @exception E_SYSTEM A system error has occurred.
415 * @remarks This method can only be used when the style of the context menu is @c CONTEXT_MENU_STYLE_GRID. @n
416 * The %ContextMenu control can have a maximum of 3 icons.
418 result InsertItemAt(int index, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, int actionId);
421 * Inserts the specified item at the given index of the %ContextMenu control.
425 * @return An error code
426 * @param[in] index The location
427 * @param[in] normalBitmap The normal bitmap of the item
428 * @param[in] pPressedBitmap The pressed bitmap of the item
429 * @param[in] pHighlightedBitmap The highlighted bitmap of the item
430 * @param[in] actionId The specified action ID for this item
431 * @exception E_SUCCESS The method is successful.
432 * @exception E_MAX_EXCEEDED The number of items has exceeded the maximum limit.
433 * @exception E_OUT_OF_RANGE The specified @c index is less than @c 0 or greater than the number of items in %ContextMenu.
434 * @exception E_SYSTEM A system error has occurred.
435 * @remarks This method can only be used when the style of the context menu is @c CONTEXT_MENU_STYLE_GRID. @n
436 * @remarks When a user navigates the user interface using the directional keys, the selected UI control is highlighted and the control takes the focus.
438 result InsertItemAt(int index, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap, int actionId);
441 * Inserts the specified item at the given index of the %ContextMenu control.
445 * @return An error code
446 * @param[in] index The location
447 * @param[in] text The string of the item to set
448 * @param[in] actionId The specified action ID for this item
449 * @exception E_SUCCESS The method is successful.
450 * @exception E_MAX_EXCEEDED The number of items has exceeded the maximum limit.
451 * @exception E_OUT_OF_RANGE The specified @c index is less than @c 0 or greater than the number of items in %ContextMenu.
452 * @exception E_SYSTEM A system error has occurred.
454 result InsertItemAt(int index, const Tizen::Base::String& text, int actionId);
457 * Inserts the specified item at the given index of the %ContextMenu control.
461 * @return An error code
462 * @param[in] index The location
463 * @param[in] text The string of the item to set
464 * @param[in] actionId The specified action ID for this item
465 * @param[in] normalBitmap The normal bitmap of the item
466 * @param[in] pPressedBitmap The pressed bitmap of the item
467 * @param[in] pHighlightedBitmap The highlighted bitmap of the item
468 * @exception E_SUCCESS The method is successful.
469 * @exception E_MAX_EXCEEDED The number of items has exceeded the maximum limit.
470 * @exception E_OUT_OF_RANGE The specified @c index is less than @c 0 or greater than the number of items in %ContextMenu.
471 * @exception E_SYSTEM A system error has occurred.
472 * @remarks This method can only be used when the style of the context menu is @c CONTEXT_MENU_STYLE_LIST.
474 result InsertItemAt(int index, const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap = null, const Tizen::Graphics::Bitmap* pHighlightedBitmap = null);
477 * Sets the specified item at the given index of the %ContextMenu control.
481 * @return An error code
482 * @param[in] index The location
483 * @param[in] normalBitmap The normal bitmap of the item
484 * @param[in] pPressedBitmap The pressed bitmap of the item
485 * @param[in] actionId The action ID for this item
486 * @exception E_SUCCESS The method is successful.
487 * @exception E_OUT_OF_RANGE The specified @c index is less than @c 0 or greater than the number of items in %ContextMenu.
488 * @exception E_SYSTEM A system error has occurred.
489 * @remarks This method can only be used when the style of the context menu is @c CONTEXT_MENU_STYLE_GRID.
491 result SetItemAt(int index, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, int actionId);
494 * Sets the specified item at the given index of the %ContextMenu control.
498 * @return An error code
499 * @param[in] index The location
500 * @param[in] normalBitmap The normal bitmap of the item
501 * @param[in] pPressedBitmap The pressed bitmap of the item
502 * @param[in] pHighlightedBitmap The highlighted bitmap of the item
503 * @param[in] actionId The action ID for this item
504 * @exception E_SUCCESS The method is successful.
505 * @exception E_OUT_OF_RANGE The specified @c index is less than @c 0 or greater than the number of items in %ContextMenu.
506 * @exception E_SYSTEM A system error has occurred.
507 * @remarks This method can only be used when the style of the context menu is @c CONTEXT_MENU_STYLE_GRID. @n
508 * @remarks When a user navigates the user interface using the directional keys, @n
509 * the selected UI control is highlighted and the control takes the focus.
511 result SetItemAt(int index, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap, int actionId);
514 * Sets the specified item at the given index of the %ContextMenu control.
518 * @return An error code
519 * @param[in] index The location
520 * @param[in] text The string of the item to set
521 * @param[in] actionId The action ID for this item
522 * @exception E_SUCCESS The method is successful.
523 * @exception E_OUT_OF_RANGE The specified @c index less than @c 0 or greater than the number of items in %ContextMenu.
524 * @exception E_SYSTEM A system error has occurred.
526 result SetItemAt(int index, const Tizen::Base::String& text, int actionId);
529 * Sets the specified item at the given index of the %ContextMenu control.
533 * @return An error code
534 * @param[in] index The location
535 * @param[in] text The string of the item to set
536 * @param[in] actionId The action ID for this item
537 * @param[in] normalBitmap The normal bitmap of the item
538 * @param[in] pPressedBitmap The pressed bitmap of the item
539 * @param[in] pHighlightedBitmap The highlighted bitmap of the item
540 * @exception E_SUCCESS The method is successful.
541 * @exception E_OUT_OF_RANGE The specified @c index less than @c 0 or greater than the number of items in %ContextMenu.
542 * @exception E_SYSTEM A system error has occurred.
543 * @remarks This method can only be used when the style of the context menu is @c CONTEXT_MENU_STYLE_LIST.
545 result SetItemAt(int index, const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap = null, const Tizen::Graphics::Bitmap* pHighlightedBitmap = null);
548 * Removes the item at the specified index from the %ContextMenu control.
552 * @return An error code
553 * @param[in] index The location
554 * @exception E_SUCCESS The method is successful.
555 * @exception E_OUT_OF_RANGE The specified @c index less than @c 0 or greater than the number of items in %ContextMenu.
556 * @exception E_SYSTEM A system error has occurred.
558 result RemoveItemAt(int index);
561 * Removes all items from the %ContextMenu control.
565 * @exception E_SUCCESS The method is successful.
566 * @exception E_SYSTEM A system error has occurred.
568 result RemoveAllItems(void);
571 * Gets the number of items of the %ContextMenu control.
575 * @return The number of items registered for %ContextMenu, @n
576 * else @c -1 if an error occurs
578 int GetItemCount(void) const;
581 * Gets the index of the item with the specified action ID.
585 * @return The index of the item, @n
586 * else @c -1 if an error occurs
587 * @param[in] actionId The action ID
589 int GetItemIndexFromActionId(int actionId) const;
592 * Gets the action ID of the item at the specified index.
596 * @return The action ID of the item, @n
597 * else @c -1 if the specified index is invalid
598 * @param[in] index The index of the item
600 int GetItemActionIdAt(int index) const;
603 * Gets the item text color of the %ContextMenu control for the specified status.
607 * @return The item text color, @n
608 * else RGBA (0,0,0,0) if an error occurs
609 * @param[in] status The item status
611 Tizen::Graphics::Color GetItemTextColor(ContextMenuItemStatus status) const;
614 * Sets the item text color of the %ContextMenu control for the specified status.
618 * @return An error code
619 * @param[in] status The item status
620 * @param[in] color The item text color to set
621 * @exception E_SUCCESS The method is successful.
622 * @exception E_INVALID_ARG A specified input parameter is invalid.
623 * @exception E_SYSTEM A system error has occurred.
625 result SetItemTextColor(ContextMenuItemStatus status, const Tizen::Graphics::Color& color);
628 * Sets the position of the anchor.
632 * @return An error code
633 * @param[in] position The new position
634 * @exception E_SUCCESS The method is successful.
635 * @exception E_INVALID_STATE This instance is in an invalid state.
636 * @remarks The x and y coordinates of the anchor are defined in the coordinate space of its parent,
637 * which means that @c x and @c y must be defined relative to the top-left corner (0,0) of its parent.
639 result SetAnchorPosition(const Tizen::Graphics::Point& position);
642 * Sets the position of the anchor.
646 * @return An error code
647 * @param[in] position The new position
648 * @exception E_SUCCESS The method is successful.
649 * @exception E_INVALID_STATE This instance is in an invalid state.
650 * @remarks The x and y coordinates of the anchor are defined in the coordinate space of its parent,
651 * which means that @c x and @c y must be defined relative to the top-left corner (0,0) of its parent.
653 result SetAnchorPosition(const Tizen::Graphics::FloatPoint& position);
656 * Gets the position of the anchor.
660 * @return The position of the anchor
661 * @remarks The coordinate of the anchor position is defined from the top-left corner of its parent Container.
663 Tizen::Graphics::Point GetAnchorPosition(void) const;
666 * Gets the position of the anchor.
670 * @return The position of the anchor
671 * @remarks The coordinate of the anchor position is defined from the top-left corner of its parent Container.
673 Tizen::Graphics::FloatPoint GetAnchorPositionF(void) const;
676 * Gets the color of the %ContextMenu control.
680 * @return The color of %ContextMenu control, @n
681 * else RGBA(0, 0, 0, 0) if an error occurs
684 Tizen::Graphics::Color GetColor(void) const;
687 * Sets the color of the %ContextMenu control.
691 * @return An error code
692 * @param[in] color The color to set
693 * @exception E_SUCCESS The method is successful.
694 * @exception E_INVALID_STATE This instance is in an invalid state.
695 * @exception E_SYSTEM A system error has occurred.
698 result SetColor(const Tizen::Graphics::Color& color);
701 * Gets the item color for the specified status.
705 * @return The color of %ContextMenu control, @n
706 * else RGBA(0, 0, 0, 0) if an error occurs
707 * @param[in] status The menu item status
708 * @exception E_SUCCESS The method is successful.
709 * @exception E_INVALID_ARG The specified input parameter is invalid. @n
710 * The item color for @c CONTEXT_MENU_ITEM_STATUS_NORMAL is not supported.
711 * @exception E_INVALID_STATE This instance is in an invalid state.
712 * @exception E_SYSTEM A system error has occurred.
713 * @remarks The specific error code can be accessed using the GetLastResult() method. @n
714 * The item color for the @c CONTEXT_MENU_ITEM_STATUS_NORMAL status is always the same as the color of the %ContextMenu control.
715 * @see SetItemColor()
717 Tizen::Graphics::Color GetItemColor(ContextMenuItemStatus status) const;
720 * Sets the item color for the specified status.
724 * @return An error code
725 * @param[in] status The menu item status
726 * @param[in] color The color to set
727 * @exception E_SUCCESS The method is successful.
728 * @exception E_INVALID_ARG The specified input parameter is invalid. @n
729 * The item color for @c CONTEXT_MENU_ITEM_STATUS_NORMAL is not supported.
730 * @exception E_INVALID_STATE This instance is in an invalid state.
731 * @exception E_SYSTEM A system error has occurred.
732 * @remarks The item color for the @c CONTEXT_MENU_ITEM_STATUS_NORMAL status is always the same as the color of the %ContextMenu control.
733 * @see GetItemColor()
735 result SetItemColor(ContextMenuItemStatus status, const Tizen::Graphics::Color& color);
738 * Gets maximum number of visible items.
742 * @return The maximum number of visible items, @n
743 * else @c -1 if an error occurs
744 * @see SetMaxVisibleItemsCount()
746 int GetMaxVisibleItemsCount(void) const;
749 * Sets maximum number of visible items.
753 * @return An error code
754 * @param[in] maxItemsCount The maximum number of the visible menu items
755 * @exception E_SUCCESS The method is successful.
756 * @exception E_OUT_OF_RANGE The specified @c parameter is out of possible range.
757 * @exception E_INVALID_STATE This instance is in an invalid state.
758 * @exception E_SYSTEM A system error has occurred.
759 * @remarks @c maxItemsCount should be greater than @c 0 and less than @c 8. The default value for
760 * the maximum number of the visible menu items is @c 4.
761 * @see GetMaxVisibleItemsCount()
763 result SetMaxVisibleItemsCount(int maxItemsCount);
766 friend class _ContextMenuImpl;
769 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
774 ContextMenu(const ContextMenu& rhs);
777 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
782 ContextMenu& operator =(const ContextMenu& rhs);
785 }}} // Tizen::Ui: Control
787 #endif // _FUI_CTRL_CONTEXT_MENU_H_