Пример #1
0
Ctrl& Ctrl::BackPaintHint()
{
	GuiLock __;
	if(IsDecentMachine())
		BackPaint();
	return *this;
}
Пример #2
0
DockCont::DockCont()
{
	dragging = false;
	dockstate = STATE_NONE;
	base = NULL;
	waitsync = false;
	ignoreminsize = false;
	usersize.cx = usersize.cy = Null;
	BackPaint();
#ifdef PLATFORM_WIN32
	ToolWindow();
#endif
	NoCenter().Sizeable(true).MaximizeBox(false).MinimizeBox(false);

	AddFrame(FieldFrame());
	AddFrame(tabbar);
	AddFrame(handle);
	tabbar.AutoHideMin(1);
	tabbar.WhenCursor 		= THISBACK(TabSelected);
	tabbar.WhenDrag 		= THISBACK(TabDragged);
	tabbar.WhenContext 		= THISBACK(TabContext);
	tabbar.WhenClose 		= THISBACK(TabClosed);
	tabbar.WhenCloseAll		= THISBACK(RefreshLayout);
	tabbar.SetBottom();

	handle << close << autohide << windowpos;
	handle.WhenContext = THISBACK(WindowMenu);
	handle.WhenLeftDrag = THISBACK(MoveBegin);
	close.Tip(t_("Close")) 				<<= THISBACK(CloseAll);
	autohide.Tip(t_("Auto-Hide")) 		<<= THISBACK(AutoHide);
	windowpos.Tip(t_("Window Menu")) 	<<= THISBACK(WindowMenu);
	WhenClose 							= THISBACK(CloseAll);
}
Пример #3
0
ScrollBar::ScrollBar() {
	minthumb = 16;
	pagepos = pagesize = totalsize = 0;
	linesize = 1;
	autohide = false;
	autodisable = true;
	jump = false;
	track = true;
	horz = false;
	thumbsize = 8;
	thumbpos = 0;
	push = light = -1;
	Add(prev);
	Add(prev2);
	Add(next);
	Add(next2);
	NoWantFocus();
	prev.ScrollStyle().NoWantFocus().Transparent();
	prev.WhenPush = prev.WhenRepeat = callback(this, &ScrollBar::PrevLine);
	prev.WhenPush << Proxy(WhenLeftClick);
	prev2.ScrollStyle().NoWantFocus().Transparent();
	prev2.WhenRepeat = prev.WhenRepeat;
	prev2.WhenPush = prev.WhenPush;
	next.ScrollStyle().NoWantFocus().Transparent();
	next.WhenPush = next.WhenRepeat = callback(this, &ScrollBar::NextLine);
	next.WhenPush << Proxy(WhenLeftClick);
	next2.ScrollStyle().NoWantFocus().Transparent();
	next2.WhenRepeat = next.WhenRepeat;
	next2.WhenPush = next.WhenPush;
	style = NULL;
	SetStyle(StyleDefault());
	BackPaint();
}
Пример #4
0
RGBACtrl::RGBACtrl()
{
	color = Black();
	BackPaint();
	Add(ramp);
	ramp <<= THISBACK(Ramp);
	Add(alpha);
	alpha <<= THISBACK(Alpha);
	text.SetFont(CourierZ(11));
	text.NoWantFocus();
	text.SetReadOnly();
	Add(text);
	SyncText();
}
Пример #5
0
//you can have it as standard.... and even do not change
VegaMain::VegaMain()
{
	CtrlLayout(*this, "Forlano Vega Main");
	spls.Vert();
	spls.SetPos(8000);
//	spls.Vert(tabs, consoleFrame);
	spls.Add(tabs);
	spls.Add(consoleFrame);
	rubbish = " ";

	SetBars();
	SetTabs();
	Init();
	BackPaint();
}
Пример #6
0
Threads::Threads()
	: threads(0)
	, area(-2.0,-1.1, 0.60, 1.1)
	, densityR (1)
	, densityC (1)
	, rows (1)
	, cols (1)
	, julia_c(Complex(-0.4,0.6))
	, posOnClick(0,0)
	, moveShift(0,0)
	, moving(false)
{
	SetLanguage(SetLNGCharset(GetSystemLNG(), CHARSET_UTF8));
	CtrlLayout(*this, t_("Threads"));
	inp_col.SetData(4);
	inp_row.SetData(3);
	inp_iter.SetData(500);
	inp_threads.SetData(3);
	edb_re.SetData(-0.4);
	edb_im.SetData(0.6);
	AddFrame(statusBar);
	
	statusBar.AddFrame(time.Right(140));
	
	BackPaint();
	Zoomable().Sizeable();
	picbox.onPaint = callback(this, &Threads::picbox_Paint);
	picbox.onLeftDown = callback(this, &Threads::picbox_LeftDown);
	picbox.onLeftUp = callback(this, &Threads::picbox_LeftUp);
	picbox.onMouseMove= callback(this, &Threads::picbox_MouseMove);
	
	cbx_fractal_set.Add( t_("Mandelbrot"));
	cbx_fractal_set.Add( t_("Qubic Mandelbrot"));
	cbx_fractal_set.Add( t_("Quadric Mandelbrot"));
	cbx_fractal_set.Add( t_("Julia Set"));
	cbx_fractal_set.Add( t_("Qubic Julia Set"));
	cbx_fractal_set.Add( t_("Quadric Julia Set"));
	cbx_fractal_set.Add( t_("Phoenix Set"));
	cbx_fractal_set.Add( t_("BacPhoenix Set"));
	cbx_fractal_set.Add( t_("Bać Set - my own :) discovered by mistake..."));
	
	cbx_fractal_set.WhenAction = THISBACK(SetSelected);
	btn_recalculate.WhenAction = THISBACK(DoJob);
	cbx_fractal_set.SetIndex(0);
}
Пример #7
0
RasterCtrlTestWindow::RasterCtrlTestWindow()
{
	// sets up frame, menu and statusbar
    AddFrame( menu );
    AddFrame( TopSeparatorFrame() );
    AddFrame( status );
    AddFrame( InsetFrame() );

	// populates menu
    menu.Set( THISBACK( MainMenu ) );

	// adds raster control
	Add(rasterCtrl.HSizePos().VSizePos());

    Sizeable().Zoomable();
	BackPaint();

//	view.Open("/home/massimo/sources/uppdev/gatofax/fax000000002.tif");
//	view.Open("/home/massimo/pluto.tif");
	Refresh();

}
Пример #8
0
HelpWindow::HelpWindow()
{
	tree_view.Horz(tree, view);
	tree_view.SetPos(3000);
	Add(tree_view.SizePos());
	tree_view.Zoom(1);
	Sizeable().Zoomable();
	Title(t_("Help"));
	BackPaint();
	view.WhenLink = THISBACK(GoTo);
	AddFrame(toolbar);
	view.SetZoom(Zoom(1, 1));
	zoom.m = 160;
	SetZoom();
	view.Margins(Rect(12, 0, 12, 0));
	SetRect(Ctrl::GetWorkArea().Deflated(80));
	tree.WhenSel = THISBACK(TreeCursor);
	tree.NoRoot();
	Icon(CtrlImg::help());
	SetBar();
	tree.BackPaint();
	view.BackPaintHint();
}
Пример #9
0
cyclic_space::cyclic_space()
{   
	Sizeable().Zoomable();
	SetRect(100, 100, 640, 480);
	col[0] = LtGreen;
	col[1] = LtBlue;
	col[2] = Green;
	col[3] = Red;
	col[4] = LtMagenta;
	col[5] = Yellow;
	col[6] = Cyan;
	col[7] = LtRed;
	col[8] = LtCyan;
	col[9] = Magenta;
	col[10] = White;
	col[11] = LtYellow;
	col[12] = Blue;
	col[13] = Gray;
	col[14] = LtGray;
	col[15] = Black;
	BackPaint();
	reset(16);
}
Пример #10
0
TreeTest::TreeTest()
{
//	CtrlLayout(*this, "Window title");
	
	this->AddFrame(menu);
	menu.Set(THISBACK(MainMenu));
	
	this->AddFrame(TopSeparatorFrame());

	this->AddFrame(tool);
//	tool.Set(THISBACK(FillToolBar));
	
	this->AddFrame(status);
	status.AddFrame(m_val.Right(125));
	m_val.Set(" ");


	Size sz = GetSize();

	m_bPan = false;
	
	m_tree.SetRoot(CtrlImg::Dir,"Workspace");

//	m_tree.SetMain(this);
	
	m_tree.SizePos();
	

	AddFrame(m_sf.Left(m_tree.SizePos(), 250));

	this->AddFrame(InsetFrame());	
	
	m_rcBnds = Rect(0,10000,10000,0);
	
	BackPaint();
}