Exemplo n.º 1
0
 public static void DrawMenuGlyph
     (Graphics graphics, int x, int y, int width,
     int height, MenuGlyph glyph)
 {
     ThemeManager.MainPainter.DrawMenuGlyph
         (graphics, x, y, width, height, glyph);
 }
Exemplo n.º 2
0
        private VisualStyleElement GetMenuGlyphVsElement(MenuGlyph glyph, bool enabled)
        {
            switch (glyph)
            {
            case MenuGlyph.Arrow:
                return(VisualStyleElement.CreateElement(_vsClass, 16, enabled ? 1 : 2));

            case MenuGlyph.Bullet:
                return(VisualStyleElement.CreateElement(_vsClass, 11, enabled ? 3 : 4));

            case MenuGlyph.Checkmark:
                return(VisualStyleElement.CreateElement(_vsClass, 11, enabled ? 1 : 2));

            default:
                throw new ArgumentException("Supported value.", nameof(glyph));
            }
        }
        private VisualStyleElement GetMenuGlyphVSElement(MenuGlyph glyph, bool enabled)
        {
            switch (glyph)
            {
            case MenuGlyph.Arrow:
                if (enabled)
                {
                    return(VisualStyleElement.CreateElement(vsClass, 16, 1));
                }
                else
                {
                    return(VisualStyleElement.CreateElement(vsClass, 16, 2));
                }

            case MenuGlyph.Bullet:
                if (enabled)
                {
                    return(VisualStyleElement.CreateElement(vsClass, 11, 3));
                }
                else
                {
                    return(VisualStyleElement.CreateElement(vsClass, 11, 4));
                }

            case MenuGlyph.Checkmark:
                if (enabled)
                {
                    return(VisualStyleElement.CreateElement(vsClass, 11, 1));
                }
                else
                {
                    return(VisualStyleElement.CreateElement(vsClass, 11, 2));
                }

            default:
                throw new ArgumentException("Supported value.", nameof(glyph));
            }
        }
 public static void DrawMenuGlyph(Graphics graphics, int x, int y, int width, int height, MenuGlyph glyph)
 {
     DrawFrameControl(graphics, x, y, width, height, 2, (int) glyph, Color.Empty, Color.Empty);
 }
Exemplo n.º 5
0
	public static void DrawMenuGlyph
				(Graphics graphics, int x, int y, int width,
				 int height, MenuGlyph glyph)
			{
				ThemeManager.MainPainter.DrawMenuGlyph
					(graphics, x, y, width, height, glyph);
			}
 public static void DrawMenuGlyph(System.Drawing.Graphics graphics, System.Drawing.Rectangle rectangle, MenuGlyph glyph)
 {
 }
 public static void DrawMenuGlyph(Graphics graphics, Rectangle rectangle, MenuGlyph glyph)
 {
     DrawMenuGlyph(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, glyph);
 }
		public static void DrawMenuGlyph (Graphics graphics, int x, int y, int width, int height, MenuGlyph glyph, Color foreColor, Color backColor)
		{
			DrawMenuGlyph (graphics, new Rectangle (x, y, width, height), glyph, foreColor, backColor);
		}
	public static void DrawMenuGlyph(System.Drawing.Graphics graphics, System.Drawing.Rectangle rectangle, MenuGlyph glyph, System.Drawing.Color foreColor, System.Drawing.Color backColor) {}
 public static void DrawMenuGlyph(Graphics graphics, int x, int y, int width, int height, MenuGlyph glyph)
 {
     DrawMenuGlyph(graphics, new Rectangle(x, y, width, height), glyph);
 }
