Exemple #1
0
/// <summary>
/// Constructor
/// </summary>
TileGroup::TileGroup(LPCTSTR prefix)
  : Drawable(prefix)
  , mChangeNotifyUID(0)
  , mContextMenu2(nullptr)
  , mContextMenu3(nullptr)
  , mClipBoardCutFiles(false)
  , mInRectangleSelection(false)
  , mNextPositionID(0)
  , mRootFolder(nullptr)
{
  LoadSettings();

  WindowSettings windowSettings;
  windowSettings.Load(mSettings, &sWindowDefaults);
  mStateRender.Load(sInitData, mSettings);

  mSelectionRectagle.Init(mSettings);

  mWindow->Initialize(windowSettings, &mStateRender);
  //mWindow->AddDropRegion();
  mWindow->AddPostPainter(&mSelectionRectagle);
  // TODO::Add the selection rectangle as a brush owner
  mWindow->Show();

  mIconLoadedMessage = mWindow->RegisterUserMessage(this);
  mChangeNotifyMsg = mWindow->RegisterUserMessage(this);

  // Get the root ISHellFolder
  SHGetDesktopFolder(reinterpret_cast<IShellFolder**>(&mRootFolder));

  WCHAR path[MAX_PATH];
  mSettings->GetString(L"Folder", path, _countof(path), L"Desktop");
  SetFolder(path);
}
Exemple #2
0
/// <summary>
/// Constructor
/// </summary>
Calendar::Calendar(LPCWSTR calendarName)
    : Drawable(calendarName)
{
  WindowSettings windowSettings;
  windowSettings.Load(mSettings);
  mStateRender.Load(mSettings);

  mWindow->Initialize(windowSettings, &mStateRender);
}
Exemple #3
0
/// <summary>
/// Constructor.
/// </summary>
/// <param name="name">The settings prefix to use.</param>
CoverArt::CoverArt(LPCTSTR name) : Drawable(name)
{
    StateRender<States>::InitData initData;
    mStateRender.Load(initData, mSettings);

    WindowSettings defaults;
    WindowSettings windowSettings;
    defaults.width = 200;
    defaults.height = 200;
    defaults.registerWithCore = true;
    windowSettings.Load(mSettings, &defaults);
    mWindow->Initialize(windowSettings, &mStateRender);

    LoadSettings();
    //Update();

    mWindow->Show();
}
Exemple #4
0
/// <summary>
/// Constructor
/// </summary>
Clock::Clock(LPCTSTR clockName) : Drawable(clockName) {
  mUse24HourDial = mSettings->GetBool(L"24HourDial", false);

  WindowSettings windowSettings;
  windowSettings.Load(mSettings, &sClockWindowDefaults);
  mStateRender.Load(mSettings);

  mWindow->Initialize(windowSettings, &mStateRender);

  mSecondHand.Initialize(mSettings, L"SecondHand", 60.0f);
  mMinuteHand.Initialize(mSettings, L"MinuteHand", 60.0f);
  mHourHand.Initialize(mSettings, L"HourHand", mUse24HourDial ? 24.0f : 12.0f);

  mWindow->AddPrePainter(&mHourHand);
  mWindow->AddPrePainter(&mMinuteHand);
  mWindow->AddPrePainter(&mSecondHand);

  UpdateHands();
  mUpdateTimer = mWindow->SetCallbackTimer(mSettings->GetInt(L"UpdateRate", 1000), this);

  mWindow->Show();
}