示例#1
0
			void Init( void ) {
				RegisterCvars();

				AddCommands();

				// raw input
				// this is also set in ClientConsole upon (de)activation
				CaptureMouse( true );
			}
示例#2
0
void GraphEditor::Init (OverlayComp* comp, const char* name) {
    if (!comp) comp = new GraphIdrawComp;
    _terp = new ComTerpServ();
    AddCommands(_terp);
    add_comterp("Graphdraw", _terp);
    _overlay_kit->Init(comp, name);
    
    WidgetKit& kit = *WidgetKit::instance();
    Style* s = kit.style();
    _nodedialog = new NodeDialog(&kit, s);
    Resource::ref(_nodedialog);
}
示例#3
0
void DrawEditor::Init (OverlayComp* comp, const char* name) {
    _curr_others = _prev_others = nil;
    _num_curr_others = _num_prev_others = 0;
    _texteditor = nil;
    _autonewframe = false;
    _autonewframe_tts = nil;
    if (!comp) comp = new DrawIdrawComp;
    _terp = new ComTerpServ();
    ((OverlayUnidraw*)unidraw)->comterp(_terp);
    AddCommands(_terp);
    add_comterp("DrawServ", _terp);
    _overlay_kit->Init(comp, name);
    InitFrame();
    _last_selection = new Selection;
}
示例#4
0
// Comes from ConEmu's settings (Environment setting page)
void CProcessEnvCmd::AddLines(LPCWSTR asLines, bool bPriority)
{
	LPCWSTR pszLines = asLines;
	CEStr lsLine;
	INT_PTR nBefore = bPriority ? 0 : -1;

	while (0 == NextLine(&pszLines, lsLine))
	{
		// Skip empty lines
		LPCWSTR pszLine = SkipNonPrintable(lsLine);
		if (!pszLine || !*pszLine)
			continue;
		// A comment?
		if ((pszLine[0] == L'#')
			|| ((pszLine[0] == L'/') && (pszLine[1] == L'/'))
			|| ((pszLine[0] == L'-') && (pszLine[1] == L'-'))
			|| (lstrcmpni(pszLine, L"REM ", 4) == 0)
			)
			continue;
		// Process this line
		if (AddCommands(pszLine, NULL, true, nBefore) && bPriority)
			nBefore++;
	}
}