return FindIndexFromMethodAndParams( method, params ) > -1;
}
-bool TraceCallStack::FindMethodAndParamsFromStartIndex( std::string method, std::string params, size_t& startIndex ) const
-{
- for( size_t i = startIndex; i < mCallStack.size(); ++i )
- {
- if( ( mCallStack[i].method.compare( method ) == 0 ) && ( mCallStack[i].paramList.compare( params ) == 0 ) )
- {
- startIndex = i;
- return true;
- }
- }
- return false;
-}
/**
* Search for a method in the stack with the given parameter list
bool FindMethodAndParams(std::string method, const NamedParams& params) const;
/**
- * Search for a method in the stack with the given parameter list.
- * The search is done from a given index.
- * This allows the order of methods and parameters to be checked.
- * @param[in] method The name of the method
- * @param[in] params A comma separated list of parameter values
- * @param[in/out] startIndex The method index to start looking from.
- * This is updated if a method is found so subsequent
- * calls can search for methods occuring after this one.
- * @return True if the method was in the stack
- */
- bool FindMethodAndParamsFromStartIndex( std::string method, std::string params, size_t& startIndex ) const;
-
- /**
* Search for a method in the stack with the given parameter list
* @param[in] method The name of the method
* @param[in] params A comma separated list of parameter values
Actor self = Self();
self.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::ALL_DIMENSIONS );
self.SetProperty( Actor::Property::COLOR_ALPHA, 0.0f );
-
- // The Popup Control background is a nine-patch image. We clip against this so the
- // contents are correctly clipped against the edges of the nine-patch.
- self.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN );
}
void TextSelectionPopup::OnStageConnection( int depth )
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
void TextSelectionToolbar::SetPopupMaxSize( const Size& maxSize )
{
mMaxSize = maxSize;
- if (mScrollView && mToolbarLayer )
+ if (mScrollView && mStencilLayer )
{
mScrollView.SetMaximumSize( mMaxSize );
- mToolbarLayer.SetMaximumSize( mMaxSize );
+ mStencilLayer.SetMaximumSize( mMaxSize );
}
}
void TextSelectionToolbar::SetUp()
{
Actor self = Self();
-
self.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::ALL_DIMENSIONS );
- // Create Layer to house the toolbar.
- mToolbarLayer = Layer::New();
- mToolbarLayer.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::ALL_DIMENSIONS );
- mToolbarLayer.SetAnchorPoint( AnchorPoint::CENTER );
- mToolbarLayer.SetParentOrigin( ParentOrigin::CENTER );
+ // Create Layer and Stencil. Layer enable's clipping when content exceed maximum defined width.
+ mStencilLayer = Layer::New();
+ mStencilLayer.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::ALL_DIMENSIONS );
+ mStencilLayer.SetParentOrigin( ParentOrigin::CENTER );
+
+ BufferImage stencilImage = BufferImage::WHITE(); // ImageView needs an Image or does nothing
+ Toolkit::ImageView stencil = Toolkit::ImageView::New(stencilImage);
+ stencil.SetDrawMode( DrawMode::STENCIL );
+ stencil.SetVisible( true );
+ stencil.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
+ stencil.SetParentOrigin( ParentOrigin::CENTER );
- if( !mScrollView )
+ if ( !mScrollView )
{
- mScrollView = Toolkit::ScrollView::New();
+ mScrollView = Toolkit::ScrollView::New();
}
SetUpScrollView();
mTableOfButtons.SetParentOrigin( ParentOrigin::CENTER_LEFT );
mTableOfButtons.SetAnchorPoint( AnchorPoint::CENTER_LEFT );
+ mStencilLayer.Add( stencil );
+ mStencilLayer.Add( mScrollView );
mScrollView.Add( mTableOfButtons );
- mToolbarLayer.Add( mScrollView );
-
- self.Add( mToolbarLayer );
+ self.Add( mStencilLayer );
}
void TextSelectionToolbar::OnScrollStarted( const Vector2& position )
void TextSelectionToolbar::RaiseAbove( Layer target )
{
- mToolbarLayer.RaiseAbove( target );
+ mStencilLayer.RaiseAbove( target );
}
void TextSelectionToolbar::ConfigureScrollview( const Property::Map& properties )
-#ifndef DALI_TOOLKIT_INTERNAL_TEXT_SELECTION_TOOLBAR_H
-#define DALI_TOOLKIT_INTERNAL_TEXT_SELECTION_TOOLBAR_H
+#ifndef __DALI_TOOLKIT_INTERNAL_TEXT_SELECTION_TOOLBAR_H__
+#define __DALI_TOOLKIT_INTERNAL_TEXT_SELECTION_TOOLBAR_H__
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
private: // Data
- Layer mToolbarLayer; ///< The layer used to house the toolbar.
+ Layer mStencilLayer; ///< The stencil layer
Toolkit::TableView mTableOfButtons; ///< Actor which holds all the buttons, sensitivity can be set on buttons via this actor
Toolkit::ScrollView mScrollView; ///< Provides scrolling of Toolbar when content does not fit.
RulerPtr mRulerX; ///< Ruler to clamp horizontal scrolling. Updates on Relayout
} // namespace Dali
-#endif // DALI_TOOLKIT_INTERNAL_TEXT_SELECTION_TOOLBAR_H
+#endif // __DALI_TOOLKIT_INTERNAL_TEXT_SELECTION_TOOLBAR_H__
{ "DRAW_MODE_NORMAL", DrawMode::NORMAL },
{ "DRAW_MODE_OVERLAY_2D", DrawMode::OVERLAY_2D },
+ { "DRAW_MODE_STENCIL", DrawMode::STENCIL },
{ "RESOURCE_LOADING", Dali::ResourceLoading },
{ "RESOURCE_LOADING_SUCCEEDED", Dali::ResourceLoadingSucceeded },
{ "ALPHA_FUNCTION_SIN", AlphaFunction::SIN },
{ "ALPHA_FUNCTION_EASE_OUT_BACK", AlphaFunction::EASE_OUT_BACK },
- { "CLIPPING_MODE_DISABLED", ClippingMode::DISABLED },
- { "CLIPPING_MODE_CLIP_CHILDREN", ClippingMode::CLIP_CHILDREN },
};
const unsigned int EnumTableCount = sizeof(EnumTable)/sizeof(EnumTable[0]);
+
+
+
+
+
} // un-named name space