Ejemplo n.º 1
0
 /// <summary>
 /// Creates a ContextPopupDirectionPriorities structure.
 /// </summary>
 /// <param name="first">The first direction priority.</param>
 /// <param name="second">The second direction priority.</param>
 /// <param name="third">The third direction priority.</param>
 /// <param name="fourth">The fourth direction priority.</param>
 public ContextPopupDirectionPriorities(ContextPopupDirection first, ContextPopupDirection second, ContextPopupDirection third, ContextPopupDirection fourth)
 {
     First  = first;
     Second = second;
     Third  = third;
     Fourth = fourth;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Gets the direction priority of a ContextPopup.
 /// </summary>
 /// <param name="first">1st priority of direction to be returned</param>
 /// <param name="second">2nd priority of direction to be returned</param>
 /// <param name="third">2nd priority of direction to be returned </param>
 /// <param name="fourth">4th priority of direction to be returned</param>
 /// <since_tizen> preview </since_tizen>
 public void GetDirectionPriority(out ContextPopupDirection first, out ContextPopupDirection second, out ContextPopupDirection third, out ContextPopupDirection fourth)
 {
     int firstOut, secondOut, thirdOut, fourthOut;
     Interop.Elementary.elm_ctxpopup_direction_priority_get(Handle, out firstOut, out secondOut, out thirdOut, out fourthOut);
     first = (ContextPopupDirection)firstOut;
     second = (ContextPopupDirection)secondOut;
     third = (ContextPopupDirection)thirdOut;
     fourth = (ContextPopupDirection)fourthOut;
 }
        /// <summary>
        /// Gets the direction of the ContextPopup if it is shown.
        /// This method returns false if it is not shown and the output argument is a default value.
        /// </summary>
        /// <param name="direction">The direction of the ContextPopup.</param>
        /// <returns>True if the ContextPopup is shown, false otherwise.</returns>
        public bool TryGetContextPopupDirection(out ContextPopupDirection direction)
        {
            var nativeDirection = _popup.Direction;

            if (nativeDirection != EContextPopupDirection.Unknown)
            {
                direction = (ContextPopupDirection)nativeDirection;
                return(true);
            }
            else
            {
                direction = default(ContextPopupDirection);
                return(false);
            }
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Gets the direction of the ContextPopup if it is shown.
 /// This method returns false if it is not shown and the output argument is a default value.
 /// </summary>
 /// <param name="direction">The direction of the ContextPopup.</param>
 /// <returns>True if the ContextPopup is shown, false otherwise.</returns>
 public bool TryGetContextPopupDirection(out ContextPopupDirection direction)
 {
     direction = default(ContextPopupDirection);
     return(_contextPopup.TryGetContextPopupDirection(out direction));
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Gets the possibility that the direction would be available.
 /// </summary>
 /// <param name="direction">A direction that the user wants to check.</param>
 /// <returns>
 /// Get false if you cannot put it in the direction. Get true if it's possible.
 /// </returns>
 /// <since_tizen> preview </since_tizen>
 public bool IsAvailableDirection(ContextPopupDirection direction)
 {
     return(Interop.Elementary.elm_ctxpopup_direction_available_get(RealHandle, (int)direction));
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Sets the direction priority of a ContextPopup.
 /// </summary>
 /// <param name="first">1st priority of the direction.</param>
 /// <param name="second">2nd priority of the direction.</param>
 /// <param name="third">3th priority of the direction.</param>
 /// <param name="fourth">4th priority of the direction.</param>
 /// <since_tizen> preview </since_tizen>
 public void SetDirectionPriorty(ContextPopupDirection first, ContextPopupDirection second, ContextPopupDirection third, ContextPopupDirection fourth)
 {
     Interop.Elementary.elm_ctxpopup_direction_priority_set(RealHandle, (int)first, (int)second, (int)third, (int)fourth);
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Gets the possibility that the direction would be available.
 /// </summary>
 /// <param name="direction">A direction that the user wants to check.</param>
 /// <returns>
 /// Get false if you cannot put it in the direction. Get true if it's possible.
 /// </returns>
 /// <since_tizen> preview </since_tizen>
 /// [Obsolete("IsAvailableDirection is obsolete as of API6 and is no longer supported.")]
 public bool IsAvailableDirection(ContextPopupDirection direction)
 {
     Console.WriteLine("ContextPopup.IsAvailableDirection is obsolete as of API6 and is no longer supported.");
     return(false);
 }