source: trunk/beos/TRWindow.h @ 261

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

Updated svn:keywords

  • Property svn:keywords set to Date Rev Author Id
File size: 1.1 KB
Line 
1// $Id: TRWindow.h 261 2006-05-29 21:27:31Z titer $
2
3#ifndef TR_WIND
4#define TR_WIND
5
6#include <Entry.h>
7#include <FilePanel.h>
8#include <ListView.h>
9#include <Window.h>
10
11#include "transmission.h"
12
13#include "TRPrefsWindow.h"
14
15#define TR_INFO 'tNfo'
16
17#define TR_RESUME 'tRes'
18#define TR_PAUSE 'tPse'
19#define TR_REMOVE 'tRmv'
20#define TR_SELECT 'tSel'
21#define TR_SETTINGS 'tSet'
22
23
24
25/**
26 * Transmission Window.
27 */
28class TRWindow : public BWindow {
29public: // BWindow
30        TRWindow();
31        ~TRWindow();
32       
33        virtual void MessageReceived(BMessage *msg);
34        virtual bool QuitRequested();
35        virtual void FrameResized(float width, float height);
36
37public: // TRWindow
38        void AddEntry(BEntry *torrent);
39       
40        void UpdateList(int32 selection, bool menus);
41       
42        void LoadSettings();
43       
44        void StopTorrent(int index);
45        void StartTorrent(int index);
46       
47        static int32 AsynchStopTorrent(void *data);
48        static int32 AsynchStartTorrent(void *data);
49       
50        void RescanTorrents();
51
52private:
53        BListView *transfers;
54        BFilePanel *openPanel;
55       
56        tr_handle_t *engine;
57       
58        TRPrefsWindow *fSettings;
59};
60
61/**
62 * Used to pass info off to the worker thread that runs AsynchStopTorrent
63 */
64struct worker_info {
65        TRWindow *window;
66        int      index;
67};
68
69#endif /* TR_WIND */
Note: See TracBrowser for help on using the repository browser.