Example #1
0
    void ColorChooser::PreInit()
    {
      ColorView   *colorView;
      Panel       *hPanel;
      RGBControl  *rgb;

      hPanel=HPanel::Create(true,false);

      colorView=new ColorView();
      colorView->SetFlex(true,true);
      colorView->SetModel(color);
      hPanel->Add(colorView);

      hPanel->AddSpace();

      rgb=new RGBControl();
      rgb->SetModel(color);
      hPanel->Add(rgb);

      SetMain(VPanel::Create(true,false)
              ->Add(hPanel)
              ->AddSpace()
              ->Add(ButtonRow::CreateOkCancel(okAction,GetClosedAction(),true,false)));

      Dialog::PreInit();
    }
Example #2
0
bool Ide::OpenMainPackage()
{
	String tt = "Select main package";
//	tt << " (IDE " << IDE_VER_MAJOR << "." << IDE_VER_MINOR << ".r" << IDE_VER_BUILD
//	<< ", " << ::AsString(IDE_VER_DATE) << ")";
#ifdef bmYEAR
	tt << " (TheIDE " << IDE_VERSION
	   << Format(" %d-%02d-%02d %d:%02d)", bmYEAR , bmMONTH, bmDAY, bmHOUR, bmMINUTE);
#else
	tt << " (TheIDE " << IDE_VERSION << ')';
#endif
	String p = SelectPackage(tt, main, true, true);
	if(p.IsEmpty()) return false;
	main.Clear();
	if(!IsOpen())
		Open();
	SetMain(p);
	return true;
}
Example #3
0
  void PreInit()
  {
    map=new MapControl();
    map->SetFlex(true,true);

    SetMain(map);

    Lum::Def::Menu *menu=Lum::Def::Menu::Create();

    menu
      ->GroupProject()
        ->ActionQuit(GetClosedAction())
      ->End()
      ->Group(L"_Search")
        ->Action(Lum::Def::Action(Lum::Def::Desc(L"Search _location")
                                  .SetShortcut(Lum::OS::qualifierControl,L"f"),
                                  locationSearchAction))
        ->Separator()
        ->Action(Lum::Def::Action(Lum::Def::Desc(L"_Route")
                                  .SetShortcut(Lum::OS::qualifierControl,L"r"),
                                  routeAction))
      ->End()
      ->GroupEdit()
        ->ActionSettings(settingsAction)
      ->End()
      ->Group(L"Debug")
        ->Action(Lum::Def::Action(Lum::Def::Desc(L"_Flush Cache"),
                                  debugFlushCacheAction))
        ->Action(Lum::Def::Action(Lum::Def::Desc(L"Dump _statistics")
                                  .SetShortcut(Lum::OS::qualifierControl,L"s"),
                                  debugStatisticsAction))
      ->End()
      ->GroupHelp()
        //->ActionHelp()(
        ->ActionAbout(aboutAction)
      ->End();

    SetMenu(menu);

    Dialog::PreInit();
  }
Example #4
0
void KyRefHandle::_Copy(const KyRefHandle& other)
{
    DI_ASSERT(GetMain());

    KyObject* pkObj = GetMain()->GetObj(*this);
    if (pkObj)
    {
        pkObj->_DecRefCount();
    }

    SetMain(other.GetMain());
    mIndex = other.mIndex;
    mLogicID = other.mIndex;
    mObjectType = other.mObjectType;

    pkObj = GetMain()->GetObj(*this);
    if (pkObj)
    {
        pkObj->_IncRefCount();
    }
}