|
/////////////////////////////////////////////////////////////////////////////
//
// (c) 2007 BinaryComponents Ltd. All Rights Reserved.
//
// http://www.binarycomponents.com/
//
/////////////////////////////////////////////////////////////////////////////
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Diagnostics;
namespace BinaryComponents.WinFormsGloss.Controls.Ribbon
{
public abstract class Item
{
public const int StandardImportance = 10;
public const int BestLevelOfDetail = -2;
public const int WorstLevelOfDetail = 20;
protected Item()
{
}
public Section Section
{
[DebuggerStepThrough]
get
{
return _section;
}
internal set
{
_section = value;
}
}
public int Importance
{
[DebuggerStepThrough]
get
{
return _importance;
}
set
{
_importance = value;
}
}
public bool Visible
{
get
{
return _visible;
}
set
{
if( _visible == value )
{
return;
}
_visible = value;
if( Section != null )
{
Section.NotifyItemChanged( this );
}
}
}
public virtual bool NeedsMouseOverUpdate
{
get
{
return false;
}
}
public void PerformClick( Context context )
{
OnClick( context );
}
public abstract Size GetLogicalSize( RibbonControl ribbonControl, Graphics g, Size suggestedSize );
public abstract void Paint( Context context, Rectangle clip, Rectangle logicalBounds );
public virtual bool HasStyle( string style )
{
return false;
}
public virtual SuperToolTipInfo GetTooltipInfo()
{
return null;
}
public virtual System.Windows.Forms.ToolStripItem CreateEquivalentToolStripItem()
{
return null;
}
protected virtual bool OnClick( Context context )
{
return false;
}
private Section _section;
private int _importance = Item.StandardImportance;
private bool _visible = true;
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I'm currently working for a small start-up company, BinaryComponents Ltd, producing the FeedGhost RSS reader.
FeedGhost RSS Reader:
http://www.feedghost.com
Bespoke Software Development
http://www.binarycomponents.com