예제 #1
0
// для "этой темы" ищем её имя (от позиции курсора вверх/вниз по файлу)
const wchar_t *FindTopic(bool ForwardDirect, bool RestorePos)
{
	const wchar_t *ret=NULL;
	const wchar_t *tmp;
	struct EditorInfo ei={sizeof(EditorInfo)};
	Info.EditorControl(-1,ECTL_GETINFO,0,&ei);

	memset(&esp,-1,sizeof(esp));
	egs.StringNumber=-1;

	intptr_t Direct=ForwardDirect?1:-1;

	for (esp.CurLine=ei.CurLine; (ForwardDirect?esp.CurLine<ei.TotalLines:esp.CurLine>=0); esp.CurLine+=Direct)
	{
		Info.EditorControl(-1,ECTL_SETPOSITION,0,&esp);
		Info.EditorControl(-1,ECTL_GETSTRING,0,&egs);
		tmp=egs.StringText;

		// "Тема": начинается '@', дальше букво-цифры, не содержит '='
		if (lstrlen(tmp)>1 && *tmp==L'@' && *(tmp+1)!=L'-' && *(tmp+1)!=L'+' && !wcschr(tmp,L'='))
		{
			ret=tmp+1;
			break;
		}
	}

	if (RestorePos)
		RestorePosition(&ei);

	return ret;
}
예제 #2
0
dlgSelectConnection::dlgSelectConnection(wxWindow *parent, frmMain *form) :
	DialogWithHelp(form)
{
	long style = wxCB_DROPDOWN;
	remoteServer = NULL;

	SetFont(settings->GetSystemFont());
	LoadResource(parent, wxT("dlgSelectConnection"));

	SetIcon(*connect_png_ico);
	RestorePosition();

	if (form != NULL)
		style |= wxCB_READONLY;

	cbServer = new ctlComboBoxFix(this, CTRLID_CBSERVER, ConvertDialogToPixels(wxPoint(65, 5)), ConvertDialogToPixels(wxSize(135, 12)), style);
	cbDatabase = new wxComboBox(this, CTRLID_CBDATABASE, wxEmptyString, ConvertDialogToPixels(wxPoint(65, 20)), ConvertDialogToPixels(wxSize(135, 12)), wxArrayString(), style);
	cbUsername = new wxComboBox(this, CTRLID_CBUSERNAME, wxEmptyString, ConvertDialogToPixels(wxPoint(65, 35)), ConvertDialogToPixels(wxSize(135, 12)), wxArrayString(), style);
	cbRolename = new wxComboBox(this, CTRLID_CBROLENAME, wxEmptyString, ConvertDialogToPixels(wxPoint(65, 50)), ConvertDialogToPixels(wxSize(135, 12)), wxArrayString(), style);

	if (form == NULL)
	{
		cbServer->SetValue(settings->Read(wxT("QuickConnect/server"), wxEmptyString));
		cbDatabase->SetValue(settings->Read(wxT("QuickConnect/database"), wxEmptyString));
		cbUsername->SetValue(settings->Read(wxT("QuickConnect/username"), wxEmptyString));
		cbRolename->SetValue(settings->Read(wxT("QuickConnect/rolename"), wxEmptyString));
	}

	btnOK->Enable(cbServer->GetValue().Length() > 0 && cbDatabase->GetValue().Length() > 0 && cbUsername->GetValue().Length() > 0);
}
예제 #3
0
dlgMainConfig::dlgMainConfig(pgFrame *parent, pgSettingItem *_item) :
	DialogWithHelp((frmMain *)parent)
{
	SetFont(settings->GetSystemFont());
	LoadResource((wxWindow *)parent, wxT("dlgMainConfig"));

	// Icon
	SetIcon(*property_png_ico);
	RestorePosition();

	item = _item;

	SetTitle(wxString::Format(_("Configuration setting \"%s\""), item->name.c_str()));

	// Setup the default values

	cbValue->Hide();
	chkValue->Hide();

	if (!item->newLine)
	{
		if (item->orgLine)
			item->newLine = new pgConfigLine(item->orgLine);
		else
		{
			item->newLine = new pgConfigLine();
			item->newLine->item = item;
		}
	}

	chkEnabled->SetValue(!item->newLine->isComment);
	txtValue->SetValue(item->newLine->value);
	txtComment->SetValue(item->newLine->comment);

	wxFont fntLabel = stName->GetFont();
	fntLabel.SetWeight(wxBOLD);
	stName->SetFont(fntLabel);
	stName->SetLabel(item->name);

	wxString str;
	str += _("Category") + wxString(wxT(": ")) + item->category + END_OF_LINE;
	str += _("Context") + wxString(wxT(": "));
	str += wxGetTranslation(contextStrings[item->context]);
	str += END_OF_LINE;

	if (item->source != pgSettingItem::PGC_UNKNOWNSOURCE)
	{
		str += _("Current value") + wxString(wxT(": "));

		if (item->value == wxT("unset") && item->source == pgSettingItem::PGC_DEFAULT)
			str += _("unset");
		else
			str += item->value + END_OF_LINE wxT("     ") + wxGetTranslation(sourceStrings[item->source]);

		str += END_OF_LINE;
	}

	stDescription->SetLabel(str + END_OF_LINE + item->short_desc + END_OF_LINE + item->extra_desc);
	btnOK->Enable();
}
예제 #4
0
void __fastcall TFormMain::FormVirtualKeyboardHidden(TObject *Sender, bool KeyboardVisible,
          const TRect &Bounds)
{
	FKBBounds = TRectF(0, 0, 0, 0);
	FNeedOffset = false;
	RestorePosition();
}
예제 #5
0
파일: wxMFrame.cpp 프로젝트: vadz/mahogany
void
wxMFrame::Create(const String &framename, wxWindow *parent)
{
   wxCHECK_RET( !m_initialised, _T("wxMFrame created twice") );

   SetName(framename);

   int xpos, ypos, width, height;
   bool startIconised, startMaximised;
   RestorePosition(MFrameBase::GetName(), &xpos, &ypos, &width, &height,
                   &startIconised, &startMaximised);

   // use name as default title
   if ( !wxFrame::Create(parent, -1, framename,
                         wxPoint(xpos, ypos), wxSize(width,height)) )
   {
      wxFAIL_MSG( _T("Failed to create a frame!") );

      return;
   }

   SetIcon(ICON(_T("MFrame")));

   // no "else": a frame can be maximized and iconized, meaning that it will
   // become maximized when restored
   if ( startMaximised )
      Maximize();
   if ( startIconised )
      Iconize();

   m_initialised = true;
   SetMenuBar(new wxMenuBar(wxMB_DOCKABLE));
}
예제 #6
0
frmMaintenance::frmMaintenance(frmMain *form, pgObject *obj) : ExecutionDialog(form, obj)
{
	wxWindowBase::SetFont(settings->GetSystemFont());
	LoadResource(form, wxT("frmMaintenance"));
	RestorePosition();

	SetTitle(object->GetTranslatedMessage(MAINTENANCEDIALOGTITLE));

	txtMessages = CTRL_TEXT("txtMessages");

	// Icon
	SetIcon(*vacuum_png_ico);

	// Note that under GTK+, SetMaxLength() function may only be used with single line text controls.
	// (see http://docs.wxwidgets.org/2.8/wx_wxtextctrl.html#wxtextctrlsetmaxlength)
#ifndef __WXGTK__
	txtMessages->SetMaxLength(0L);
#endif

	if (object->GetMetaType() == PGM_INDEX || object->GetMetaType() == PGM_PRIMARYKEY || object->GetMetaType() == PGM_UNIQUE)
	{
		rbxAction->SetSelection(2);
		rbxAction->Enable(0, false);
		rbxAction->Enable(1, false);
	}
	wxCommandEvent ev;
	OnAction(ev);
}
BOOL CTextInfoForm::DoCreateDialog(CWnd* parent)
{
	BOOL ret = Create(IDD, parent);

	if (!ret) return FALSE;

    // prepare titlebar
	title.ModifyStyle(0, WS_CLIPCHILDREN);
	title.ModifyStyleEx(0, WS_EX_CONTROLPARENT);

    CRect	rc;
	rc.SetRect(0, 0, 60, 23);
    btn_copy.Create(_T("&Copy"), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON | WS_TABSTOP, rc, &title, IDC_BUTTON_COPYTEXT);
    btn_copy.SetWindowPos(NULL, 4, 4, rc.Width(), rc.Height(), SWP_SHOWWINDOW | SWP_NOZORDER);
    btn_copy.SetFont(GetFont());

    btn_save.Create(_T("&Save"), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON | WS_TABSTOP, rc, &title, IDC_BUTTON_SAVE);
    btn_save.SetWindowPos(NULL, 8 + rc.Width(), 4, rc.Width(), rc.Height(), SWP_SHOWWINDOW | SWP_NOZORDER);
    btn_save.SetFont(GetFont());

    rc.SetRect(0, 0, 150, 23);
    combo_reporttype.Create(WS_TABSTOP | WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST, rc, &title, IDC_COMBO_REPORTTYPE);
    combo_reporttype.SetFont(GetFont());

	// Force a second resize to give the combo box a chance to position itself once it's fully created
	// Would not be an issue if the setup above was done in OnInitDialog...
	SetWindowPos(NULL, 0, 0, 0, 0, SWP_NOMOVE);		// resize down to zero
	SetWindowPos(NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOZORDER);		// resize down to zero
	RestorePosition();								// then restore position or set default position

	OnInitialize();

	return TRUE;
};
void CGraphStudioModelessDialog::OnShowWindow(BOOL bShow, UINT nStatus)
{
	CDialog::OnShowWindow(bShow, nStatus);
	ASSERT(view);

	if (bShow) 
		RestorePosition();
}
예제 #9
0
frmPassword::frmPassword(wxFrame *parent, pgObject *obj)
{
	SetFont(settings->GetSystemFont());
	LoadResource(parent, wxT("frmPassword"));
	RestorePosition();

	server = obj->GetServer();
	// Icon
	SetIcon(*connect_png_ico);
}
예제 #10
0
frmHint::frmHint(wxWindow *fr, bool _force) : DialogWithHelp(0)
{
	force = _force;
	wxWindowBase::SetFont(settings->GetSystemFont());
	LoadResource(fr, wxT("frmHint"));
	RestorePosition();

	if (force)
		btnCancel->Disable();

	SetIcon(*hint_png_ico);
}
ddPrecisionScaleDialog::ddPrecisionScaleDialog(	wxWindow *parent,
        const wxString &defaultValue1,
        const wxString &defaultValue2
                                              )
{
	SetFont(settings->GetSystemFont());
	LoadResource(parent, wxT("ddPrecisionScaleDialog"));
	RestorePosition();
	Init();
	SetValue1(defaultValue1);
	SetValue2(defaultValue2);

	txtPrecision->SetFocus();
}
예제 #12
0
파일: strlist.cpp 프로젝트: GDXN/Par-N-Rar
bool StringList::GetString(char *Str,wchar *StrW,int MaxLength,int StringNum)
{
  SavePosition();
  Rewind();
  bool RetCode=true;
  while (StringNum-- >=0)
    if (!GetString(Str,StrW,MaxLength))
    {
      RetCode=false;
      break;
    }
  RestorePosition();
  return(RetCode);
}
예제 #13
0
dlgDirectDbg::dlgDirectDbg( frmDebugger *parent, wxWindowID id, const dbgConnProp &connProp )
	: m_connProp(connProp),
	  m_targetInfo(NULL),
	  m_conn(NULL),
	  m_codeWindow(NULL),
	  m_parent (parent),
	  m_cancelled (false)
{
	wxWindowBase::SetFont(settings->GetSystemFont());
	LoadResource(m_parent, wxT("dlgDirectDbg"));

	// Icon
	SetIcon(*debugger_png_ico);
	RestorePosition();
}
예제 #14
0
frmDebugger::frmDebugger(frmMain *_parent, dbgController *_controller,
                         const wxString &_title) : pgFrame(_parent, _title), m_menuBar(NULL),
	m_toolBar(NULL), m_viewMenu(NULL), m_debugMenu(NULL), m_statusBar(NULL),
	m_parent(_parent), m_controller(_controller), m_stackWindow(NULL),
	m_tabWindow(NULL), m_codeViewer(NULL)
{
	dlgName = wxT("frmDebugger");
	RestorePosition(100, 100, 600, 500, 450, 300);

	SetFont(settings->GetSystemFont());

	m_manager.SetManagedWindow(this);
	m_manager.SetFlags(wxAUI_MGR_DEFAULT | wxAUI_MGR_TRANSPARENT_DRAG);

	// Define the icon for this window
	SetIcon(*debugger_png_ico);

	// Create (and configure) the menu bar, toolbar, and status bar
	m_menuBar   = SetupMenuBar();
	m_toolBar   = SetupToolBar();
	m_statusBar = SetupStatusBar();

	m_manager.AddPane(
	    m_toolBar,
	    wxAuiPaneInfo().Name(wxT("toolBar")).Caption(wxT("Toolbar"))
	    .ToolbarPane().Top().Row(1).Position(1).LeftDockable(false)
	    .RightDockable(false));

	// Now load the layout
	wxString perspective;
	settings->Read(
	    wxT("Debugger/frmDebugger/Perspective-")
	    + wxString(FRMDEBUGGER_PERSPECTIVE_VER),
	    &perspective, FRMDEBUGGER_DEFAULT_PERSPECTIVE);

	m_manager.LoadPerspective(perspective, true);

	// and reset the captions for the current language
	m_manager.GetPane(wxT("toolBar")).Caption(_("Toolbar"));

	// Sync the View menu options
	m_viewMenu->Check(MENU_ID_VIEW_TOOLBAR, m_manager.GetPane(wxT("toolBar")).IsShown());

	SetupDebugger();

	m_manager.Update();
}
예제 #15
0
dlgConnect::dlgConnect(frmMain *form, const wxString &description, bool storePwd) :
	DialogWithHelp(form)
{
	SetFont(settings->GetSystemFont());
	LoadResource((wxWindow *)form, wxT("dlgConnect"));

	SetIcon(*connect_png_ico);
	RestorePosition();

	// Setup the default values
	stDescription->SetLabel(description);
	chkStorePwd->SetValue(storePwd);
	txtPassword->Enable(true);

	if (form == NULL)
		chkStorePwd->Hide();
}
예제 #16
0
void frmMainConfig::InitForm()
{
	appearanceFactory->SetIcons(this);

	InitFrame(wxT("frmMainConfig"));
	RestorePosition(50, 50, 600, 600, 300, 200);

	cfgList = new ctlListView(this, CTL_CFGVIEW, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER);

	cfgList->SetImageList(configImageList, wxIMAGE_LIST_SMALL);

	cfgList->AddColumn(_("Setting name"), 120);
	cfgList->AddColumn(_("Value"), 80);
	if (conn)
		cfgList->AddColumn(_("Current value"), 80);
	cfgList->AddColumn(_("Comment"), 400);
}
예제 #17
0
// это HLF-файл?
// первая строка hlf всегда начинается с ".Language="
BOOL IsHlf(void)
{
	BOOL ret=FALSE;
	struct EditorInfo ei={sizeof(EditorInfo)};
	Info.EditorControl(-1,ECTL_GETINFO,0,&ei);
	bool CheckedHlf=true;

	if (Opt.CheckMaskFile)
	{
		wchar_t *FileName=GetEditorFileName();
		if (FileName)
		{
			if (!CheckExtension(FileName))
				CheckedHlf=false;
			delete[] FileName;
		}
	}

	if (CheckedHlf)
	{
		memset(&esp,-1,sizeof(esp));
		egs.StringNumber=-1;
		intptr_t total=(ei.TotalLines<3)?ei.TotalLines:3;

		if (total>2)
		{
			for (esp.CurLine=0; esp.CurLine<total; esp.CurLine++)
			{
				Info.EditorControl(-1,ECTL_SETPOSITION,0,&esp);
				Info.EditorControl(-1,ECTL_GETSTRING,0,&egs);

				if (!FSF.LStrnicmp(L".Language=",egs.StringText,10))
				{
					// доп.проверка
					if (FindTopic(true,false))
						ret=TRUE;
					break;
				}
			}

			RestorePosition(&ei);
		}
	}

	return ret;
}
예제 #18
0
frmGrantWizard::frmGrantWizard(frmMain *form, pgObject *obj) : ExecutionDialog(form, obj)
{
	nbNotebook = 0;

	SetFont(settings->GetSystemFont());
	LoadResource(form, wxT("frmGrantWizard"));
	RestorePosition();

	SetTitle(object->GetTranslatedMessage(GRANTWIZARDTITLE));

	// Icon
	SetIcon(*index_png_ico);
	nbNotebook = CTRL_NOTEBOOK("nbNotebook");
	sqlPane = 0;

	Restore();
	EnableOK(false);
}
예제 #19
0
dlgAddFavourite::dlgAddFavourite(wxWindow *parent, queryFavouriteFolder *favourites) :
	pgDialog()
{
	wxWindowBase::SetFont(settings->GetSystemFont());
	LoadResource(parent, wxT("dlgAddFavourite"));
	RestorePosition();

	this->favourites = favourites;

	wxImageList *imgList = new wxImageList(16, 16, true, 2);
	imgList->Add(*folder_png_ico);
	trLocation->AssignImageList(imgList);

	trLocation->AddRoot(_("Favourites"), 0);
	trLocation->SelectItem(trLocation->GetRootItem());
	favourites->AppendAllToTree(trLocation, trLocation->GetRootItem(), true);
	trLocation->Expand(trLocation->GetRootItem());
}
예제 #20
0
ddTableNameDialog::ddTableNameDialog(	wxWindow *parent,
                                        const wxString &defaultValue1,
                                        const wxString &defaultValue2,
                                        ddTextTableItemFigure *tableItem
                                    ) :
	pgDialog()
{
	wxWindowBase::SetFont(settings->GetSystemFont());
	LoadResource(parent, wxT("ddTableNameDialog"));
	RestorePosition();
	Init();
	tabItem = tableItem;
	checkGenerate = false;

	SetValue1(defaultValue1);
	SetValue2(defaultValue2);

	txtUsualTableName->SetFocus();
}
예제 #21
0
BOOL CDKnownProcesses::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here

	ListView_SetExtendedListViewStyle(m_lKnownProcesses.m_hWnd, LVS_EX_FULLROWSELECT);

	m_lKnownProcesses.InsertColumn(_L_ProcName, _T("Process name"), LVCFMT_LEFT, 100);
	m_lKnownProcesses.InsertColumn(_L_ImagePath, _T("Image path"), LVCFMT_LEFT, 340);
	m_lKnownProcesses.InsertColumn(_L_Version, _T("Version"), LVCFMT_LEFT, 140);
	m_lKnownProcesses.InsertColumn(_L_FileDescription, _T("FileDescription"), LVCFMT_LEFT, 140);
	
	RestorePosition();
	ReloadList();

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
예제 #22
0
파일: strlist.cpp 프로젝트: GDXN/Par-N-Rar
bool StringList::Search(char *Str,wchar *StrW,bool CaseSensitive)
{
  SavePosition();
  Rewind();
  bool Found=false;
  char *CurStr;
  wchar *CurStrW;
  while (GetString(&CurStr,&CurStrW))
  {
    if ((CaseSensitive ? strcmp(Str,CurStr):stricomp(Str,CurStr))!=0)
      continue;
    if (StrW!=NULL && CurStrW!=NULL)
      if ((CaseSensitive ? strcmpw(StrW,CurStrW):stricmpw(StrW,CurStrW))!=0)
        continue;
    Found=true;
    break;
  }
  RestorePosition();
  return(Found);
}
void Scene_Inca_Mainscreen::Draw()
{
   double fElapsed = MyGame::getGame()->getKWindow()->getFrameTime();
   if (_bAnimDoor) {
      _lpAnimDoor->move(fElapsed);
      // Déplace la porte
      RestorePosition("inca_main_door");
      MovePosition("inca_main_door", GetRandom(-1.0, 1.0), _lpAnimDoor->getCurrentValue());
      if (_lpAnimDoor->isCompleted()) {
         _bAnimDoor = false;
         ResolveTask("task_inca_opendoor");
         AddObjective("inca","4artefacts");
         AddHint("inca","4artefacts","where");
         AddHint("inca","4artefacts","light");
         _lpSceneDirector->getSequencer()->NarrationMode(NULL, SEQUENCE_NARRATION_CINEMATIC, false);
      }
   }
   
   EScene::Draw();
}
예제 #24
0
void frmPgpassConfig::Init()
{
	appearanceFactory->SetIcons(this);

	InitFrame(wxT("frmPgpassConfig"));
	RestorePosition(150, 150, 650, 300, 300, 200);


	listEdit = new ctlListView(this, CTL_CFGVIEW, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER);
	listEdit->SetImageList(configImageList, wxIMAGE_LIST_SMALL);

	listEdit->AddColumn(_("Host"), 50);
	listEdit->AddColumn(_("Port"), 30);
	listEdit->AddColumn(_("Database"), 80);
	listEdit->AddColumn(_("Username"), 80);
	listEdit->AddColumn(_("Password"), 80);

	editMenu->Enable(MNU_DELETE, false);
	toolBar->EnableTool(MNU_DELETE, false);
}
예제 #25
0
//---------------------------------------------------------------------------
void __fastcall TFormMain::UpdateKBBounds()
{
	FNeedOffset = false;
	if (Focused != NULL) {
		TControl * LFocused = dynamic_cast<TControl*>(Focused->GetObject());
		TRectF LFocusRect = LFocused->AbsoluteRect;
		LFocusRect.Offset(VertScrollBox1->ViewportPosition.X, VertScrollBox1->ViewportPosition.Y);
		if (LFocusRect.IntersectsWith(FKBBounds) && LFocusRect.Bottom > FKBBounds.Top) {
			FNeedOffset = true;
			MainLayout1->Align = TAlignLayout::Horizontal;
			VertScrollBox1->RealignContent();
			Application->ProcessMessages();
			VertScrollBox1->ViewportPosition = PointF(VertScrollBox1->ViewportPosition.X,
				LFocusRect.Bottom - FKBBounds.Top);
		}
	}
	if (!FNeedOffset) {
		RestorePosition();
	}
}
frmGrantWizard::frmGrantWizard(frmMain *form, pgObject *obj) : ExecutionDialog(form, obj)
{
    nbNotebook = 0;

    wxWindowBase::SetFont(settings->GetSystemFont());
    LoadResource(form, wxT("frmGrantWizard"));
    RestorePosition();

    if (object->IsCollection())
        SetTitle(wxString::Format(_("Privileges for %s"), object->GetTranslatedTypeName().c_str(), ""));
    else
        SetTitle(wxString::Format(_("Privileges for %s %s"), object->GetTranslatedTypeName().c_str(), object->GetFullIdentifier().c_str()));

    // Icon
    SetIcon(wxIcon(index_xpm));
    nbNotebook = CTRL_NOTEBOOK("nbNotebook");
    sqlPane = 0;

    Restore();
    EnableOK(false);
}
예제 #27
0
frmExport::frmExport(wxWindow *p)
{
    parent=p;

    wxWindowBase::SetFont(settings->GetSystemFont());
    LoadResource(p, wxT("frmExport"));
    RestorePosition();

    // Icon
    appearanceFactory->SetIcons(this);
    cbQuoteChar->Disable();
    btnOK->Disable();


    bool uc=settings->GetExportUnicode();
    rbUnicode->SetValue(uc);
    rbLocal->SetValue(!uc);

    bool isCrLf=settings->GetExportRowSeparator() == wxT("\r\n");
    rbCRLF->SetValue(isCrLf);
    rbLF->SetValue(!isCrLf);

    int qt=settings->GetExportQuoting();
    
    rbQuoteNone->SetValue(qt == 0);
    rbQuoteStrings->SetValue(qt == 1);
    rbQuoteAll->SetValue(qt == 2);

    cbColSeparator->SetValue(settings->GetExportColSeparator());


    cbQuoteChar->SetValue(settings->GetExportQuoteChar());

    wxString val;
    settings->Read(wxT("Export/LastFile"), &val, wxEmptyString);
    txtFilename->SetValue(val);

    wxCommandEvent ev;
    OnChange(ev);
}
예제 #28
0
dlgManageMacros::dlgManageMacros(wxWindow *parent, frmMain *form, queryMacroList *macros) :
	DialogWithHelp(form)
{
	SetFont(settings->GetSystemFont());
	LoadResource(parent, wxT("dlgManageMacros"));
	RestorePosition();

	this->macros = macros;

	// Setup list of keys
	lstKeys->CreateColumns(NULL, _("Key"), _("Name"), 40);

	lstKeys->Hide();
	size_t i;
	int num = 0;
	for (i = 1; i < 13; i++)
	{
		wxString key;
		key.Printf(wxT("Alt-F%d"), (int)i);
		AddKeyToList(num++, key);
	}
	for (i = 1; i < 11; i++)
	{
		wxString key;
		key.Printf(wxT("Ctrl-%d"), (int)i % 10); // in order of keys 1,2,...,8,9,0
		AddKeyToList(num++, key);
	}
	lstKeys->Show();

	// Initialy no key is selected, so disable editor keys
	btnClear->Disable();
	btnSave->Disable();

	// Clear Markers
	anythingChanged = false;
	thisMacroChanged = false;

	txtSqlBox->SetModEventMask(wxSTC_MOD_INSERTTEXT | wxSTC_MOD_DELETETEXT);
}
예제 #29
0
CMainWindow::CMainWindow()
{
   _closeRequired = false;

   _menuBarManager = new CMenuBarManager( *menuBar() );
   _toolBarManager = new CToolBarManager( this );

   RestorePosition();

   _deviceStatus = new QLabel( "No communication", this );
   _deviceStatus->setContentsMargins( 1, 0, 1, 0 );

   _communicationStatus = new QLabel( this );
   _communicationStatus->setContentsMargins( 1, 0, 1, 0 );

   statusBar()->addPermanentWidget( _communicationStatus );
   statusBar()->addPermanentWidget( _deviceStatus );

   _menuSessionId = menuBarManager().OpenSession();
   
   CreateMenu();
   CreateECUDeviceView();
}
예제 #30
0
BOOL IsHlf(void)
{
	BOOL ret=FALSE;
	Info.EditorControl(-1,ECTL_GETINFO,0,&ei);
	memset(&esp,-1,sizeof(esp));
	egs.StringNumber=-1;
	intptr_t total=(ei.TotalLines<3)?ei.TotalLines:3;

	if (total>2) for (esp.CurLine=0; esp.CurLine<total; esp.CurLine++)
	{
		Info.EditorControl(-1,ECTL_SETPOSITION,0,&esp);
		Info.EditorControl(-1,ECTL_GETSTRING,0,&egs);

		if (!FSF.LStrnicmp(_T(".Language="),egs.StringText,10))
		{
			ret=TRUE;
			break;
		}
	}

	RestorePosition();
	return ret;
}