Commit 8ab0decf971a6605ded520fe0a636a1a0affdf2e
[dali_1.2.20] Merge branch 'devel/master'
Change-Id: I880ca0bb1ec5c8a3b006a671053ee69ced1424dc
Showing
28 changed files
with
597 additions
and
6 deletions
build/tizen/CMakeLists.txt
| @@ -105,6 +105,7 @@ CONFIGURE_FILE( ${LOCAL_STYLE_DIR}/contact-cards-example-theme.json.in ${LOCAL_S | @@ -105,6 +105,7 @@ CONFIGURE_FILE( ${LOCAL_STYLE_DIR}/contact-cards-example-theme.json.in ${LOCAL_S | ||
| 105 | CONFIGURE_FILE( ${LOCAL_STYLE_DIR}/style-example-theme-one.json.in ${LOCAL_STYLE_DIR}/style-example-theme-one.json ) | 105 | CONFIGURE_FILE( ${LOCAL_STYLE_DIR}/style-example-theme-one.json.in ${LOCAL_STYLE_DIR}/style-example-theme-one.json ) |
| 106 | CONFIGURE_FILE( ${LOCAL_STYLE_DIR}/style-example-theme-two.json.in ${LOCAL_STYLE_DIR}/style-example-theme-two.json ) | 106 | CONFIGURE_FILE( ${LOCAL_STYLE_DIR}/style-example-theme-two.json.in ${LOCAL_STYLE_DIR}/style-example-theme-two.json ) |
| 107 | CONFIGURE_FILE( ${LOCAL_STYLE_DIR}/style-example-theme-three.json.in ${LOCAL_STYLE_DIR}/style-example-theme-three.json ) | 107 | CONFIGURE_FILE( ${LOCAL_STYLE_DIR}/style-example-theme-three.json.in ${LOCAL_STYLE_DIR}/style-example-theme-three.json ) |
| 108 | +CONFIGURE_FILE( ${LOCAL_STYLE_DIR}/tooltip-example-theme.json.in ${LOCAL_STYLE_DIR}/tooltip-example-theme.json ) | ||
| 108 | MESSAGE("Configured ${LOCAL_STYLE_DIR}/style-example-theme<>.json files") | 109 | MESSAGE("Configured ${LOCAL_STYLE_DIR}/style-example-theme<>.json files") |
| 109 | 110 | ||
| 110 | FILE(GLOB LOCAL_STYLES_LIST "${LOCAL_STYLE_DIR}/*.json") | 111 | FILE(GLOB LOCAL_STYLES_LIST "${LOCAL_STYLE_DIR}/*.json") |
com.samsung.dali-demo.xml
| @@ -178,4 +178,10 @@ | @@ -178,4 +178,10 @@ | ||
| 178 | <ui-application appid="transitions.example" exec="/usr/apps/com.samsung.dali-demo/bin/transitions.example" nodisplay="true" multiple="false" type="c++app" taskmanage="true"> | 178 | <ui-application appid="transitions.example" exec="/usr/apps/com.samsung.dali-demo/bin/transitions.example" nodisplay="true" multiple="false" type="c++app" taskmanage="true"> |
| 179 | <label>Visual Transitions</label> | 179 | <label>Visual Transitions</label> |
| 180 | </ui-application> | 180 | </ui-application> |
| 181 | + <ui-application appid="animated-images.example" exec="/usr/apps/com.samsung.dali-demo/bin/animated-images.example" nodisplay="true" multiple="false" type="c++app" taskmanage="true"> | ||
| 182 | + <label>Animated images</label> | ||
| 183 | + </ui-application> | ||
| 184 | + <ui-application appid="tooltip.example" exec="/usr/apps/com.samsung.dali-demo/bin/tooltip.example" nodisplay="true" multiple="false" type="c++app" taskmanage="true"> | ||
| 185 | + <label>Tooltip</label> | ||
| 186 | + </ui-application> | ||
| 181 | </manifest> | 187 | </manifest> |
demo/dali-demo.cpp
| @@ -36,6 +36,7 @@ int DALI_EXPORT_API main(int argc, char **argv) | @@ -36,6 +36,7 @@ int DALI_EXPORT_API main(int argc, char **argv) | ||
| 36 | // Create the demo launcher | 36 | // Create the demo launcher |
| 37 | DaliTableView demo(app); | 37 | DaliTableView demo(app); |
| 38 | 38 | ||
| 39 | + demo.AddExample(Example("animated-images.example", DALI_DEMO_STR_TITLE_ANIMATED_IMAGES)); | ||
| 39 | demo.AddExample(Example("animated-shapes.example", DALI_DEMO_STR_TITLE_ANIMATED_SHAPES)); | 40 | demo.AddExample(Example("animated-shapes.example", DALI_DEMO_STR_TITLE_ANIMATED_SHAPES)); |
| 40 | demo.AddExample(Example("bubble-effect.example", DALI_DEMO_STR_TITLE_BUBBLES)); | 41 | demo.AddExample(Example("bubble-effect.example", DALI_DEMO_STR_TITLE_BUBBLES)); |
| 41 | demo.AddExample(Example("blocks.example", DALI_DEMO_STR_TITLE_BLOCKS)); | 42 | demo.AddExample(Example("blocks.example", DALI_DEMO_STR_TITLE_BLOCKS)); |
| @@ -87,6 +88,7 @@ int DALI_EXPORT_API main(int argc, char **argv) | @@ -87,6 +88,7 @@ int DALI_EXPORT_API main(int argc, char **argv) | ||
| 87 | demo.AddExample(Example("contact-cards.example", DALI_DEMO_STR_TITLE_CONTACT_CARDS)); | 88 | demo.AddExample(Example("contact-cards.example", DALI_DEMO_STR_TITLE_CONTACT_CARDS)); |
| 88 | demo.AddExample(Example("flex-container.example", DALI_DEMO_STR_TITLE_FLEXBOX_PLAYGROUND)); | 89 | demo.AddExample(Example("flex-container.example", DALI_DEMO_STR_TITLE_FLEXBOX_PLAYGROUND)); |
| 89 | demo.AddExample(Example("fpp-game.example", DALI_DEMO_STR_TITLE_FPP_GAME)); | 90 | demo.AddExample(Example("fpp-game.example", DALI_DEMO_STR_TITLE_FPP_GAME)); |
| 91 | + demo.AddExample(Example("tooltip.example", DALI_DEMO_STR_TITLE_TOOLTIP)); | ||
| 90 | 92 | ||
| 91 | demo.SortAlphabetically( true ); | 93 | demo.SortAlphabetically( true ); |
| 92 | 94 |
examples/animated-images/animated-images-example.cpp
0 → 100644
| 1 | +/* | ||
| 2 | + * Copyright (c) 2016 Samsung Electronics Co., Ltd. | ||
| 3 | + * | ||
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 5 | + * you may not use this file except in compliance with the License. | ||
| 6 | + * You may obtain a copy of the License at | ||
| 7 | + * | ||
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 | ||
| 9 | + * | ||
| 10 | + * Unless required by applicable law or agreed to in writing, software | ||
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, | ||
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 13 | + * See the License for the specific language governing permissions and | ||
| 14 | + * limitations under the License. | ||
| 15 | + * | ||
| 16 | + */ | ||
| 17 | + | ||
| 18 | +#include <dali-toolkit/dali-toolkit.h> | ||
| 19 | + | ||
| 20 | +#include "shared/utility.h" | ||
| 21 | + | ||
| 22 | +using namespace Dali; | ||
| 23 | +using namespace Dali::Toolkit; | ||
| 24 | + | ||
| 25 | +namespace | ||
| 26 | +{ | ||
| 27 | +const char * const PLAY_ICON( DEMO_IMAGE_DIR "icon-play.png" ); | ||
| 28 | +const char * const PLAY_ICON_SELECTED( DEMO_IMAGE_DIR "icon-play-selected.png" ); | ||
| 29 | + | ||
| 30 | +const char* const STATIC_GIF_DOG( DEMO_IMAGE_DIR "dog-static.gif" ); | ||
| 31 | +const char* const ANIMATE_GIF_DOG( DEMO_IMAGE_DIR "dog-anim.gif" ); | ||
| 32 | + | ||
| 33 | +const char* const STATIC_GIF_LOGO( DEMO_IMAGE_DIR "dali-logo-static.gif" ); | ||
| 34 | +const char* const ANIMATE_GIF_LOGO( DEMO_IMAGE_DIR "dali-logo-anim.gif" ); | ||
| 35 | + | ||
| 36 | +const Vector4 DIM_COLOR( 0.85f, 0.85f, 0.85f, 0.85f ); | ||
| 37 | +} | ||
| 38 | + | ||
| 39 | +/* This example shows how to display a GIF image. | ||
| 40 | + * First a static GIF image is loaded and then when the user presses on the "Play" icon, | ||
| 41 | + * the static image is replaced by an animated one | ||
| 42 | + */ | ||
| 43 | + | ||
| 44 | +class AnimatedImageController : public ConnectionTracker | ||
| 45 | +{ | ||
| 46 | +public: | ||
| 47 | + | ||
| 48 | + AnimatedImageController( Application& application ) | ||
| 49 | + : mApplication( application ) | ||
| 50 | + { | ||
| 51 | + // Connect to the Application's Init signal | ||
| 52 | + mApplication.InitSignal().Connect( this, &AnimatedImageController::Create ); | ||
| 53 | + } | ||
| 54 | + | ||
| 55 | + ~AnimatedImageController() | ||
| 56 | + { | ||
| 57 | + // Nothing to do here; | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | + // The Init signal is received once (only) during the Application lifetime | ||
| 61 | + void Create( Application& application ) | ||
| 62 | + { | ||
| 63 | + // Get a handle to the stage | ||
| 64 | + Stage stage = Stage::GetCurrent(); | ||
| 65 | + stage.SetBackgroundColor( Color::WHITE ); | ||
| 66 | + // Tie-in input event handlers: | ||
| 67 | + stage.KeyEventSignal().Connect( this, &AnimatedImageController::OnKeyEvent ); | ||
| 68 | + | ||
| 69 | + mActorDog = CreateGifViewWithOverlayButton( STATIC_GIF_DOG ); | ||
| 70 | + mActorDog.SetAnchorPoint( AnchorPoint::BOTTOM_CENTER ); | ||
| 71 | + mActorDog.SetY( -100.f ); | ||
| 72 | + stage.Add( mActorDog ); | ||
| 73 | + | ||
| 74 | + mActorLogo = CreateGifViewWithOverlayButton( STATIC_GIF_LOGO ); | ||
| 75 | + mActorLogo.SetAnchorPoint( AnchorPoint::TOP_CENTER ); | ||
| 76 | + mActorLogo.SetY( 100.f ); | ||
| 77 | + stage.Add( mActorLogo ); | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | + /** | ||
| 81 | + * Create the gif image view with an overlay play button. | ||
| 82 | + */ | ||
| 83 | + Toolkit::ImageView CreateGifViewWithOverlayButton( const std::string& gifUrl ) | ||
| 84 | + { | ||
| 85 | + Toolkit::ImageView imageView = Toolkit::ImageView::New( gifUrl ); | ||
| 86 | + imageView.SetParentOrigin( ParentOrigin::CENTER ); | ||
| 87 | + | ||
| 88 | + // Create a push button, and add it as child of the image view | ||
| 89 | + Toolkit::PushButton animateButton = Toolkit::PushButton::New(); | ||
| 90 | + animateButton.SetUnselectedImage( PLAY_ICON ); | ||
| 91 | + animateButton.SetSelectedImage( PLAY_ICON_SELECTED ); | ||
| 92 | + animateButton.SetParentOrigin( ParentOrigin::CENTER ); | ||
| 93 | + animateButton.SetAnchorPoint( AnchorPoint::CENTER ); | ||
| 94 | + animateButton.ClickedSignal().Connect( this, &AnimatedImageController::OnPlayButtonClicked ); | ||
| 95 | + imageView.Add( animateButton ); | ||
| 96 | + | ||
| 97 | + // Apply dim color on the gif view and the play button | ||
| 98 | + imageView.SetColor( DIM_COLOR ); | ||
| 99 | + | ||
| 100 | + return imageView; | ||
| 101 | + } | ||
| 102 | + | ||
| 103 | + bool OnPlayButtonClicked( Toolkit::Button button ) | ||
| 104 | + { | ||
| 105 | + Stage stage = Stage::GetCurrent(); | ||
| 106 | + | ||
| 107 | + // With play button clicked, the static gif is replaced with animated gif. | ||
| 108 | + if( button.GetParent() == mActorDog ) | ||
| 109 | + { | ||
| 110 | + // remove the static gif view, the play button is also removed as its child. | ||
| 111 | + stage.Remove( mActorDog ); | ||
| 112 | + | ||
| 113 | + mActorDog = Toolkit::ImageView::New( ANIMATE_GIF_DOG ); | ||
| 114 | + mActorDog.SetParentOrigin( ParentOrigin::CENTER ); | ||
| 115 | + mActorDog.SetAnchorPoint( AnchorPoint::BOTTOM_CENTER ); | ||
| 116 | + mActorDog.SetY( -100.f ); | ||
| 117 | + stage.Add( mActorDog ); | ||
| 118 | + } | ||
| 119 | + else // button.GetParent() == mActorLogo | ||
| 120 | + { | ||
| 121 | + // remove the static gif view, the play button is also removed as its child. | ||
| 122 | + stage.Remove( mActorLogo ); | ||
| 123 | + | ||
| 124 | + mActorLogo = Toolkit::ImageView::New( ANIMATE_GIF_LOGO ); | ||
| 125 | + mActorLogo.SetParentOrigin( ParentOrigin::CENTER ); | ||
| 126 | + mActorLogo.SetAnchorPoint( AnchorPoint::TOP_CENTER ); | ||
| 127 | + mActorLogo.SetY( 100.f ); | ||
| 128 | + stage.Add( mActorLogo ); | ||
| 129 | + } | ||
| 130 | + return true; | ||
| 131 | + } | ||
| 132 | + | ||
| 133 | + | ||
| 134 | + void OnKeyEvent(const KeyEvent& event) | ||
| 135 | + { | ||
| 136 | + if(event.state == KeyEvent::Down) | ||
| 137 | + { | ||
| 138 | + if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) | ||
| 139 | + { | ||
| 140 | + mApplication.Quit(); | ||
| 141 | + } | ||
| 142 | + } | ||
| 143 | + } | ||
| 144 | + | ||
| 145 | +private: | ||
| 146 | + Application& mApplication; | ||
| 147 | + Toolkit::ImageView mActorDog; | ||
| 148 | + Toolkit::ImageView mActorLogo; | ||
| 149 | +}; | ||
| 150 | + | ||
| 151 | +// Entry point for Linux & Tizen applications | ||
| 152 | +// | ||
| 153 | +int DALI_EXPORT_API main( int argc, char **argv ) | ||
| 154 | +{ | ||
| 155 | + Application application = Application::New( &argc, &argv ); | ||
| 156 | + | ||
| 157 | + AnimatedImageController test( application ); | ||
| 158 | + | ||
| 159 | + application.MainLoop(); | ||
| 160 | + | ||
| 161 | + return 0; | ||
| 162 | +} |
examples/tooltip/tooltip-example.cpp
0 → 100644
| 1 | +/* | ||
| 2 | + * Copyright (c) 2016 Samsung Electronics Co., Ltd. | ||
| 3 | + * | ||
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 5 | + * you may not use this file except in compliance with the License. | ||
| 6 | + * You may obtain a copy of the License at | ||
| 7 | + * | ||
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 | ||
| 9 | + * | ||
| 10 | + * Unless required by applicable law or agreed to in writing, software | ||
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, | ||
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 13 | + * See the License for the specific language governing permissions and | ||
| 14 | + * limitations under the License. | ||
| 15 | + * | ||
| 16 | + */ | ||
| 17 | + | ||
| 18 | +#include <dali-toolkit/dali-toolkit.h> | ||
| 19 | +#include <dali-toolkit/devel-api/controls/control-devel.h> | ||
| 20 | +#include <dali-toolkit/devel-api/controls/tooltip/tooltip-properties.h> | ||
| 21 | +#include <dali-toolkit/devel-api/visuals/text-visual-properties.h> | ||
| 22 | +#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h> | ||
| 23 | + | ||
| 24 | +using namespace Dali; | ||
| 25 | +using namespace Dali::Toolkit; | ||
| 26 | + | ||
| 27 | +namespace | ||
| 28 | +{ | ||
| 29 | +const Vector4 STAGE_COLOR( 211.0f / 255.0f, 211.0f / 255.0f, 211.0f / 255.0f, 1.0f ); ///< The color of the stage | ||
| 30 | +const char * const THEME_PATH( DEMO_STYLE_DIR "tooltip-example-theme.json" ); ///< The theme used for this example | ||
| 31 | +const float POSITION_INCREMENTER( 0.2f ); ///< The position difference between the controls along the Y-Axis. | ||
| 32 | +} // unnamed namespace | ||
| 33 | + | ||
| 34 | +/** | ||
| 35 | + * @brief Creates a controller which demonstrates the tooltip functionality in control. | ||
| 36 | + * | ||
| 37 | + * The Control base class supports tooltip functionality. However, the Toolkit Tooltip style is only set on Buttons by default. | ||
| 38 | + * This example portrays the different ways in which a tooltip can be displayed and customised. | ||
| 39 | + */ | ||
| 40 | +class TooltipController : public ConnectionTracker | ||
| 41 | +{ | ||
| 42 | +public: | ||
| 43 | + | ||
| 44 | + TooltipController( Application& application ) | ||
| 45 | + : mApplication( application ), | ||
| 46 | + previousPosition( 0.0f ) | ||
| 47 | + { | ||
| 48 | + // Connect to the Application's Init signal | ||
| 49 | + mApplication.InitSignal().Connect( this, &TooltipController::Create ); | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | +private: | ||
| 53 | + | ||
| 54 | + // The Init signal is received once (only) during the Application lifetime | ||
| 55 | + void Create( Application& application ) | ||
| 56 | + { | ||
| 57 | + // Hide the indicator bar | ||
| 58 | + application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE ); | ||
| 59 | + | ||
| 60 | + // Set the stage background color and connect to the stage's key signal to allow Back and Escape to exit. | ||
| 61 | + Stage stage = Stage::GetCurrent(); | ||
| 62 | + stage.SetBackgroundColor( STAGE_COLOR ); | ||
| 63 | + stage.KeyEventSignal().Connect( this, &TooltipController::OnKeyEvent ); | ||
| 64 | + const Vector2 stageSize = stage.GetSize(); | ||
| 65 | + | ||
| 66 | + // Add a text label at the top for information purposes | ||
| 67 | + Control label = TextLabel::New( "Hover over buttons to see tooltip" ); | ||
| 68 | + label.SetParentOrigin( ParentOrigin::TOP_CENTER ); | ||
| 69 | + label.SetAnchorPoint( AnchorPoint::TOP_CENTER ); | ||
| 70 | + label.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "Center" ); | ||
| 71 | + stage.Add( label ); | ||
| 72 | + | ||
| 73 | + // Simple tooltip from stylesheet | ||
| 74 | + Control simple = PushButton::New(); | ||
| 75 | + simple.SetStyleName( "TooltipTextOnly" ); | ||
| 76 | + SetLabel( simple, "Simple" ); | ||
| 77 | + Layout( simple, stageSize ); | ||
| 78 | + stage.Add( simple ); | ||
| 79 | + | ||
| 80 | + // Tooltip with icon and text, from stylesheet | ||
| 81 | + Control iconWithText = PushButton::New(); | ||
| 82 | + iconWithText.SetStyleName( "TooltipArray" ); | ||
| 83 | + SetLabel( iconWithText, "Icon with Text" ); | ||
| 84 | + Layout( iconWithText, stageSize ); | ||
| 85 | + stage.Add( iconWithText ); | ||
| 86 | + | ||
| 87 | + // Tooltip with custom style, from stylesheet | ||
| 88 | + Control customFromStylesheet = PushButton::New(); | ||
| 89 | + customFromStylesheet.SetStyleName( "TooltipCustom" ); | ||
| 90 | + SetLabel( customFromStylesheet, "Custom From Stylesheet" ); | ||
| 91 | + Layout( customFromStylesheet, stageSize ); | ||
| 92 | + stage.Add( customFromStylesheet ); | ||
| 93 | + | ||
| 94 | + // Tooltip with custom style, from code | ||
| 95 | + Control customFromCode = PushButton::New(); | ||
| 96 | + SetLabel( customFromCode, "Custom From Code" ); | ||
| 97 | + Layout( customFromCode, stageSize ); | ||
| 98 | + customFromCode.SetProperty( DevelControl::Property::TOOLTIP, | ||
| 99 | + Property::Map().Add( Tooltip::Property::CONTENT, | ||
| 100 | + Property::Array().Add( Property::Map().Add( Visual::Property::TYPE, Visual::IMAGE ) | ||
| 101 | + .Add( ImageVisual::Property::URL, DEMO_IMAGE_DIR "Logo-for-demo.png" ) ) | ||
| 102 | + .Add( Property::Map().Add( Visual::Property::TYPE, DevelVisual::TEXT ) | ||
| 103 | + .Add( TextVisual::Property::TEXT_COLOR, Color::WHITE ) | ||
| 104 | + .Add( TextVisual::Property::TEXT, "Custom coded style\nat hover point" ) | ||
| 105 | + .Add( TextVisual::Property::MULTI_LINE, true ) | ||
| 106 | + .Add( TextVisual::Property::HORIZONTAL_ALIGNMENT, "CENTER" ) | ||
| 107 | + .Add( TextVisual::Property::POINT_SIZE, 16 ) ) ) | ||
| 108 | + .Add( Tooltip::Property::LAYOUT, Vector2( 2, 1 ) ) | ||
| 109 | + .Add( Tooltip::Property::POSITION, Tooltip::Position::HOVER_POINT ) | ||
| 110 | + .Add( Tooltip::Property::BACKGROUND, | ||
| 111 | + Property::Map().Add( Tooltip::Background::Property::VISUAL, DEMO_IMAGE_DIR "tooltip.9.png" ) | ||
| 112 | + .Add( Tooltip::Background::Property::BORDER, Rect< int >( 1, 5, 5, 1 ) ) ) | ||
| 113 | + ); | ||
| 114 | + stage.Add( customFromCode ); | ||
| 115 | + } | ||
| 116 | + | ||
| 117 | + /** | ||
| 118 | + * @brief Called when any key event is received | ||
| 119 | + * | ||
| 120 | + * Will use this to quit the application if Back or the Escape key is received | ||
| 121 | + * @param[in] event The key event information | ||
| 122 | + */ | ||
| 123 | + void OnKeyEvent( const KeyEvent& event ) | ||
| 124 | + { | ||
| 125 | + if( event.state == KeyEvent::Down ) | ||
| 126 | + { | ||
| 127 | + if ( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) | ||
| 128 | + { | ||
| 129 | + mApplication.Quit(); | ||
| 130 | + } | ||
| 131 | + } | ||
| 132 | + } | ||
| 133 | + | ||
| 134 | + /** | ||
| 135 | + * @brief Sets the label on the control. | ||
| 136 | + * @param[in] label The label to set. | ||
| 137 | + */ | ||
| 138 | + void SetLabel( Control control, std::string label ) | ||
| 139 | + { | ||
| 140 | + if( control ) | ||
| 141 | + { | ||
| 142 | + control.SetProperty( Button::Property::LABEL, | ||
| 143 | + Property::Map().Add( Visual::Property::TYPE, DevelVisual::TEXT ) | ||
| 144 | + .Add( TextVisual::Property::TEXT, label ) ); | ||
| 145 | + } | ||
| 146 | + } | ||
| 147 | + | ||
| 148 | + /** | ||
| 149 | + * @brief Lays out the control in the appropriate location. | ||
| 150 | + * @param[in] control The control to layout. | ||
| 151 | + * @param[in] stageSize The size of the stage, passing it in so we don't have to retrieve it every time. | ||
| 152 | + */ | ||
| 153 | + void Layout( Control control, const Vector2& stageSize ) | ||
| 154 | + { | ||
| 155 | + if( control ) | ||
| 156 | + { | ||
| 157 | + previousPosition += POSITION_INCREMENTER; | ||
| 158 | + control.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); | ||
| 159 | + control.SetSizeModeFactor( Vector3( 0.75, 0.1, 1.0 ) ); | ||
| 160 | + control.SetAnchorPoint( AnchorPoint::CENTER ); | ||
| 161 | + control.SetParentOrigin( ParentOrigin::TOP_CENTER ); | ||
| 162 | + control.SetY( stageSize.height * previousPosition ); | ||
| 163 | + } | ||
| 164 | + } | ||
| 165 | + | ||
| 166 | +private: | ||
| 167 | + Application& mApplication; | ||
| 168 | + float previousPosition; | ||
| 169 | +}; | ||
| 170 | + | ||
| 171 | +int DALI_EXPORT_API main( int argc, char **argv ) | ||
| 172 | +{ | ||
| 173 | + Application application = Application::New( &argc, &argv, THEME_PATH ); | ||
| 174 | + | ||
| 175 | + TooltipController test( application ); | ||
| 176 | + | ||
| 177 | + application.MainLoop(); | ||
| 178 | + | ||
| 179 | + return 0; | ||
| 180 | +} |
examples/transitions/transition-application.cpp
| @@ -40,7 +40,11 @@ const char* TransitionApplication::DEMO_THEME_ONE_PATH( DEMO_STYLE_DIR "style-ex | @@ -40,7 +40,11 @@ const char* TransitionApplication::DEMO_THEME_ONE_PATH( DEMO_STYLE_DIR "style-ex | ||
| 40 | 40 | ||
| 41 | 41 | ||
| 42 | TransitionApplication::TransitionApplication( Application& application ) | 42 | TransitionApplication::TransitionApplication( Application& application ) |
| 43 | -: mApplication( application ) | 43 | +: mApplication( application ), |
| 44 | + mTitle(), | ||
| 45 | + mBeatControl(), | ||
| 46 | + mActionButtons(), | ||
| 47 | + mActionIndex( Property::INVALID_INDEX ) | ||
| 44 | { | 48 | { |
| 45 | application.InitSignal().Connect( this, &TransitionApplication::Create ); | 49 | application.InitSignal().Connect( this, &TransitionApplication::Create ); |
| 46 | } | 50 | } |
packaging/com.samsung.dali-demo.spec
| @@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
| 2 | 2 | ||
| 3 | Name: com.samsung.dali-demo | 3 | Name: com.samsung.dali-demo |
| 4 | Summary: The OpenGLES Canvas Core Demo | 4 | Summary: The OpenGLES Canvas Core Demo |
| 5 | -Version: 1.2.19 | 5 | +Version: 1.2.20 |
| 6 | Release: 1 | 6 | Release: 1 |
| 7 | Group: System/Libraries | 7 | Group: System/Libraries |
| 8 | License: Apache-2.0 | 8 | License: Apache-2.0 |
resources/images/dali-logo-anim.gif
0 → 100644
83.8 KB
resources/images/dali-logo-static.gif
0 → 100644
18.8 KB
resources/images/dog-anim.gif
0 → 100644
57.2 KB
resources/images/dog-static.gif
0 → 100644
8.03 KB
resources/images/tooltip-tail-above.png
0 → 100644
3.11 KB
resources/images/tooltip-tail-below.png
0 → 100644
3.17 KB
resources/images/tooltip.9.png
0 → 100644
2.95 KB
resources/po/as.po
| 1 | +msgid "DALI_DEMO_STR_TITLE_ANIMATED_IMAGES" | ||
| 2 | +msgstr "অ্যানিমেটেড ইমেজ" | ||
| 3 | + | ||
| 1 | msgid "DALI_DEMO_STR_TITLE_ANIMATED_SHAPES" | 4 | msgid "DALI_DEMO_STR_TITLE_ANIMATED_SHAPES" |
| 2 | msgstr "অ্যানিমেটেড আকার" | 5 | msgstr "অ্যানিমেটেড আকার" |
| 3 | 6 | ||
| @@ -148,5 +151,8 @@ msgstr "অকনিষ্ঠ অৰ্জুন বঁটা" | @@ -148,5 +151,8 @@ msgstr "অকনিষ্ঠ অৰ্জুন বঁটা" | ||
| 148 | msgid "DALI_DEMO_STR_TITLE_TILT_SENSOR" | 151 | msgid "DALI_DEMO_STR_TITLE_TILT_SENSOR" |
| 149 | msgstr "টিল্ট অনুভূতি" | 152 | msgstr "টিল্ট অনুভূতি" |
| 150 | 153 | ||
| 154 | +msgid "DALI_DEMO_STR_TITLE_TOOLTIP" | ||
| 155 | +msgstr "Tooltip" | ||
| 156 | + | ||
| 151 | msgid "DALI_DEMO_STR_TITLE_FPP_GAME" | 157 | msgid "DALI_DEMO_STR_TITLE_FPP_GAME" |
| 152 | msgstr "FPP খেলা" | 158 | msgstr "FPP খেলা" |
resources/po/de.po
| 1 | +msgid "DALI_DEMO_STR_TITLE_ANIMATED_IMAGES" | ||
| 2 | +msgstr "Animierte Bilder" | ||
| 3 | + | ||
| 1 | msgid "DALI_DEMO_STR_TITLE_ANIMATED_SHAPES" | 4 | msgid "DALI_DEMO_STR_TITLE_ANIMATED_SHAPES" |
| 2 | msgstr "Animierte Formen" | 5 | msgstr "Animierte Formen" |
| 3 | 6 | ||
| @@ -148,5 +151,8 @@ msgstr "Text Scrollen" | @@ -148,5 +151,8 @@ msgstr "Text Scrollen" | ||
| 148 | msgid "DALI_DEMO_STR_TITLE_TILT_SENSOR" | 151 | msgid "DALI_DEMO_STR_TITLE_TILT_SENSOR" |
| 149 | msgstr "Neigungssensor" | 152 | msgstr "Neigungssensor" |
| 150 | 153 | ||
| 154 | +msgid "DALI_DEMO_STR_TITLE_TOOLTIP" | ||
| 155 | +msgstr "Kurzinfo" | ||
| 156 | + | ||
| 151 | msgid "DALI_DEMO_STR_TITLE_FPP_GAME" | 157 | msgid "DALI_DEMO_STR_TITLE_FPP_GAME" |
| 152 | msgstr "FPP Spiel" | 158 | msgstr "FPP Spiel" |
resources/po/en_GB.po
| 1 | +msgid "DALI_DEMO_STR_TITLE_ANIMATED_IMAGES" | ||
| 2 | +msgstr "Animated Images" | ||
| 3 | + | ||
| 1 | msgid "DALI_DEMO_STR_TITLE_ANIMATED_SHAPES" | 4 | msgid "DALI_DEMO_STR_TITLE_ANIMATED_SHAPES" |
| 2 | msgstr "Animated Shapes" | 5 | msgstr "Animated Shapes" |
| 3 | 6 | ||
| @@ -148,6 +151,9 @@ msgstr "Text Scrolling" | @@ -148,6 +151,9 @@ msgstr "Text Scrolling" | ||
| 148 | msgid "DALI_DEMO_STR_TITLE_TILT_SENSOR" | 151 | msgid "DALI_DEMO_STR_TITLE_TILT_SENSOR" |
| 149 | msgstr "Tilt Sensor" | 152 | msgstr "Tilt Sensor" |
| 150 | 153 | ||
| 154 | +msgid "DALI_DEMO_STR_TITLE_TOOLTIP" | ||
| 155 | +msgstr "Tooltip" | ||
| 156 | + | ||
| 151 | msgid "DALI_DEMO_STR_TITLE_FPP_GAME" | 157 | msgid "DALI_DEMO_STR_TITLE_FPP_GAME" |
| 152 | msgstr "FPP Game" | 158 | msgstr "FPP Game" |
| 153 | 159 |
resources/po/en_US.po
| 1 | +msgid "DALI_DEMO_STR_TITLE_ANIMATED_IMAGES" | ||
| 2 | +msgstr "Animated Images" | ||
| 3 | + | ||
| 1 | msgid "DALI_DEMO_STR_TITLE_ANIMATED_SHAPES" | 4 | msgid "DALI_DEMO_STR_TITLE_ANIMATED_SHAPES" |
| 2 | msgstr "Animated Shapes" | 5 | msgstr "Animated Shapes" |
| 3 | 6 | ||
| @@ -148,6 +151,9 @@ msgstr "Text Scrolling" | @@ -148,6 +151,9 @@ msgstr "Text Scrolling" | ||
| 148 | msgid "DALI_DEMO_STR_TITLE_TILT_SENSOR" | 151 | msgid "DALI_DEMO_STR_TITLE_TILT_SENSOR" |
| 149 | msgstr "Tilt Sensor" | 152 | msgstr "Tilt Sensor" |
| 150 | 153 | ||
| 154 | +msgid "DALI_DEMO_STR_TITLE_TOOLTIP" | ||
| 155 | +msgstr "Tooltip" | ||
| 156 | + | ||
| 151 | msgid "DALI_DEMO_STR_TITLE_FPP_GAME" | 157 | msgid "DALI_DEMO_STR_TITLE_FPP_GAME" |
| 152 | msgstr "FPP Game" | 158 | msgstr "FPP Game" |
| 153 | 159 |
resources/po/es.po
| 1 | +msgid "DALI_DEMO_STR_TITLE_ANIMATED_IMAGES" | ||
| 2 | +msgstr "Imágenes animadas" | ||
| 3 | + | ||
| 1 | msgid "DALI_DEMO_STR_TITLE_ANIMATED_SHAPES" | 4 | msgid "DALI_DEMO_STR_TITLE_ANIMATED_SHAPES" |
| 2 | msgstr "Formas Animadas" | 5 | msgstr "Formas Animadas" |
| 3 | 6 | ||
| @@ -148,5 +151,8 @@ msgstr "Texto con desplazamiento" | @@ -148,5 +151,8 @@ msgstr "Texto con desplazamiento" | ||
| 148 | msgid "DALI_DEMO_STR_TITLE_TILT_SENSOR" | 151 | msgid "DALI_DEMO_STR_TITLE_TILT_SENSOR" |
| 149 | msgstr "Sensor de inclinacion" | 152 | msgstr "Sensor de inclinacion" |
| 150 | 153 | ||
| 154 | +msgid "DALI_DEMO_STR_TITLE_TOOLTIP" | ||
| 155 | +msgstr "Tooltip" | ||
| 156 | + | ||
| 151 | msgid "DALI_DEMO_STR_TITLE_FPP_GAME" | 157 | msgid "DALI_DEMO_STR_TITLE_FPP_GAME" |
| 152 | msgstr "Juego FPP" | 158 | msgstr "Juego FPP" |
resources/po/fi.po
| 1 | +msgid "DALI_DEMO_STR_TITLE_ANIMATED_IMAGES" | ||
| 2 | +msgstr "animoituja kuvia" | ||
| 3 | + | ||
| 1 | msgid "DALI_DEMO_STR_TITLE_ANIMATED_SHAPES" | 4 | msgid "DALI_DEMO_STR_TITLE_ANIMATED_SHAPES" |
| 2 | msgstr "Animoidut Muodot" | 5 | msgstr "Animoidut Muodot" |
| 3 | 6 | ||
| @@ -148,5 +151,8 @@ msgstr "Tekstin Vieritys" | @@ -148,5 +151,8 @@ msgstr "Tekstin Vieritys" | ||
| 148 | msgid "DALI_DEMO_STR_TITLE_TILT_SENSOR" | 151 | msgid "DALI_DEMO_STR_TITLE_TILT_SENSOR" |
| 149 | msgstr "Kallistustunnistin" | 152 | msgstr "Kallistustunnistin" |
| 150 | 153 | ||
| 154 | +msgid "DALI_DEMO_STR_TITLE_TOOLTIP" | ||
| 155 | +msgstr "Tooltip" | ||
| 156 | + | ||
| 151 | msgid "DALI_DEMO_STR_TITLE_FPP_GAME" | 157 | msgid "DALI_DEMO_STR_TITLE_FPP_GAME" |
| 152 | msgstr "FPP peli" | 158 | msgstr "FPP peli" |
resources/po/ko.po
| 1 | +msgid "DALI_DEMO_STR_TITLE_ANIMATED_IMAGES" | ||
| 2 | +msgstr "애니메이션 이미지" | ||
| 3 | + | ||
| 4 | + | ||
| 1 | msgid "DALI_DEMO_STR_TITLE_ANIMATED_SHAPES" | 5 | msgid "DALI_DEMO_STR_TITLE_ANIMATED_SHAPES" |
| 2 | msgstr "애니메이션 모양" | 6 | msgstr "애니메이션 모양" |
| 3 | 7 | ||
| @@ -148,5 +152,8 @@ msgstr "텍스트 스크롤" | @@ -148,5 +152,8 @@ msgstr "텍스트 스크롤" | ||
| 148 | msgid "DALI_DEMO_STR_TITLE_TILT_SENSOR" | 152 | msgid "DALI_DEMO_STR_TITLE_TILT_SENSOR" |
| 149 | msgstr "기울기 센서" | 153 | msgstr "기울기 센서" |
| 150 | 154 | ||
| 155 | +msgid "DALI_DEMO_STR_TITLE_TOOLTIP" | ||
| 156 | +msgstr "툴팁" | ||
| 157 | + | ||
| 151 | msgid "DALI_DEMO_STR_TITLE_FPP_GAME" | 158 | msgid "DALI_DEMO_STR_TITLE_FPP_GAME" |
| 152 | msgstr "FPP Game" | 159 | msgstr "FPP Game" |
resources/po/ml.po
| 1 | +msgid "DALI_DEMO_STR_TITLE_ANIMATED_IMAGES" | ||
| 2 | +msgstr "അനിമേറ്റഡ് ചിത്രങ്ങൾ" | ||
| 3 | + | ||
| 1 | msgid "DALI_DEMO_STR_TITLE_ANIMATED_SHAPES" | 4 | msgid "DALI_DEMO_STR_TITLE_ANIMATED_SHAPES" |
| 2 | msgstr "ആനിമേഷൻ രൂപങ്ങൾ" | 5 | msgstr "ആനിമേഷൻ രൂപങ്ങൾ" |
| 3 | 6 | ||
| @@ -148,5 +151,8 @@ msgstr "ടെക്സ്റ്റ് സ്ക്രോളിംഗ്" | @@ -148,5 +151,8 @@ msgstr "ടെക്സ്റ്റ് സ്ക്രോളിംഗ്" | ||
| 148 | msgid "DALI_DEMO_STR_TITLE_TILT_SENSOR" | 151 | msgid "DALI_DEMO_STR_TITLE_TILT_SENSOR" |
| 149 | msgstr "ചെരിവ് സെൻസർ" | 152 | msgstr "ചെരിവ് സെൻസർ" |
| 150 | 153 | ||
| 154 | +msgid "DALI_DEMO_STR_TITLE_TOOLTIP" | ||
| 155 | +msgstr "കൂടുതൽ വിവരങ്ങൾ" | ||
| 156 | + | ||
| 151 | msgid "DALI_DEMO_STR_TITLE_FPP_GAME" | 157 | msgid "DALI_DEMO_STR_TITLE_FPP_GAME" |
| 152 | msgstr "FPP Game" | 158 | msgstr "FPP Game" |
resources/po/ur.po
| 1 | +msgid "DALI_DEMO_STR_TITLE_ANIMATED_IMAGES" | ||
| 2 | +msgstr "متحرک تصاویر" | ||
| 3 | + | ||
| 1 | msgid "DALI_DEMO_STR_TITLE_ANIMATED_SHAPES" | 4 | msgid "DALI_DEMO_STR_TITLE_ANIMATED_SHAPES" |
| 2 | msgstr "متحرک شکلیں" | 5 | msgstr "متحرک شکلیں" |
| 3 | 6 | ||
| @@ -148,5 +151,8 @@ msgstr "حروف کاسکرال " | @@ -148,5 +151,8 @@ msgstr "حروف کاسکرال " | ||
| 148 | msgid "DALI_DEMO_STR_TITLE_TILT_SENSOR" | 151 | msgid "DALI_DEMO_STR_TITLE_TILT_SENSOR" |
| 149 | msgstr "ٹلٹ سینسر" | 152 | msgstr "ٹلٹ سینسر" |
| 150 | 153 | ||
| 154 | +msgid "DALI_DEMO_STR_TITLE_TOOLTIP" | ||
| 155 | +msgstr "مزید معلومات" | ||
| 156 | + | ||
| 151 | msgid "DALI_DEMO_STR_TITLE_FPP_GAME" | 157 | msgid "DALI_DEMO_STR_TITLE_FPP_GAME" |
| 152 | msgstr "FPP گیم" | 158 | msgstr "FPP گیم" |
resources/po/zn_CH.po
| 1 | +msgid "DALI_DEMO_STR_TITLE_ANIMATED_IMAGES" | ||
| 2 | +msgstr "动态图" | ||
| 3 | + | ||
| 1 | msgid "DALI_DEMO_STR_TITLE_ANIMATED_SHAPES" | 4 | msgid "DALI_DEMO_STR_TITLE_ANIMATED_SHAPES" |
| 2 | msgstr "动画造型" | 5 | msgstr "动画造型" |
| 3 | 6 | ||
| @@ -148,5 +151,8 @@ msgstr "滚动文字" | @@ -148,5 +151,8 @@ msgstr "滚动文字" | ||
| 148 | msgid "DALI_DEMO_STR_TITLE_TILT_SENSOR" | 151 | msgid "DALI_DEMO_STR_TITLE_TILT_SENSOR" |
| 149 | msgstr "倾斜传感器" | 152 | msgstr "倾斜传感器" |
| 150 | 153 | ||
| 154 | +msgid "DALI_DEMO_STR_TITLE_TOOLTIP" | ||
| 155 | +msgstr "更多信息" | ||
| 156 | + | ||
| 151 | msgid "DALI_DEMO_STR_TITLE_FPP_GAME" | 157 | msgid "DALI_DEMO_STR_TITLE_FPP_GAME" |
| 152 | msgstr "FPP游戏" | 158 | msgstr "FPP游戏" |
resources/style/.gitignore
| @@ -3,3 +3,4 @@ contact-cards-example-theme.json | @@ -3,3 +3,4 @@ contact-cards-example-theme.json | ||
| 3 | style-example-theme-three.json | 3 | style-example-theme-three.json |
| 4 | style-example-theme-two.json | 4 | style-example-theme-two.json |
| 5 | style-example-theme-one.json | 5 | style-example-theme-one.json |
| 6 | +tooltip-example-theme.json |
resources/style/mobile/tooltip-example-theme.json.in
0 → 100644
| 1 | +/* | ||
| 2 | + * Copyright (c) 2016 Samsung Electronics Co., Ltd. | ||
| 3 | + * | ||
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 5 | + * you may not use this file except in compliance with the License. | ||
| 6 | + * You may obtain a copy of the License at | ||
| 7 | + * | ||
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 | ||
| 9 | + * | ||
| 10 | + * Unless required by applicable law or agreed to in writing, software | ||
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, | ||
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 13 | + * See the License for the specific language governing permissions and | ||
| 14 | + * limitations under the License. | ||
| 15 | + * | ||
| 16 | + */ | ||
| 17 | + | ||
| 18 | +{ | ||
| 19 | + "styles": | ||
| 20 | + { | ||
| 21 | + "TooltipTextOnly" : | ||
| 22 | + { | ||
| 23 | + "tooltip": "Using defaults defined in the Toolkit stylesheet" | ||
| 24 | + }, | ||
| 25 | + | ||
| 26 | + "TooltipArray" : | ||
| 27 | + { | ||
| 28 | + "tooltip" : | ||
| 29 | + { | ||
| 30 | + "content" : | ||
| 31 | + [ | ||
| 32 | + { | ||
| 33 | + "visualType" : "IMAGE", | ||
| 34 | + "url" : "{APPLICATION_RESOURCE_PATH}/images/application-icon-0.png", | ||
| 35 | + "desiredWidth" : 75, | ||
| 36 | + "desiredHeight" : 75 | ||
| 37 | + }, | ||
| 38 | + { | ||
| 39 | + "visualType" : "TEXT", | ||
| 40 | + "text" : "An icon on the left and\nmulti-line text on the right", | ||
| 41 | + "multiLine" : true, | ||
| 42 | + "pointSize" : 16 | ||
| 43 | + } | ||
| 44 | + ], | ||
| 45 | + "tail" : true | ||
| 46 | + } | ||
| 47 | + }, | ||
| 48 | + | ||
| 49 | + "TooltipCustom" : | ||
| 50 | + { | ||
| 51 | + "tooltip": | ||
| 52 | + { | ||
| 53 | + "content": | ||
| 54 | + { | ||
| 55 | + "visualType" : "TEXT", | ||
| 56 | + "textColor" : [1,1,1,1], | ||
| 57 | + "text" : "Completely custom style\nthat disappears on movement", | ||
| 58 | + "multiLine" : true, | ||
| 59 | + "pointSize" : 16 | ||
| 60 | + }, | ||
| 61 | + "waitTime":0.5, | ||
| 62 | + "background": | ||
| 63 | + { | ||
| 64 | + "visual":"{APPLICATION_RESOURCE_PATH}/images/tooltip.9.png", | ||
| 65 | + "border":[1,5,5,1] | ||
| 66 | + }, | ||
| 67 | + "tail": | ||
| 68 | + { | ||
| 69 | + "visibility":true, | ||
| 70 | + "aboveVisual":"{APPLICATION_RESOURCE_PATH}/images/tooltip-tail-above.png", | ||
| 71 | + "belowVisual":"{APPLICATION_RESOURCE_PATH}/images/tooltip-tail-below.png" | ||
| 72 | + }, | ||
| 73 | + "position":"ABOVE", | ||
| 74 | + "hoverPointOffset":[10,10], | ||
| 75 | + "movementThreshold":5, | ||
| 76 | + "disappearOnMovement":true | ||
| 77 | + } | ||
| 78 | + }, | ||
| 79 | + | ||
| 80 | + "TableView" : | ||
| 81 | + { | ||
| 82 | + "cellPadding" : [ 5.0, 5.0 ] | ||
| 83 | + } | ||
| 84 | + } | ||
| 85 | +} |
resources/style/tooltip-example-theme.json.in
0 → 100644
| 1 | +/* | ||
| 2 | + * Copyright (c) 2016 Samsung Electronics Co., Ltd. | ||
| 3 | + * | ||
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 5 | + * you may not use this file except in compliance with the License. | ||
| 6 | + * You may obtain a copy of the License at | ||
| 7 | + * | ||
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 | ||
| 9 | + * | ||
| 10 | + * Unless required by applicable law or agreed to in writing, software | ||
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, | ||
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 13 | + * See the License for the specific language governing permissions and | ||
| 14 | + * limitations under the License. | ||
| 15 | + * | ||
| 16 | + */ | ||
| 17 | + | ||
| 18 | +{ | ||
| 19 | + "styles": | ||
| 20 | + { | ||
| 21 | + "TooltipTextOnly" : | ||
| 22 | + { | ||
| 23 | + "tooltip": "Using defaults defined in the Toolkit stylesheet" | ||
| 24 | + }, | ||
| 25 | + | ||
| 26 | + "TooltipArray" : | ||
| 27 | + { | ||
| 28 | + "tooltip" : | ||
| 29 | + { | ||
| 30 | + "content" : | ||
| 31 | + [ | ||
| 32 | + { | ||
| 33 | + "visualType" : "IMAGE", | ||
| 34 | + "url" : "{APPLICATION_RESOURCE_PATH}/images/application-icon-0.png", | ||
| 35 | + "desiredWidth" : 75, | ||
| 36 | + "desiredHeight" : 75 | ||
| 37 | + }, | ||
| 38 | + { | ||
| 39 | + "visualType" : "TEXT", | ||
| 40 | + "text" : "An icon on the left and\nmulti-line text on the right", | ||
| 41 | + "multiLine" : true, | ||
| 42 | + "pointSize" : 16 | ||
| 43 | + } | ||
| 44 | + ], | ||
| 45 | + "tail" : true | ||
| 46 | + } | ||
| 47 | + }, | ||
| 48 | + | ||
| 49 | + "TooltipCustom" : | ||
| 50 | + { | ||
| 51 | + "tooltip": | ||
| 52 | + { | ||
| 53 | + "content": | ||
| 54 | + { | ||
| 55 | + "visualType" : "TEXT", | ||
| 56 | + "textColor" : [1,1,1,1], | ||
| 57 | + "text" : "Completely custom style\nthat disappears on movement", | ||
| 58 | + "multiLine" : true, | ||
| 59 | + "pointSize" : 16 | ||
| 60 | + }, | ||
| 61 | + "waitTime":0.5, | ||
| 62 | + "background": | ||
| 63 | + { | ||
| 64 | + "visual":"{APPLICATION_RESOURCE_PATH}/images/tooltip.9.png", | ||
| 65 | + "border":[1,5,5,1] | ||
| 66 | + }, | ||
| 67 | + "tail": | ||
| 68 | + { | ||
| 69 | + "visibility":true, | ||
| 70 | + "aboveVisual":"{APPLICATION_RESOURCE_PATH}/images/tooltip-tail-above.png", | ||
| 71 | + "belowVisual":"{APPLICATION_RESOURCE_PATH}/images/tooltip-tail-below.png" | ||
| 72 | + }, | ||
| 73 | + "position":"ABOVE", | ||
| 74 | + "hoverPointOffset":[10,10], | ||
| 75 | + "movementThreshold":5, | ||
| 76 | + "disappearOnMovement":true | ||
| 77 | + } | ||
| 78 | + }, | ||
| 79 | + | ||
| 80 | + "TableView" : | ||
| 81 | + { | ||
| 82 | + "cellPadding" : [ 5.0, 5.0 ] | ||
| 83 | + } | ||
| 84 | + } | ||
| 85 | +} |
shared/dali-demo-strings.h
| @@ -32,6 +32,7 @@ extern "C" | @@ -32,6 +32,7 @@ extern "C" | ||
| 32 | 32 | ||
| 33 | #ifdef INTERNATIONALIZATION_ENABLED | 33 | #ifdef INTERNATIONALIZATION_ENABLED |
| 34 | 34 | ||
| 35 | +#define DALI_DEMO_STR_TITLE_ANIMATED_IMAGES dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_ANIMATED_IMAGES") | ||
| 35 | #define DALI_DEMO_STR_TITLE_ANIMATED_SHAPES dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_ANIMATED_SHAPES") | 36 | #define DALI_DEMO_STR_TITLE_ANIMATED_SHAPES dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_ANIMATED_SHAPES") |
| 36 | #define DALI_DEMO_STR_TITLE_BLOCKS dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_BLOCKS") | 37 | #define DALI_DEMO_STR_TITLE_BLOCKS dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_BLOCKS") |
| 37 | #define DALI_DEMO_STR_TITLE_BUBBLES dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_BUBBLES") | 38 | #define DALI_DEMO_STR_TITLE_BUBBLES dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_BUBBLES") |
| @@ -42,6 +43,7 @@ extern "C" | @@ -42,6 +43,7 @@ extern "C" | ||
| 42 | #define DALI_DEMO_STR_TITLE_DISSOLVE_TRANSITION dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_DISSOLVE_TRANSITION") | 43 | #define DALI_DEMO_STR_TITLE_DISSOLVE_TRANSITION dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_DISSOLVE_TRANSITION") |
| 43 | #define DALI_DEMO_STR_TITLE_EFFECTS_VIEW dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_EFFECTS_VIEW") | 44 | #define DALI_DEMO_STR_TITLE_EFFECTS_VIEW dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_EFFECTS_VIEW") |
| 44 | #define DALI_DEMO_STR_TITLE_EMOJI_TEXT dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_EMOJI_TEXT") | 45 | #define DALI_DEMO_STR_TITLE_EMOJI_TEXT dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_EMOJI_TEXT") |
| 46 | +#define DALI_DEMO_STR_TITLE_FPP_GAME dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_FPP_GAME") | ||
| 45 | #define DALI_DEMO_STR_TITLE_FLEXBOX_PLAYGROUND dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_FLEXBOX_PLAYGROUND") | 47 | #define DALI_DEMO_STR_TITLE_FLEXBOX_PLAYGROUND dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_FLEXBOX_PLAYGROUND") |
| 46 | #define DALI_DEMO_STR_TITLE_IMAGE_FITTING_SAMPLING dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_IMAGE_FITTING_SAMPLING") | 48 | #define DALI_DEMO_STR_TITLE_IMAGE_FITTING_SAMPLING dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_IMAGE_FITTING_SAMPLING") |
| 47 | #define DALI_DEMO_STR_TITLE_IMAGE_SCALING dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_IMAGE_SCALING") | 49 | #define DALI_DEMO_STR_TITLE_IMAGE_SCALING dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_IMAGE_SCALING") |
| @@ -65,8 +67,8 @@ extern "C" | @@ -65,8 +67,8 @@ extern "C" | ||
| 65 | #define DALI_DEMO_STR_TITLE_NEGOTIATE_SIZE dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_NEGOTIATE_SIZE") | 67 | #define DALI_DEMO_STR_TITLE_NEGOTIATE_SIZE dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_NEGOTIATE_SIZE") |
| 66 | #define DALI_DEMO_STR_TITLE_PAGE_TURN_VIEW dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_PAGE_TURN_VIEW") | 68 | #define DALI_DEMO_STR_TITLE_PAGE_TURN_VIEW dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_PAGE_TURN_VIEW") |
| 67 | #define DALI_DEMO_STR_TITLE_POPUP dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_POPUP") | 69 | #define DALI_DEMO_STR_TITLE_POPUP dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_POPUP") |
| 68 | -#define DALI_DEMO_STR_TITLE_PROGRESS_BAR dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_PROGRESS_BAR") | ||
| 69 | #define DALI_DEMO_STR_TITLE_PRIMITIVE_SHAPES dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_PRIMITIVE_SHAPES") | 70 | #define DALI_DEMO_STR_TITLE_PRIMITIVE_SHAPES dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_PRIMITIVE_SHAPES") |
| 71 | +#define DALI_DEMO_STR_TITLE_PROGRESS_BAR dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_PROGRESS_BAR") | ||
| 70 | #define DALI_DEMO_STR_TITLE_REFRACTION dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_REFRACTION") | 72 | #define DALI_DEMO_STR_TITLE_REFRACTION dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_REFRACTION") |
| 71 | #define DALI_DEMO_STR_TITLE_RENDERER_STENCIL dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_RENDERER_STENCIL") | 73 | #define DALI_DEMO_STR_TITLE_RENDERER_STENCIL dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_RENDERER_STENCIL") |
| 72 | #define DALI_DEMO_STR_TITLE_SCRIPT_BASED_UI dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_SCRIPT_BASED_UI") | 74 | #define DALI_DEMO_STR_TITLE_SCRIPT_BASED_UI dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_SCRIPT_BASED_UI") |
| @@ -81,11 +83,12 @@ extern "C" | @@ -81,11 +83,12 @@ extern "C" | ||
| 81 | #define DALI_DEMO_STR_TITLE_TEXT_LABEL_MULTI_LANGUAGE dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_TEXT_LABEL_MULTI_LANGUAGE") | 83 | #define DALI_DEMO_STR_TITLE_TEXT_LABEL_MULTI_LANGUAGE dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_TEXT_LABEL_MULTI_LANGUAGE") |
| 82 | #define DALI_DEMO_STR_TITLE_TEXT_SCROLLING dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_TEXT_SCROLLING") | 84 | #define DALI_DEMO_STR_TITLE_TEXT_SCROLLING dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_TEXT_SCROLLING") |
| 83 | #define DALI_DEMO_STR_TITLE_TILT_SENSOR dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_TILT_SENSOR") | 85 | #define DALI_DEMO_STR_TITLE_TILT_SENSOR dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_TILT_SENSOR") |
| 84 | -#define DALI_DEMO_STR_TITLE_FPP_GAME dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_FPP_GAME") | 86 | +#define DALI_DEMO_STR_TITLE_TOOLTIP dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_TOOLTIP") |
| 85 | #define DALI_DEMO_STR_TITLE_VISUAL_TRANSITIONS dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_VISUAL_TRANSITIONS") | 87 | #define DALI_DEMO_STR_TITLE_VISUAL_TRANSITIONS dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_VISUAL_TRANSITIONS") |
| 86 | 88 | ||
| 87 | #else // !INTERNATIONALIZATION_ENABLED | 89 | #else // !INTERNATIONALIZATION_ENABLED |
| 88 | 90 | ||
| 91 | +#define DALI_DEMO_STR_TITLE_ANIMATED_IMAGES "Animated Images" | ||
| 89 | #define DALI_DEMO_STR_TITLE_ANIMATED_SHAPES "Animated Shapes" | 92 | #define DALI_DEMO_STR_TITLE_ANIMATED_SHAPES "Animated Shapes" |
| 90 | #define DALI_DEMO_STR_TITLE_BLOCKS "Blocks" | 93 | #define DALI_DEMO_STR_TITLE_BLOCKS "Blocks" |
| 91 | #define DALI_DEMO_STR_TITLE_BUBBLES "Bubbles" | 94 | #define DALI_DEMO_STR_TITLE_BUBBLES "Bubbles" |
| @@ -96,6 +99,7 @@ extern "C" | @@ -96,6 +99,7 @@ extern "C" | ||
| 96 | #define DALI_DEMO_STR_TITLE_DISSOLVE_TRANSITION "Dissolve Effect" | 99 | #define DALI_DEMO_STR_TITLE_DISSOLVE_TRANSITION "Dissolve Effect" |
| 97 | #define DALI_DEMO_STR_TITLE_EFFECTS_VIEW "Effects View" | 100 | #define DALI_DEMO_STR_TITLE_EFFECTS_VIEW "Effects View" |
| 98 | #define DALI_DEMO_STR_TITLE_EMOJI_TEXT "Emoji Text" | 101 | #define DALI_DEMO_STR_TITLE_EMOJI_TEXT "Emoji Text" |
| 102 | +#define DALI_DEMO_STR_TITLE_FPP_GAME "First Person Game" | ||
| 99 | #define DALI_DEMO_STR_TITLE_FLEXBOX_PLAYGROUND "Flexbox Playground" | 103 | #define DALI_DEMO_STR_TITLE_FLEXBOX_PLAYGROUND "Flexbox Playground" |
| 100 | #define DALI_DEMO_STR_TITLE_IMAGE_FITTING_SAMPLING "Image Fitting and Sampling" | 104 | #define DALI_DEMO_STR_TITLE_IMAGE_FITTING_SAMPLING "Image Fitting and Sampling" |
| 101 | #define DALI_DEMO_STR_TITLE_IMAGE_SCALING "Image Scaling Grid" | 105 | #define DALI_DEMO_STR_TITLE_IMAGE_SCALING "Image Scaling Grid" |
| @@ -120,6 +124,7 @@ extern "C" | @@ -120,6 +124,7 @@ extern "C" | ||
| 120 | #define DALI_DEMO_STR_TITLE_PAGE_TURN_VIEW "Page Turn View" | 124 | #define DALI_DEMO_STR_TITLE_PAGE_TURN_VIEW "Page Turn View" |
| 121 | #define DALI_DEMO_STR_TITLE_POPUP "Popup" | 125 | #define DALI_DEMO_STR_TITLE_POPUP "Popup" |
| 122 | #define DALI_DEMO_STR_TITLE_PRIMITIVE_SHAPES "Primitive Shapes" | 126 | #define DALI_DEMO_STR_TITLE_PRIMITIVE_SHAPES "Primitive Shapes" |
| 127 | +#define DALI_DEMO_STR_TITLE_PROGRESS_BAR "Progress Bar" | ||
| 123 | #define DALI_DEMO_STR_TITLE_REFRACTION "Refract Effect" | 128 | #define DALI_DEMO_STR_TITLE_REFRACTION "Refract Effect" |
| 124 | #define DALI_DEMO_STR_TITLE_RENDERER_STENCIL "Renderer Stencils" | 129 | #define DALI_DEMO_STR_TITLE_RENDERER_STENCIL "Renderer Stencils" |
| 125 | #define DALI_DEMO_STR_TITLE_SCRIPT_BASED_UI "Script Based UI" | 130 | #define DALI_DEMO_STR_TITLE_SCRIPT_BASED_UI "Script Based UI" |
| @@ -134,8 +139,7 @@ extern "C" | @@ -134,8 +139,7 @@ extern "C" | ||
| 134 | #define DALI_DEMO_STR_TITLE_TEXT_LABEL_MULTI_LANGUAGE "Text Scripts" | 139 | #define DALI_DEMO_STR_TITLE_TEXT_LABEL_MULTI_LANGUAGE "Text Scripts" |
| 135 | #define DALI_DEMO_STR_TITLE_TEXT_SCROLLING "Text Scrolling" | 140 | #define DALI_DEMO_STR_TITLE_TEXT_SCROLLING "Text Scrolling" |
| 136 | #define DALI_DEMO_STR_TITLE_TILT_SENSOR "Tilt Sensor" | 141 | #define DALI_DEMO_STR_TITLE_TILT_SENSOR "Tilt Sensor" |
| 137 | -#define DALI_DEMO_STR_TITLE_PROGRESS_BAR "Progress Bar" | ||
| 138 | -#define DALI_DEMO_STR_TITLE_FPP_GAME "First Person Game" | 142 | +#define DALI_DEMO_STR_TITLE_TOOLTIP "Tooltip" |
| 139 | #define DALI_DEMO_STR_TITLE_VISUAL_TRANSITIONS "Visual Transitions" | 143 | #define DALI_DEMO_STR_TITLE_VISUAL_TRANSITIONS "Visual Transitions" |
| 140 | #endif | 144 | #endif |
| 141 | 145 |