Example #1
0
		/// <summary>
		/// Get the appropriate image for the current state as defined by the
		/// specified <see cref="StateImageItems"/>
		/// </summary>
		/// <param name="imageItems">Images and image state map</param>
		/// <returns>
		/// The appropriate image for the state, or the <c>Normal</c> image
		/// </returns>
		/// 
		
		private Image GetStatefulImage(StateImageItems imageItems) {
			Image image = null ;

			if (imageItems != null) {
				if (Enabled) {
					// mouse down
					if (isCaptionPressed) {
						image = imageItems.PressedImage ;
					}

					// isCaptionHot and isCaptionPressed can be true at the same time
					// so if we dont have a pressed image, try the hot image, otherwise...
					if (isCaptionHot && (image == null)) {
						image = imageItems.HighlightImage ;
					} 
				} else {
					image = imageItems.DisabledImage ;
				}

				// fall back
				if (image == null) {
					image = imageItems.NormalImage ;
				}
			}

			return image ;
		}
Example #2
0
		/// <summary>
		/// Resets the property value back to its default
		/// </summary>
		/// <remarks>
		/// Called by the IDE
		/// </remarks>
		protected void ResetExpandedGlyphs() {
			ExpandedGlyphs = new StateImageItems() ;
		}
Example #3
0
		/// <summary>
		/// Resets the property value back to its default
		/// </summary>
		/// <remarks>
		/// Called by the IDE
		/// </remarks>
	protected void ResetCollapsedGlyphs() {
			CollapsedGlyphs = new StateImageItems() ;
		}
Example #4
0
		/// <summary>
		/// Resets the property value back to its default
		/// </summary>
		/// <remarks>
		/// Called by the IDE
		/// </remarks>
		protected void ResetImageStates() {
			ImageItems = new StateImageItems() ;
		}