2 * Copyright (c) 2008 Stephan Aßmus <superstippi@gmx.de>. All rights reserved.
3 * Distributed under the terms of the MIT/X11 license.
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.
14 #include <InterfaceDefs.h>
17 const rgb_color RGB_WIN
= { 0xDE, 0xDB, 0xDE, 0xFF };
18 const rgb_color RGB_PIE_OL
= { 0x80, 0x80, 0x80, 0xFF };
19 const rgb_color RGB_PIE_BG
= { 0xFF, 0xFF, 0xFF, 0xFF };
20 const rgb_color RGB_PIE_MT
= { 0xA0, 0xA0, 0xA0, 0xFF };
22 const int kBasePieColorCount
= 4;
23 const rgb_color kBasePieColor
[kBasePieColorCount
]
24 = { { 0x33, 0x66, 0x98, 0xFF }, { 0x43, 0xAE, 0x39, 0xFF },
25 { 0xFF, 0xD3, 0x00, 0xFF }, { 0xFF, 0x76, 0x00, 0xFF } };
27 const rgb_color kWindowColor
= ui_color(B_PANEL_BACKGROUND_COLOR
);
28 const rgb_color kOutlineColor
= RGB_PIE_OL
;
29 const rgb_color kPieBGColor
= RGB_PIE_BG
;
30 const rgb_color kEmptySpcColor
= RGB_PIE_MT
;
32 const char* const kAppSignature
= "application/x-vnd.Haiku-DiskUsage";
33 const char* const kHelpFileName
= "userguide/en/applications/diskusage.html";
35 const char* const kEmptyStr
= "";
36 const char* const kNameFilePtr
= "file";
38 const float kSmallHMargin
= 5.0;
39 const float kSmallVMargin
= 2.0;
40 const float kButtonMargin
= 20.0;
41 const float kMinButtonWidth
= 60.0;
43 const float kProgBarWidth
= 150.0;
44 const float kProgBarHeight
= 16.0;
45 const float kReportInterval
= 0.0025;
47 const float kDefaultPieSize
= 400.0;
48 const float kPieCenterSize
= 80.0;
49 const float kPieRingSize
= 20.0;
50 const float kPieInnerMargin
= 10.0;
51 const float kPieOuterMargin
= 10.0;
52 const float kMinSegmentSpan
= 2.0;
53 const float kDragThreshold
= 5.0;
56 #define kMenuSelectVol 'gMSV'
57 #define kBtnRescan 'gBRF'
58 #define kBtnCancel 'gCAN'
59 #define kScanRefresh 'gSRF'
60 #define kScanProgress 'gSPR'
61 #define kScanDone 'gSDN'
63 #define deg2rad(x) (2.0 * M_PI * (x) / 360.0)
64 #define rad2deg(x) (360.0 * (x) / (2.0 * M_PI))
66 void size_to_string(off_t byteCount
, char* name
, int maxLength
);