1/*
2 * Copyright (c) 2008 Stephan Aßmus <superstippi@gmx.de>. All rights reserved.
3 * Distributed under the terms of the MIT/X11 license.
4 *
5 * Copyright (c) 1999 Mike Steed. You are free to use and distribute this software
6 * as long as it is accompanied by it's documentation and this copyright notice.
7 * The software comes with no warranty, etc.
8 */
9#ifndef DISKUSAGE_H
10#define DISKUSAGE_H
11
12
13#include <Entry.h>
14#include <InterfaceDefs.h>
15
16
17const rgb_color RGB_WIN = { 0xDE, 0xDB, 0xDE, 0xFF };
18const rgb_color RGB_PIE_OL = { 0x80, 0x80, 0x80, 0xFF };
19const rgb_color RGB_PIE_BG = { 0xFF, 0xFF, 0xFF, 0xFF };
20const rgb_color RGB_PIE_MT = { 0xA0, 0xA0, 0xA0, 0xFF };
21
22const int kBasePieColorCount = 4;
23const rgb_color kBasePieColor[kBasePieColorCount]
24	= { { 0x33, 0x66, 0x98, 0xFF }, { 0x43, 0xAE, 0x39, 0xFF },
25		{ 0xFF, 0xD3, 0x00, 0xFF }, { 0xFF, 0x76, 0x00, 0xFF } };
26
27const rgb_color kWindowColor = ui_color(B_PANEL_BACKGROUND_COLOR);
28const rgb_color kOutlineColor = RGB_PIE_OL;
29const rgb_color kPieBGColor = RGB_PIE_BG;
30const rgb_color kEmptySpcColor = RGB_PIE_MT;
31
32const char*	const kAppSignature		= "application/x-vnd.Haiku-DiskUsage";
33const char*	const kHelpFileName		= "userguide/en/applications/diskusage.html";
34
35const char*	const kEmptyStr			= "";
36const char*	const kNameFilePtr		= "file";
37
38const float	kSmallHMargin		= 5.0;
39const float	kSmallVMargin		= 2.0;
40const float	kButtonMargin		= 20.0;
41const float	kMinButtonWidth		= 60.0;
42
43const float	kProgBarWidth		= 150.0;
44const float	kProgBarHeight		= 16.0;
45const float	kReportInterval		= 0.0025;
46
47const float	kDefaultPieSize		= 400.0;
48const float	kPieCenterSize		= 80.0;
49const float	kPieRingSize		= 20.0;
50const float	kPieInnerMargin		= 10.0;
51const float	kPieOuterMargin		= 10.0;
52const float	kMinSegmentSpan		= 2.0;
53const float	kDragThreshold		= 5.0;
54
55extern entry_ref helpFileRef;
56extern bool helpFileWasFound;
57
58#define kMenuSelectVol				'gMSV'
59#define kBtnRescan					'gBRF'
60#define kBtnCancel					'gCAN'
61#define kBtnHelp					'gHLP'
62#define kScanRefresh				'gSRF'
63#define kScanProgress				'gSPR'
64#define kScanDone					'gSDN'
65
66#define deg2rad(x) (2.0 * M_PI * (x) / 360.0)
67#define rad2deg(x) (360.0 * (x) / (2.0 * M_PI))
68
69void size_to_string(off_t byteCount, char* name, int maxLength);
70
71
72#endif // DISKUSAGE_H
73
74