Func <PixelFarm.Drawing.GLES2.MyGLDrawBoard> _getDrawboard; // public MyRootGraphic( int width, int height) : base(width, height) { _gfxTimerTaskMx = new GraphicsTimerTaskManager(this); _defaultTextEditFont = MyFontSettings.DefaultRootGraphicsFont; #if DEBUG dbugCurrentGlobalVRoot = this; dbug_Init(null, null, null); #endif //create default render box*** _topWindowRenderBox = new TopWindowRenderBox(this, width, height); _topWindowEventRoot = new TopWindowEventRoot(this, _topWindowRenderBox); _gfxTimerTask = this.SubscribeGraphicsIntervalTask(_normalUpdateTask, TaskIntervalPlan.Animation, 20, (s, e) => { this.PrepareRender(); this.FlushAccumGraphics(); }); _primaryContainerElement = _topWindowRenderBox; }
public MyRootGraphic( int width, int height, ITextService ifonts) : base(width, height) { this._ifonts = ifonts; this.graphicTimerTaskMan = new GraphicsTimerTaskManager(this); _defaultTextEditFont = new RequestFont("tahoma", 10); #if DEBUG dbugCurrentGlobalVRoot = this; dbug_Init(null, null, null); #endif //create default render box*** this.topWindowRenderBox = new TopWindowRenderBox(this, width, height); this.topWindowEventRoot = new TopWindowEventRoot(this.topWindowRenderBox); this.SubscribeGraphicsIntervalTask(normalUpdateTask, TaskIntervalPlan.Animation, 20, (s, e) => { this.PrepareRender(); this.FlushAccumGraphics(); }); }
public MyRootGraphic(UIPlatform uiPlatform, GraphicsPlatform gfxPlatform, int width, int height) : base(width, height) { this.uiPlatform = uiPlatform; this.graphicsPlatform = gfxPlatform; this.graphicTimerTaskMan = new GraphicsTimerTaskManager(this, uiPlatform); #if DEBUG dbugCurrentGlobalVRoot = this; dbug_Init(); #endif //create default render box*** this.topWindowRenderBox = new TopWindowRenderBox(this, width, height); this.topWindowEventRoot = new TopWindowEventRoot(this.topWindowRenderBox); this.SubscribeGraphicsIntervalTask(normalUpdateTask, TaskIntervalPlan.Animation, 20, (s, e) => { this.PrepareRender(); this.FlushAccumGraphics(); }); }
public MyRootGraphic(UIPlatform uiPlatform, int width, int height) : base(width, height) { this.uiPlatform = uiPlatform; this.graphicTimerTaskMan = new GraphicsTimerTaskManager(this, uiPlatform); _defaultTextEditFont = new RequestFont("tahoma", 10); #if DEBUG dbugCurrentGlobalVRoot = this; dbug_Init(null, null, null); #endif //create default render box*** this.topWindowRenderBox = new TopWindowRenderBox(this, width, height); this.topWindowEventRoot = new TopWindowEventRoot(this.topWindowRenderBox); this.SubscribeGraphicsIntervalTask(normalUpdateTask, TaskIntervalPlan.Animation, 20, (s, e) => { this.PrepareRender(); this.FlushAccumGraphics(); }); }
void debug_RecordLineInfo(RenderBoxBase owner, EditableTextLine line) { RootGraphic visualroot = this.dbugVRoot; if (visualroot.dbug_RecordDrawingChain) { } }
public void ShowMenu(RootGraphic rootgfx) { //add to topmost box if (!showing) { this.topWindow = rootgfx.TopWindowRenderBox; if (topWindow != null) { topWindow.AddChild(this.myRenderE = this.GetPrimaryRenderElement(topWindow.Root)); } showing = true; } }
internal override void UpdateCpuBlitSurface(Rectangle updateArea) { //_gdiDrawBoard.RenderSurface.Win32DC.SetClipRect(updateArea.X, updateArea.Y, updateArea.Width, updateArea.Height); //_gdiDrawBoard.RenderSurface.Win32DC.PatBlt(Win32.NativeWin32MemoryDC.PatBltColor.White); //_gdiDrawBoard.RenderSurface.Win32DC.ClearClipRect(); //------------ //update software part content RenderBoxBase primElem = base.CpuBlitCanvasRenderElement; if (HasCpuBlitUpdateSurfaceDel) { RaiseUpdateCpuBlitSurface(updateArea); } }
void SetupHorizontalScrollButtonProperties(RenderBoxBase container) { var scroll_button = new ScrollBarButton(10, this.Height, this); //create with default value scroll_button.BackColor = KnownColors.FromKnownColor(KnownColor.DarkBlue); int thumbPosX = CalculateThumbPosition() + _minmax_boxHeight; scroll_button.SetLocation(thumbPosX, 0); container.AddChild(scroll_button); _scrollButton = scroll_button; //---------------------------- EvaluateHorizontalScrollBarProperties(); //---------------------------- //3. drag scroll_button.MouseDrag += (s, e) => { //dragging ... //find x-diff Point pos = scroll_button.Position; //if vscroll bar then move only y axis int newXPos = (int)(pos.X + e.DiffCapturedX); //clamp! if (newXPos >= this.Width - (_minmax_boxHeight + _scrollButton.Width)) { newXPos = this.Width - (_minmax_boxHeight + _scrollButton.Width); } else if (newXPos < _minmax_boxHeight) { newXPos = _minmax_boxHeight; } //calculate value from position int currentMarkAt = (newXPos - _minmax_boxHeight); _scrollValue = (float)(_onePixelFor * currentMarkAt); newXPos = CalculateThumbPosition() + _minmax_boxHeight; scroll_button.SetLocation(newXPos, pos.Y); // this.UserScroll?.Invoke(this, EventArgs.Empty); // e.StopPropagation(); }; }
// void SetupMinButtonProperties(RenderBoxBase container) { ScrollBarButton min_button; if (this.ScrollBarType == ScrollBarType.Horizontal) { min_button = new ScrollBarButton(_minmax_boxHeight, this.Height, this); } else { min_button = new ScrollBarButton(this.Width, _minmax_boxHeight, this); } min_button.BackColor = KnownColors.FromKnownColor(KnownColor.DarkGray); min_button.MouseUp += (s, e) => this.StepSmallToMin(); container.AddChild(min_button); _minButton = min_button; }
public override void TopDownReArrangeContent() { //vinv_IsInTopDownReArrangePhase = true; #if DEBUG vinv_dbug_EnterLayerReArrangeContent(this); #endif //this.BeginLayerLayoutUpdate(); RenderBoxBase container = this.OwnerRenderElement as RenderBoxBase; if (container != null) { PerformHorizontalFlowArrange(0, container.Width, 0); } if (Reflow != null) { Reflow(this, EventArgs.Empty); } //this.EndLayerLayoutUpdate(); #if DEBUG vinv_dbug_ExitLayerReArrangeContent(); #endif }
protected static void SetCalculatedSize(RenderBoxBase v, int w, int h) { v.b_width = w; v.b_height = h; v.MarkHasValidCalculateSize(); }
void debug_RecordLineInfo(RenderBoxBase owner, EditableTextLine line) { RootGraphic visualroot = this.dbugVRoot; if (visualroot.dbug_RecordDrawingChain) { } }
public void ShowMenu(RootGraphic rootgfx) { //add to topmost box if (!showing) { this.topWindow = rootgfx.TopWindowRenderBox; if (topWindow != null) { topWindow.AddChild(this.myRenderE = this.GetPrimaryRenderElement(topWindow.Root)); } showing = true; } }
public static void AddChild(this RenderBoxBase renderBox, UIElement ui) { renderBox.AddChild(ui.GetPrimaryRenderElement()); }
protected static void SetCalculatedSize(RenderBoxBase v, int w, int h) { v.b_width = w; v.b_height = h; v.MarkHasValidCalculateSize(); }