Exemplo n.º 11
0
		public static void DrawMenuGlyph (Graphics graphics, Rectangle rectangle, MenuGlyph glyph, Color foreColor, Color backColor)
		{
			ThemeEngine.Current.CPDrawMenuGlyph (graphics, rectangle, glyph, foreColor, backColor);
		}
 public static void DrawMenuGlyph(Graphics graphics, Rectangle rectangle, MenuGlyph glyph)
 {
     ThemeEngine.Current.CPDrawMenuGlyph(graphics, rectangle, glyph, ThemeEngine.Current.ColorMenuText, Color.Empty);
 }
 public static void DrawMenuGlyph(Graphics graphics, Rectangle rectangle, MenuGlyph glyph, Color foreColor, Color backColor)
 {
     ThemeEngine.Current.CPDrawMenuGlyph(graphics, rectangle, glyph, foreColor, backColor);
 }
 public static void DrawMenuGlyph(System.Drawing.Graphics graphics, int x, int y, int width, int height, MenuGlyph glyph, System.Drawing.Color foreColor, System.Drawing.Color backColor)
 {
 }
 public static void DrawMenuGlyph(System.Drawing.Graphics graphics, int x, int y, int width, int height, MenuGlyph glyph)
 {
 }
 public static void DrawMenuGlyph(System.Drawing.Graphics graphics, System.Drawing.Rectangle rectangle, MenuGlyph glyph, System.Drawing.Color foreColor, System.Drawing.Color backColor)
 {
 }
Exemplo n.º 17
0
 public static void DrawMenuGlyph(Graphics graphics, int x, int y, int width, int height, MenuGlyph glyph, Color foreColor, Color backColor)
 {
     throw null;
 }
 public static void DrawMenuGlyph(Graphics graphics, int x, int y, int width, int height, MenuGlyph glyph, Color foreColor, Color backColor)
 {
     DrawMenuGlyph(graphics, new Rectangle(x, y, width, height), glyph, foreColor, backColor);
 }
Exemplo n.º 19
0
		public static void DrawMenuGlyph(Graphics graphics, Rectangle rectangle, MenuGlyph glyph) {

			ThemeEngine.Current.CPDrawMenuGlyph (graphics, rectangle, glyph, ThemeEngine.Current.ColorMenuText, Color.Empty);
		}
Exemplo n.º 20
0
 // Draw a menu glyph.
 public static void DrawMenuGlyph
     (Graphics graphics, Rectangle rectangle, MenuGlyph glyph)
 {
     DrawMenuGlyph(graphics, rectangle.X, rectangle.Y,
                   rectangle.Width, rectangle.Height, glyph);
 }
Exemplo n.º 21
0
		public static void DrawMenuGlyph(Graphics graphics, int x, int y, int width, int height, MenuGlyph glyph) {
			DrawMenuGlyph(graphics, new Rectangle(x, y, width, height), glyph);
		}
	public static void DrawMenuGlyph(System.Drawing.Graphics graphics, int x, int y, int width, int height, MenuGlyph glyph, System.Drawing.Color foreColor, System.Drawing.Color backColor) {}
	public static void DrawMenuGlyph(System.Drawing.Graphics graphics, System.Drawing.Rectangle rectangle, MenuGlyph glyph) {}
Exemplo n.º 24
0
		public override void CPDrawMenuGlyph (Graphics graphics, Rectangle rectangle, MenuGlyph glyph, Color color, Color backColor) {
			Rectangle	rect;
			int			lineWidth;

			if (backColor != Color.Empty)
				graphics.FillRectangle (ResPool.GetSolidBrush (backColor), rectangle);
				
			Brush brush = ResPool.GetSolidBrush (color);

			switch(glyph) {
			case MenuGlyph.Arrow: {
				float height = rectangle.Height * 0.7f;
				float width  = height / 2.0f;
				
				PointF ddCenter = new PointF (rectangle.X + ((rectangle.Width-width) / 2.0f), rectangle.Y + (rectangle.Height / 2.0f));

				PointF [] vertices = new PointF [3];
				vertices [0].X = ddCenter.X;
				vertices [0].Y = ddCenter.Y - (height / 2.0f);
				vertices [1].X = ddCenter.X;
				vertices [1].Y = ddCenter.Y + (height / 2.0f);
				vertices [2].X = ddCenter.X + width + 0.1f;
				vertices [2].Y = ddCenter.Y;
				
				graphics.FillPolygon (brush, vertices);

				return;
			}

			case MenuGlyph.Bullet: {
				
				lineWidth=Math.Max(2, rectangle.Width/3);
				rect=new Rectangle(rectangle.X+lineWidth, rectangle.Y+lineWidth, rectangle.Width-lineWidth*2, rectangle.Height-lineWidth*2);
				
				graphics.FillEllipse(brush, rect);
				
				return;
			}

			case MenuGlyph.Checkmark: {
				
				Pen pen = ResPool.GetPen (color);
				lineWidth = Math.Max (2, rectangle.Width / 6);
				rect = new Rectangle(rectangle.X + lineWidth, rectangle.Y + lineWidth, rectangle.Width - lineWidth * 2, rectangle.Height- lineWidth * 2);

				int Scale = Math.Max (1, rectangle.Width / 12);
				int top = (rect.Y + lineWidth + ((rect.Height - ((2 * Scale) + lineWidth)) / 2));

				for (int i=0; i<lineWidth; i++) {
					graphics.DrawLine (pen, rect.Left+lineWidth/2, top+i, rect.Left+lineWidth/2+2*Scale, top+2*Scale+i);
					graphics.DrawLine (pen, rect.Left+lineWidth/2+2*Scale, top+2*Scale+i, rect.Left+lineWidth/2+6*Scale, top-2*Scale+i);
				}
				return;
			}
			}

		}
	public static void DrawMenuGlyph(System.Drawing.Graphics graphics, int x, int y, int width, int height, MenuGlyph glyph) {}
