xref: /haiku/src/preferences/shortcuts/PopUpColumn.h (revision cbe0a0c436162d78cc3f92a305b64918c839d079)
1 /*
2  * Copyright 2015 Haiku, Inc. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  * 		Josef Gajdusek
7  */
8 #ifndef POPUPCOLUMN_H
9 #define POPUPCOLUMN_H
10 
11 #include <ColumnTypes.h>
12 
13 class BPopUpMenu;
14 
15 class PopUpColumn : public BStringColumn {
16 public:
17 						PopUpColumn(BPopUpMenu* menu, const char* name,
18 								float width, float minWidth, float maxWidth,
19 								uint32 truncate, bool editable = false,
20 								bool cycle = false, int cycleInit = 0,
21 								alignment align = B_ALIGN_LEFT);
22 	virtual				~PopUpColumn();
23 
24 			void		MouseDown(BColumnListView* parent, BRow* row,
25 							BField* field, BRect fieldRect, BPoint point,
26 							uint32 buttons);
27 
28 private:
29 			bool		fEditable;
30 			bool		fCycle;
31 			int			fCycleInit;
32 			BPopUpMenu*	fMenu;
33 };
34 
35 #endif	// POPUPCOLUMN_H
36