mirror of https://github.com/BOINC/boinc.git
parent
db4a187642
commit
27e22063e0
Binary file not shown.
|
@ -18,6 +18,7 @@
|
|||
#define IDB_XFER 120
|
||||
#define IDB_MESS 122
|
||||
#define IDR_STATUS_ICON 124
|
||||
#define IDR_CONTEXT 124
|
||||
#define IDD_QUIT 125
|
||||
#define IDC_LOGIN_URL 1000
|
||||
#define IDC_LOGIN_AUTH 1002
|
||||
|
@ -29,17 +30,27 @@
|
|||
#define ID_POPUP_3 40005
|
||||
#define ID_POPUP_0 40008
|
||||
#define ID_STATUSICON_QUIT 40014
|
||||
#define ID_STATUSICON_EXIT 40014
|
||||
#define ID_STATUSICON_HIDE 40015
|
||||
#define ID_STATUSICON_SUSPEND 40016
|
||||
#define ID_ACCT_QUIT 40017
|
||||
#define ID_FILE_SUSPEND 40018
|
||||
#define ID_FILE_EXIT 40019
|
||||
#define ID_FILE_HIDE 40020
|
||||
#define ID_PROJECT_RELOGIN 40021
|
||||
#define ID_PROJECT_QUIT 40022
|
||||
#define ID_PROJECT_CLEAR 40023
|
||||
#define ID_RESULT_CLEAR 40024
|
||||
#define ID_XFER_CLEAR 40025
|
||||
#define ID_FILE_DISPLAY 40026
|
||||
#define ID_FILE_CLEAR 40027
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 126
|
||||
#define _APS_NEXT_COMMAND_VALUE 40019
|
||||
#define _APS_NEXT_RESOURCE_VALUE 127
|
||||
#define _APS_NEXT_COMMAND_VALUE 40028
|
||||
#define _APS_NEXT_CONTROL_VALUE 1013
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
|
|
|
@ -65,14 +65,16 @@ BEGIN
|
|||
LTEXT "Account Key:",IDC_STATIC,7,32,44,8
|
||||
END
|
||||
|
||||
IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 230, 65
|
||||
IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 285, 67
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "About"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,173,7,50,14
|
||||
LTEXT "Info about BOINC goes here.",IDC_STATIC,56,17,102,31
|
||||
DEFPUSHBUTTON "OK",IDOK,228,7,50,14
|
||||
LTEXT "Berkeley Open Infrastructure for Network Computing",
|
||||
IDC_STATIC,57,17,171,14
|
||||
CONTROL 110,IDC_STATIC,"Static",SS_BITMAP,13,17,33,31
|
||||
CTEXT "Open Beta",IDC_STATIC,56,36,171,13
|
||||
END
|
||||
|
||||
IDD_QUIT DIALOG DISCARDABLE 0, 0, 186, 70
|
||||
|
@ -106,9 +108,9 @@ BEGIN
|
|||
IDD_ABOUTBOX, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 223
|
||||
RIGHTMARGIN, 278
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 58
|
||||
BOTTOMMARGIN, 60
|
||||
END
|
||||
|
||||
IDD_QUIT, DIALOG
|
||||
|
@ -131,8 +133,12 @@ IDR_MAINFRAME MENU DISCARDABLE
|
|||
BEGIN
|
||||
POPUP "&File"
|
||||
BEGIN
|
||||
MENUITEM "Clear Inactive", ID_FILE_CLEAR
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Hide", ID_FILE_HIDE
|
||||
MENUITEM "&Suspend", ID_FILE_SUSPEND
|
||||
MENUITEM "&Close", ID_FILE_CLOSE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "E&xit", ID_FILE_EXIT
|
||||
END
|
||||
POPUP "&Account"
|
||||
BEGIN
|
||||
|
@ -145,14 +151,19 @@ BEGIN
|
|||
END
|
||||
END
|
||||
|
||||
IDR_STATUS_ICON MENU DISCARDABLE
|
||||
IDR_CONTEXT MENU DISCARDABLE
|
||||
BEGIN
|
||||
POPUP "Status Icon"
|
||||
BEGIN
|
||||
MENUITEM "Hide", ID_STATUSICON_HIDE
|
||||
MENUITEM "Suspend", ID_STATUSICON_SUSPEND
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Quit", ID_STATUSICON_QUIT
|
||||
MENUITEM "Exit", ID_STATUSICON_EXIT
|
||||
END
|
||||
POPUP "Project"
|
||||
BEGIN
|
||||
MENUITEM "Relogin...", ID_PROJECT_RELOGIN
|
||||
MENUITEM "Quit Project", ID_PROJECT_QUIT
|
||||
END
|
||||
END
|
||||
|
||||
|
@ -179,6 +190,52 @@ IDB_MESS BITMAP DISCARDABLE "res\\mess.bmp"
|
|||
// remains consistent on all systems.
|
||||
IDI_ICON ICON DISCARDABLE "res\\icon.ico"
|
||||
IDI_ICONHIGHLIGHT ICON DISCARDABLE "res\\iconhigh.ico"
|
||||
|
||||
#ifndef _MAC
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,0,0,1
|
||||
PRODUCTVERSION 1,0,0,1
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "Comments", "\0"
|
||||
VALUE "CompanyName", "Space Sciences Laboratory\0"
|
||||
VALUE "FileDescription", "boinc_gui\0"
|
||||
VALUE "FileVersion", "1, 0, 0, 1\0"
|
||||
VALUE "InternalName", "boinc_gui\0"
|
||||
VALUE "LegalCopyright", "Copyright © 2002\0"
|
||||
VALUE "LegalTrademarks", "\0"
|
||||
VALUE "OriginalFilename", "boinc_gui.exe\0"
|
||||
VALUE "PrivateBuild", "\0"
|
||||
VALUE "ProductName", "Space Sciences Laboratory boinc_gui\0"
|
||||
VALUE "ProductVersion", "1, 0, 0, 1\0"
|
||||
VALUE "SpecialBuild", "\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
|
||||
#endif // !_MAC
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -27,7 +27,7 @@
|
|||
#include <afxtempl.h>
|
||||
#include <afxcoll.h>
|
||||
#include <afxext.h>
|
||||
#include <afxhtml.h>
|
||||
#include <Tlhelp32.h>
|
||||
#include <math.h>
|
||||
#include "filesys.h"
|
||||
#include "log_flags.h"
|
||||
|
@ -38,6 +38,12 @@
|
|||
|
||||
// constants
|
||||
|
||||
#define WND_TITLE "BOINC" // window's title
|
||||
|
||||
#ifndef IDC_HAND
|
||||
#define IDC_HAND MAKEINTRESOURCE(32649) // hand pointer, the "hidden resource"
|
||||
#endif
|
||||
|
||||
#define ICON_OFF 0 // remove icon
|
||||
#define ICON_NORMAL 1 // normal icon
|
||||
#define ICON_HIGHLIGHT 2 // highlighted icon
|
||||
|
@ -53,6 +59,8 @@
|
|||
|
||||
#define ID_TIMER 104 // timer id
|
||||
|
||||
#define PIE_MAJOR_MAX 0.25 // max size of the screen of the pie's major axis
|
||||
#define PIE_MINOR_MAX 0.25 // max size of the screen of the pie's minor axis
|
||||
#define PIE_BUFFER 20 // buffer pixels around edge of pie chart
|
||||
#define PIE_DEPTH 0.25 // depth of pie chart
|
||||
#define PI 3.14159 // pi
|
||||
|
@ -77,6 +85,7 @@ public:
|
|||
protected:
|
||||
afx_msg void OnLButtonDown(UINT, CPoint);
|
||||
afx_msg void OnLButtonUp(UINT, CPoint);
|
||||
afx_msg void OnRButtonDown(UINT, CPoint);
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
|
@ -110,8 +119,12 @@ public:
|
|||
void SetItemProgress(int, int, int);
|
||||
void RepositionProgress();
|
||||
int InsertColumn(int, LPCTSTR, int, int, int);
|
||||
int InsertItem(int, LPCTSTR);
|
||||
void GetTextRect(int, int, LPRECT);
|
||||
int GetColumnWidth(int);
|
||||
BOOL SetColumnWidth(int, int);
|
||||
void SetItemColor(int, COLORREF);
|
||||
void SetProjectURL(int, char*);
|
||||
|
||||
protected:
|
||||
CMenu m_PopupMenu; // context menu for header
|
||||
|
@ -119,6 +132,9 @@ protected:
|
|||
CProgressHeaderCtrl m_Header; // header for subclassing
|
||||
CArray<int,int> m_ColWidths; // column widths for hiding and unhiding; a[i] > 0: col i shown; a[i] < 0: col i hidden, previous width -(a[i] - 1)
|
||||
int m_iSort; // column and order of last sort: i = 0: no sort; i > 0: sorted ascending by col i - 1; < 0 sorted descending by col -(i-1)
|
||||
CFont* m_OldFont; // old font for setting subitem font
|
||||
CArray<COLORREF,COLORREF> m_ItemColors; // special colors of items
|
||||
CArray<CString,CString> m_ProjectURLs; // urls for project links
|
||||
|
||||
void SwapItems(int, int);
|
||||
// TODO: fix selection sort algorithm
|
||||
|
@ -129,8 +145,11 @@ protected:
|
|||
afx_msg int OnCreate(LPCREATESTRUCT);
|
||||
afx_msg void OnDestroy();
|
||||
afx_msg BOOL OnNotify(WPARAM, LPARAM, LRESULT*);
|
||||
afx_msg void OnCustomDraw(NMHDR*, LRESULT*);
|
||||
afx_msg void OnPaint();
|
||||
// TODO: context menu for items?
|
||||
afx_msg BOOL OnSetCursor(CWnd*, UINT, UINT);
|
||||
afx_msg void OnLButtonDown(UINT, CPoint);
|
||||
afx_msg void OnRButtonDown(UINT, CPoint);
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
@ -143,24 +162,22 @@ class CPieChartCtrl : public CWnd
|
|||
{
|
||||
public:
|
||||
CPieChartCtrl();
|
||||
void AddPiece(LPTSTR, COLORREF, float, float);
|
||||
void SetPiece(int, float);
|
||||
void AddPiece(LPTSTR, COLORREF, double);
|
||||
void SetPiece(int, double);
|
||||
BOOL Create(DWORD, const RECT&, CWnd*, UINT);
|
||||
void SetFont(CFont*);
|
||||
void SetTag(char*);
|
||||
void SetTotal(double);
|
||||
|
||||
protected:
|
||||
float m_Total; // total percentage taken up by pieces
|
||||
CArray<float,float> m_Percents; // specific percentages of pieces
|
||||
double m_total; // total amount of pie
|
||||
CArray<double,double> m_Values; // specific values of pieces
|
||||
CArray<COLORREF,COLORREF> m_Colors; // colors of pieces
|
||||
CArray<CString,CString> m_Labels; // labels of pieces
|
||||
CFont* m_Font; // font for control
|
||||
float m_Base; // base units of pie
|
||||
CString m_Tag; // tag for numbers on labels
|
||||
|
||||
void DrawPiePiece(CDC*, float, float);
|
||||
void CirclePoint(CPoint*, int, float, CPoint*);
|
||||
void EllipsePoint(CRect*, float, CPoint*);
|
||||
void DrawPiePiece(CDC*, double, double);
|
||||
void CirclePoint(CPoint*, int, double, CPoint*);
|
||||
void EllipsePoint(CRect*, double, CPoint*);
|
||||
|
||||
afx_msg void OnPaint();
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
@ -187,13 +204,11 @@ public:
|
|||
CMainWindow ();
|
||||
static void CALLBACK TimerProc(HWND, UINT, UINT, DWORD);
|
||||
void UpdateGUI(CLIENT_STATE*);
|
||||
void MessageUser(char*,char*);
|
||||
int GetInitialProject();
|
||||
void MessageUser(char*,char*,char*);
|
||||
BOOL IsSuspended();
|
||||
|
||||
protected:
|
||||
CMenu m_MainMenu; // window's main menu
|
||||
CBitmap m_Logo; // bitmap of the boinc logo
|
||||
CProgressListCtrl m_ProjectListCtrl; // list control
|
||||
CProgressListCtrl m_XferListCtrl; // list control
|
||||
CProgressListCtrl m_ResultListCtrl; // list control
|
||||
|
@ -207,6 +222,7 @@ protected:
|
|||
int m_IconState; // state of the status icon
|
||||
BOOL m_Message; // does the user have a new message?
|
||||
BOOL m_Suspend; // should apps be suspended?
|
||||
int m_ContextItem; // item selected for context menu
|
||||
|
||||
void SetStatusIcon(DWORD);
|
||||
void SaveUserSettings();
|
||||
|
@ -219,13 +235,15 @@ protected:
|
|||
afx_msg void OnCommandAccountQuit();
|
||||
afx_msg void OnCommandAccountLogin();
|
||||
afx_msg void OnCommandHelpAbout();
|
||||
afx_msg void OnCommandFileClose();
|
||||
afx_msg void OnCommandStatusIconHide();
|
||||
afx_msg void OnCommandStatusIconQuit();
|
||||
afx_msg void OnCommandProjectRelogin();
|
||||
afx_msg void OnCommandProjectQuit();
|
||||
afx_msg void OnCommandClear();
|
||||
afx_msg void OnCommandHide();
|
||||
afx_msg void OnCommandSuspend();
|
||||
afx_msg void OnCommandExit();
|
||||
afx_msg int OnCreate(LPCREATESTRUCT);
|
||||
afx_msg BOOL OnNotify(WPARAM, LPARAM, LRESULT*);
|
||||
afx_msg void OnPaint();
|
||||
afx_msg void OnRButtonDown(UINT, CPoint);
|
||||
afx_msg void OnSetFocus(CWnd*);
|
||||
afx_msg void OnSize(UINT, int, int);
|
||||
afx_msg LRESULT OnStatusIcon(WPARAM, LPARAM);
|
||||
|
@ -239,7 +257,7 @@ protected:
|
|||
class CLoginDialog : public CDialog
|
||||
{
|
||||
public:
|
||||
CLoginDialog(UINT);
|
||||
CLoginDialog(UINT, LPCTSTR, LPCTSTR);
|
||||
afx_msg BOOL OnInitDialog();
|
||||
CString m_url;
|
||||
CString m_auth;
|
||||
|
|
Loading…
Reference in New Issue