Exemplo n.º 26
0
		public abstract void CPDrawMenuGlyph (Graphics graphics, Rectangle rectangle, MenuGlyph glyph, Color color, Color backColor);
Exemplo n.º 27
0
		protected Bitmap CreateGlyphBitmap (Size size, MenuGlyph glyph, Color color)
		{
			Color bg_color;
			if (color.R == 0 && color.G == 0 && color.B == 0)
				bg_color = Color.White;
			else
				bg_color = Color.Black;
			
			Bitmap	bmp = new Bitmap (size.Width, size.Height);
			Graphics gr = Graphics.FromImage (bmp);
			Rectangle rect = new Rectangle (Point.Empty, size);
			gr.FillRectangle (ResPool.GetSolidBrush (bg_color), rect);
			CPDrawMenuGlyph (gr, rect, glyph, color, Color.Empty);
			bmp.MakeTransparent (bg_color);
			gr.Dispose ();
			
			return bmp;
		}
Exemplo n.º 28
0
 public static void DrawMenuGlyph(Graphics graphics, Rectangle rectangle, MenuGlyph glyph)
 {
     throw null;
 }
Exemplo n.º 29
0
Arquivo: Theme.cs Projeto: yonder/mono
 public abstract void CPDrawMenuGlyph(Graphics graphics, Rectangle rectangle, MenuGlyph glyph, Color color, Color backColor);
Exemplo n.º 30
0
 public static void DrawMenuGlyph(Graphics graphics, Rectangle rectangle, MenuGlyph glyph, Color foreColor, Color backColor)
 {
     throw null;
 }
 public static void DrawMenuGlyph(Graphics graphics, Rectangle rectangle, MenuGlyph glyph, Color foreColor, Color backColor)
 {
     DrawMenuGlyph(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, glyph, foreColor, backColor);
 }
Exemplo n.º 32
0
 public static void DrawMenuGlyph(Graphics graphics, int x, int y, int width, int height, MenuGlyph glyph)
 {
     throw null;
 }
 public static void DrawMenuGlyph(Graphics graphics, int x, int y, int width, int height, MenuGlyph glyph, Color foreColor, Color backColor)
 {
     DrawFrameControl(graphics, x, y, width, height, 2, (int) glyph, foreColor, backColor);
 }
	// Draw a menu glyph.
	public virtual void DrawMenuGlyph
				(Graphics graphics, int x, int y, int width,
				 int height, MenuGlyph glyph)
			{
				switch(glyph)
				{
					case MenuGlyph.Arrow:
					{
						DrawGlyph(graphics, x, y, width, height,
								  Glyphs.menu_arrow_bits,
								  Glyphs.menu_arrow_width,
								  Glyphs.menu_arrow_height,
								  SystemColors.MenuText);
					}
					break;

					case MenuGlyph.Checkmark:
					{
						DrawGlyph(graphics, x, y, width, height,
								  Glyphs.menu_checkmark_bits,
								  Glyphs.menu_checkmark_width,
								  Glyphs.menu_checkmark_height,
								  SystemColors.MenuText);
					}
					break;

					case MenuGlyph.Bullet:
					{
						DrawGlyph(graphics, x, y, width, height,
								  Glyphs.menu_bullet_bits,
								  Glyphs.menu_bullet_width,
								  Glyphs.menu_bullet_height,
								  SystemColors.MenuText);
						
					}
					break;
				}
			}