public void SetAlign(Align align, GfxPoint offset) { TextOffset = offset ?? new GfxPoint(0, 0); TextAlign = align; if (OnTextChange != null) { OnTextChange(this); } }
public GraphicsData(GraphicsData reflect) { Color = new Color { A = reflect.Color.A, R = reflect.Color.R, G = reflect.Color.G, B = reflect.Color.B, }; Position = new GfxPoint(reflect.Position.X, reflect.Position.Y); StrokeWidth = reflect.StrokeWidth; Data = reflect.Data; }
private void InitWidget(int x = 0, int y = 0, int width = 0, int height = 0) { Name = "unknown"; State = ButtonState.Released; Move(x, y); Resize(width, height); RotateCenter = new GfxPoint(0, 0); //RotateCenter = new GfxPoint(Width / 2, Height / 2); Rotate(0); IsVisible = true; IsActive = true; mCheckHoldKey.OnTimeout += sender => mApplication.PostEvent(Application.EventType.KeyHold, this); }
public void AddColumn(int width, string fontName, Align textAlign, int fontSize, Color fontColor, GfxPoint textOffset) { var cell = new TextArea(this, Width, 0, width, Height) { Name = "cell" }; cell.SetAlign(textAlign, textOffset); cell.SetFont(fontName, fontColor, fontSize); cell.OnPress = CellPressed; cell.OnRelease = CellReleased; mCells.Add(cell); Resize(Width + width, Height); }