source: trunk/beos/TRTransfer.h @ 1125

Last change on this file since 1125 was 261, checked in by titer, 16 years ago

Updated svn:keywords

  • Property svn:keywords set to Date Rev Author Id
File size: 1.4 KB
Line 
1// $Id: TRTransfer.h 261 2006-05-29 21:27:31Z livings124 $
2
3#ifndef TR_TRANSFER
4#define TR_TRANSFER
5
6#include <Entry.h>
7#include <ListItem.h>
8#include <Locker.h>
9#include <String.h>
10#include <View.h>
11
12#include "transmission.h"
13
14class TRTransfer : public BListItem {
15public: // Construction and Controll methods.
16        TRTransfer(const char *fullpath, node_ref node);
17        ~TRTransfer();
18
19        inline node_ref GetCachedNodeRef() { return cachedNodeRef; };
20        inline const char* GetCachedPath() { return cachedPath->String(); };
21       
22        bool SetStatus(tr_stat_t *stat, bool shade);
23       
24public: // BListItem
25        virtual void Update(BView *owner, const BFont *font);
26        virtual void DrawItem(BView *owner, BRect frame, bool complete = false);
27
28private: 
29        /*
30         * Cached data. The items stored here are _NOT_ necessairly
31         * the torrent we'll be rendering. It's likely they will be,
32         * but NOT guaranteed. They are not used for anything relating
33         * to rendering.
34         *
35         * Specifically we needed a way to cache the node_ref and
36         * reverse-lookup the node from the string path in the
37         * transmission structs. This seemed the logical place to store
38         * that information, since it ends up in a BList(View).
39         */
40        node_ref cachedNodeRef;
41        BString *cachedPath;
42
43private: // Private members used for rendering.
44        float fBaselineOffset;
45        float fLineSpacing;
46       
47        BLocker *fStatusLock;
48        tr_stat_t *fStatus;
49       
50        rgb_color fBarColor;
51       
52        char* fTimeStr;
53        char* fTransStr;
54       
55        bool fShade;
56};
57
58#endif /* TR_TRANSFER */
Note: See TracBrowser for help on using the repository browser.