1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
//-*-C++-*-
/*
**************************************************************************
description
--------------------
copyright : (C) 2000-2001 by Andreas Zehender
email : [email protected]
**************************************************************************
**************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
**************************************************************************/
#ifndef PMINSERTPOPUP_H
#define PMINSERTPOPUP_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <kpopupmenu.h>
/**
* Popup menu. Ask the user where to insert new objects
*/
class PMInsertPopup : public TDEPopupMenu
{
public:
/**
* Places where a new object can be inserted
*/
enum { PMIFirstChild = 1, PMILastChild = 2, PMISibling = 4 };
/**
* Creates a popup menu
*
* @param parent The parent widget
* @param multipleObjects True if more than one object will be inserted
* @param items Which items to display. Can be a bitwise combination
* of PMIFirstChild, PMILastChild, PMISibling.
* @param name Internal name of the popup menu
*/
PMInsertPopup( TQWidget* parent, bool multipleObjects,
int items = PMIFirstChild | PMILastChild | PMISibling,
bool canInsertAllAsFirstChildren = true,
bool canInsertAllAsLastChildren = true,
bool canInsertAllAsSiblings = true,
const char* name = 0 );
/**
* Deletes the popup menu
*/
~PMInsertPopup( ) { };
/**
* Popups a PMInsertPopup menu
*
* @param parent The parent widget
* @param multipleObjects True if more than one object will be inserted
* @param items Which items to display. Can be a bitwise combination
* of PMIFirstChild, PMILastChild, PMISibling.
* @param canInsertAllAsChildren If false the text "(some)" will appear
* behind the "first Children" and "last Children" items
* @param canInsertAllAsSiblings If false the text "(some)" will appear
* behind the "Siblings" items
*
* Returns the selected item or 0 if no item was selected.
*/
static int choosePlace( TQWidget* parent, bool multipleObjects,
int items = PMIFirstChild | PMILastChild
| PMISibling,
bool canInsertAllAsFirstChildren = true,
bool canInsertAllAsLastChildren = true,
bool canInsertAllAsSiblings = true );
};
#endif
|