source: trunk/beos/TRWindow.h @ 14

Last change on this file since 14 was 14, checked in by root, 16 years ago

Update 2005-12-13

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