Example #1
0
        public override List<DisplayListMember> GetTabChildren()
        {
            List<DisplayListMember> list = new List<DisplayListMember>();
            list.AddRange(new DisplayListMember[]{ _btnCc, _btnBcc, _txtTo });

            if (_btnCc.Selected)
                list.Add(_txtCc);
            if (_btnBcc.Selected)
                list.Add(_txtBcc);

            list.AddRange(new DisplayListMember[]{ _txtMessage, _btnSend });

            return list;
        }
Example #2
0
        override public List<DisplayListMember> GetTabChildren()
        {
            List<DisplayListMember> list = new List<DisplayListMember>();

            /*_fieldGroup.*/Children.ForEach(delegate(DisplayListMember child) // form items
            {
                Group itemGroup = child as Group; // form item
                if (null != itemGroup)
                {
                    //Debug.Log("list: " + list.Count);
                    list.AddRange(
                        itemGroup.ContentChildren.FindAll(delegate(DisplayListMember child2)
                        {
                            InteractiveComponent c = child2 as InteractiveComponent;
                            return null != c && c.Enabled && c.Visible && c.FocusEnabled;
                        })
                    );
                }
            });

            return list;
        }
Example #3
0
		public static Type TYPE_TO_MONITOR; // = typeof(ImageButtonSkin);
	
// ReSharper restore MemberCanBePrivate.Global
// ReSharper restore FieldCanBeMadeReadOnly.Global
// ReSharper restore UnassignedField.Global
// ReSharper restore InconsistentNaming
// ReSharper restore UnusedMember.Global
#endif

		/**
		 *  
		 *  Implements the getClassStyleDeclarations() logic
		 *  for Component and TextBase.
		 *  The 'object' parameter will be one or the other.
		 */
		internal static List<StyleDeclaration> GetClassStyleDeclarations(IStyleClient client)
		{
			/*if (client.GetType().FullName == "Assets.eDriven.Skins.ImageButtonSkin")
				Debug.Log("GetMatchingStyleDeclarations for: " + client);*/

			StyleManager styleManager = StyleManager.Instance;
			//bool qualified = true;
			string className = client.GetType().FullName;
			//IStyleClient advancedObject = client as IStyleClient;
			OrderedObject<bool> typeHierarchy = TypeHierarchyHelper.GetTypeHierarchy(client.GetType()); //, qualified);
			List<string> types = typeHierarchy.Keys;
			int typeCount = types.Count;

			//Debug.Log("typeCount for " + client + ": " + typeHierarchy);

			List<StyleDeclaration> classDecls = null;
			/*if (styleManager.TypeSelectorCache.ContainsKey(className))
				classDecls = styleManager.TypeSelectorCache[className];*/
			/*if (null != classDecls)
				return classDecls;*/

			classDecls = new List<StyleDeclaration>();

			// Loop over the type hierarhcy starting at the base type and work
			// down the chain of subclasses.
			for (int i = typeCount - 1; i >= 0; i--)
			{
				string type = types[i]; //.toString(); && TODO??

				//Debug.Log("Getting decls for " + type);
				List<StyleDeclaration> decls = styleManager.GetStyleDeclarations(type);
				if (null != decls)
				{
					//Debug.Log("  ->" + decls.Count);
					var matchingDecls = MatchStyleDeclarations(decls, client);
					if (null != matchingDecls)
						classDecls.AddRange(matchingDecls);
				}
			}

			#region Monitor

//#if DEBUG
//            if (null != TYPE_TO_MONITOR)
//            {
//                if (client.GetType() == TYPE_TO_MONITOR)
//                    Debug.Log(string.Format(@"### {0} classDecls ###
//{1}", TYPE_TO_MONITOR, ListUtil<StyleDeclaration>.Format(classDecls)));
//            }
//#endif

			#endregion

			classDecls = SortOnSpecificity(classDecls); //classDecls.Sort(SpecificitySort); // = SortOnSpecificity(classDecls);

			#region Monitor

//#if DEBUG
//            if (null != TYPE_TO_MONITOR)
//            {
//                if (client.GetType() == TYPE_TO_MONITOR)
//                    Debug.Log(string.Format(@"### {0} classDecls 2 ###
//{1}", TYPE_TO_MONITOR, ListUtil<StyleDeclaration>.Format(classDecls)));
//            }
//#endif

			#endregion

			#region Always advanced - NO caching!

/*if (styleManager.HasAdvancedSelectors()/* && advancedObject != null#1#)
			{
				// Advanced selectors may result in more than one match per type so
				// we sort based on specificity, but we preserve the declaration
				// order for equal selectors.
				classDecls = SortOnSpecificity(classDecls);
			}
			else
			{
				// Cache the simple type declarations for this class 
				styleManager.TypeSelectorCache[className] = classDecls;
			}*/

			#endregion


			return classDecls;
		}
Example #4
0
 public override List<DisplayListMember> GetTabChildren()
 {
     List<DisplayListMember> list = new List<DisplayListMember>();
     list.AddRange(new DisplayListMember[]{ _txtUsername, _txtPassword, _btnSubmit });
     return list;
 }