1
// RoundedFrame.cs created with MonoDevelop
2
// User: dave at 11:15 AM 8/25/2007
4
// To change standard headers go to Edit->Preferences->Coding->Standard Headers
17
public class SymbolDisplayLabel : Label
20
// const string displayFormat = " <big>{0}</big> \n {1} ";
23
const string displayFormat = "<span size=\"medium\"> {1} </span>";
26
string name, description;
28
public SymbolDisplayLabel () : base ()
30
highlight = name = description = "";
37
Ellipsize = Pango.EllipsizeMode.End;
38
Justify = Justification.Center;
39
ModifyFg (StateType.Normal, Style.White);
42
public IObject DisplayObject {
44
IObject displayObject;
46
displayObject = value;
47
name = description = highlight = "";
48
if (displayObject != null) {
49
name = displayObject.Name;
50
description = displayObject.Description;
52
SetDisplayLabel (name, description);
56
public void SetDisplayLabel (string name, string description) {
57
this.name = (name == null ? "" : name);
58
this.description = (description == null ? "" : description);
63
public string Highlight {
64
get { return highlight; }
66
highlight = (value == null ? "" : value);
73
string highlighted, safe_name, safe_description;
75
safe_name = Util.Appearance.MarkupSafeString (name);
76
safe_description = Util.Appearance.MarkupSafeString (description);
77
highlighted = Util.FormatCommonSubstrings(safe_name,
80
Markup = string.Format (displayFormat, highlighted, safe_description);