fat: Greatly simplify and clean up dosfs_get_file_map().
[haiku.git] / src / preferences / printers / AddPrinterDialog.h
blobf118d5201d0bb7acab04ed8106472b3e8845af67
1 /*
2 * Copyright 2001-2007, Haiku.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Philippe Houdoin
7 * Michael Pfeiffer
8 */
9 #ifndef _ADD_PRINTER_DIALOG_H
10 #define _ADD_PRINTER_DIALOG_H
13 #include <Button.h>
14 #include <String.h>
15 #include <PopUpMenu.h>
16 #include <TextControl.h>
17 #include <Window.h>
20 class AddPrinterDialog : public BWindow {
21 typedef BWindow Inherited;
22 public:
23 AddPrinterDialog(BWindow *parent);
25 void MessageReceived(BMessage *msg);
26 bool QuitRequested();
28 private:
29 enum MessageKind {
30 kPrinterSelectedMsg = 'adlg',
31 kTransportSelectedMsg,
32 kNameChangedMsg,
36 void _AddPrinter(BMessage *msg);
37 void _StorePrinter(BMessage *msg);
38 void _HandleChangedTransport(BMessage *msg);
40 void _BuildGUI(int stage);
41 void _FillTransportMenu(BMenu *menu);
42 void _FillMenu(BMenu *menu, const char *path,
43 uint32 what);
44 void _AddPortSubMenu(BMenu *menu,
45 const char *transport, const char *port);
46 void _Update();
48 BMessenger fPrintersPrefletMessenger;
50 BTextControl* fName;
51 BPopUpMenu* fPrinter;
52 BPopUpMenu* fTransport;
53 BButton* fOk;
55 BString fNameText;
56 BString fPrinterText;
57 BString fTransportText;
58 BString fTransportPathText;
61 #endif // _ADD_PRINTER_DIALOG_H