home screen

This commit is contained in:
Vadim Lopatin 2015-01-27 13:57:59 +03:00
parent 01ffc1dffa
commit 42b1a1bea2
3 changed files with 27 additions and 13 deletions

View File

@ -277,6 +277,9 @@ class IDEFrame : AppFrame {
wnd.mainWidget = createAboutWidget();
wnd.show();
return true;
case StandardAction.OpenUrl:
platform.openURL(a.stringParam);
return true;
case IDEActions.FileOpen:
UIString caption;
caption = "Open Text File"d;

View File

@ -10,6 +10,8 @@ import dlangide.ui.commands;
class HomeScreen : ScrollWidget {
protected IDEFrame _frame;
protected HorizontalLayout _content;
protected VerticalLayout _startItems;
protected VerticalLayout _recentItems;
this(string ID, IDEFrame frame) {
super(ID);
backgroundColor = 0xFFFFFF;
@ -23,17 +25,26 @@ class HomeScreen : ScrollWidget {
_content.addChild(_column1);
_content.addChild(_column2);
_column1.addChild((new TextWidget(null, "Dlang IDE"d)).fontSize(32).textColor(0x000080));
_column1.addChild((new TextWidget(null, "D language IDE written in D"d)).fontSize(24));
_column1.addChild((new TextWidget(null, "(c) Vadim Lopatin 2015"d)).fontSize(24).textColor(0x000080));
_column1.addChild((new TextWidget(null, "D language IDE written in D"d)).fontSize(20));
_column1.addChild((new TextWidget(null, "(c) Vadim Lopatin 2015"d)).fontSize(22).textColor(0x000080));
_column1.addChild(new VSpacer());
_column1.addChild(new TextWidget(null, "Start:"d));
_column1.addChild(new ImageTextButton(ACTION_FILE_NEW_WORKSPACE));
_column1.addChild(new ImageTextButton(ACTION_FILE_NEW_PROJECT));
_column1.addChild(new ImageTextButton(ACTION_FILE_OPEN_WORKSPACE));
_column1.addChild((new TextWidget(null, "Start with:"d)).fontSize(20).textColor(0x000040));
_startItems = new VerticalLayout();
_recentItems = new VerticalLayout();
_startItems.addChild(new ImageTextButton(ACTION_FILE_OPEN_WORKSPACE));
_startItems.addChild(new ImageTextButton(ACTION_FILE_NEW_WORKSPACE));
_startItems.addChild(new ImageTextButton(ACTION_FILE_NEW_PROJECT));
_column1.addChild(_startItems);
_column1.addChild(new VSpacer());
_column1.addChild(new TextWidget(null, "Recent:"d));
_column1.addChild((new TextWidget(null, "Recent:"d)).fontSize(20).textColor(0x000040));
_recentItems.addChild((new TextWidget(null, "No recent items"d)));
_column1.addChild(_recentItems);
_column1.addChild(new VSpacer());
_column2.addChild(new TextWidget(null, "Useful links:"d));
_column2.addChild((new TextWidget(null, "Useful Links:"d)).fontSize(20).textColor(0x000040));
_column2.addChild(new UrlImageTextButton(null, "D Programming Language"d, "http://dlang.org/"));
_column2.addChild(new UrlImageTextButton(null, "DUB repository"d, "http://code.dlang.org/"));
_column2.addChild(new UrlImageTextButton(null, "DLangUI on GitHub"d, "https://github.com/buggins/dlangui"));
_column2.addChild(new UrlImageTextButton(null, "DLangIDE on GitHub"d, "https://github.com/buggins/dlangide"));
_column2.addChild(new VSpacer());
contentWidget = _content;
}

View File

@ -1,11 +1,11 @@
EXIT=Exit
MENU_FILE=&FILE
MENU_FILE_NEW=&New
MENU_FILE_NEW_SOURCE_FILE=New source file
MENU_FILE_NEW_PROJECT=New project
MENU_FILE_NEW_WORKSPACE=New workspace
MENU_FILE_OPEN=&Open file
MENU_FILE_OPEN_WORKSPACE=Open project or workspace
MENU_FILE_NEW_SOURCE_FILE=New Source File
MENU_FILE_NEW_PROJECT=New Project
MENU_FILE_NEW_WORKSPACE=New Workspace
MENU_FILE_OPEN=&Open file...
MENU_FILE_OPEN_WORKSPACE=Open Project or Workspace...
MENU_FILE_OPEN_RECENT=Open recent
MENU_FILE_SAVE=&Save file
MENU_FILE_SAVE_AS=&Save file as...