示例#1
0
	void DnD(PasteClip& d)
	{
		if(AcceptText(d)) {
			a.Add(GetString(d), GetString(d));
			a.SetFocus();
		}
	}
示例#2
0
void Ide::ReadHlStyles(ArrayCtrl& hlstyle)
{
	hlstyle.Clear();
	for(int i = 0; i < CodeEditor::HL_COUNT; i++) {
		const HlStyle& s = editor.GetHlStyle(i);
		hlstyle.Add(editor.GetHlName(i), s.color, s.bold, s.italic, s.underline);
	}
}
示例#3
0
	App() {
		Sizeable().Zoomable();
		h.AddColumn("Icon no.");
		h.AddColumn("Small icon").SetDisplay(CenteredImageDisplay());
		h.AddColumn("Large icon").SetDisplay(CenteredImageDisplay());
		h.SetLineCy(32);
		for(int i = 0; i < 200; i++)
			h.Add(i, GetShellIcon(i, false), GetShellIcon(i, true));
		Add(h.SizePos());
	}
示例#4
0
	App() {
		a.AddColumn("You can paste the text here too");
		a.MultiSelect();
		a.WhenDropInsert = THISBACK(DnDInsert);
		a.WhenDrop = THISBACK(DnD);
		a.WhenDrag = THISBACK(Drag);

		b.AddColumn("Roman numbers");
		b.MultiSelect();
		b.WhenDropInsert = THISBACK(DnDInsertB);
		b.WhenDrag = THISBACK(DragB);

		Add(s.Horz(a, b));
		for(int i = 0; i < 200; i++) {
			a.Add(i);
			b.Add(FormatIntRoman(i, true));
		}
		Sizeable();
	}
示例#5
0
	App() {
		a.AddColumn("Option");
		for(int i = 0; i < 300; i++) {
			a.Add(bool(i & 4));
			a.SetCtrl(i, 0, option.Add().SetLabel("Option " + AsString(i)));
			option.Top() << [=] { Do(i); };
		}
		a.SetLineCy(Draw::GetStdFontCy() + 8);
		Add(a.SizePos());
		Sizeable();
	}
示例#6
0
// fill a pane with data from a couple of arrays without erasing it first
// (avoid re-painting and resetting scroll if not needed)
void Gdb_MI2::FillPane(ArrayCtrl &pane, Index<String> const &nam, Vector<String> const &val)
{
	GuiLock __;
	
	int oldCount = pane.GetCount();
	int newCount = nam.GetCount();
	if(newCount < oldCount)
		for(int i = oldCount - 1; i >= newCount; i--)
			pane.Remove(i);
	for(int i = 0; i < min(oldCount, newCount); i++)
	{
		pane.Set(i, 0, nam[i]);
		pane.Set(i, 1, val[i]);
	}
	for(int i = oldCount; i < newCount; i++)
		pane.Add(nam[i], val[i]);
	
	SyncWidth(pane);
}
示例#7
0
void Pdb::Vis(ArrayCtrl& a, const String& key, const VectorMap<String, Value>& prev,
              Visual rval_ vis)
{
	bool ch;
	a.Add(key, Vis(key, prev, vis, ch));
}
示例#8
0
	void Log(const String& s)
	{
		log.Add(s);
		log.GoEnd();
	}