|
@@ -37,6 +37,19 @@ public:
|
|
|
SCROLL_BOTH = SCROLL_HORIZONTAL | SCROLL_VERTICAL
|
|
SCROLL_BOTH = SCROLL_HORIZONTAL | SCROLL_VERTICAL
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Defines supported focus chagne directions.
|
|
|
|
|
+ */
|
|
|
|
|
+ enum Direction
|
|
|
|
|
+ {
|
|
|
|
|
+ UP = 0x01,
|
|
|
|
|
+ DOWN = 0x02,
|
|
|
|
|
+ LEFT = 0x04,
|
|
|
|
|
+ RIGHT = 0x08,
|
|
|
|
|
+ NEXT = 0x10,
|
|
|
|
|
+ PREVIOUS = 0x20
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* Creates a new container.
|
|
* Creates a new container.
|
|
|
*
|
|
*
|
|
@@ -245,6 +258,15 @@ public:
|
|
|
*/
|
|
*/
|
|
|
bool setFocus();
|
|
bool setFocus();
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Attempts to switch focus to a child of this container in the specified direction.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param direction The direction for focus change.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return True on success, false if there are no controls to focus on.
|
|
|
|
|
+ */
|
|
|
|
|
+ bool moveFocus(Direction direction);
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* Returns the currently active control for this container.
|
|
* Returns the currently active control for this container.
|
|
|
*
|
|
*
|
|
@@ -546,22 +568,8 @@ private:
|
|
|
*/
|
|
*/
|
|
|
Container(const Container& copy);
|
|
Container(const Container& copy);
|
|
|
|
|
|
|
|
- enum Direction
|
|
|
|
|
- {
|
|
|
|
|
- UP = 0x01,
|
|
|
|
|
- DOWN = 0x02,
|
|
|
|
|
- LEFT = 0x04,
|
|
|
|
|
- RIGHT = 0x08,
|
|
|
|
|
- NEXT = 0x10,
|
|
|
|
|
- PREVIOUS = 0x20
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
static const int MAX_CONTACT_INDICES = 10;
|
|
static const int MAX_CONTACT_INDICES = 10;
|
|
|
|
|
|
|
|
- // Returns true on success; false if there are no controls to focus on,
|
|
|
|
|
- // in which case scrolling can be initiated.
|
|
|
|
|
- bool moveFocus(Direction direction);
|
|
|
|
|
-
|
|
|
|
|
bool moveFocusNextPrevious(Direction direction);
|
|
bool moveFocusNextPrevious(Direction direction);
|
|
|
bool moveFocusDirectional(Direction direction);
|
|
bool moveFocusDirectional(Direction direction);
|
|
|
|
|
|