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 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
<func>
<title>CreateMenu</title>
<category>Objects</category>
<subcat>Menu</subcat>
<version>5.1 OC</version>
<syntax>
<rtype>bool</rtype>
<params>
<param>
<type>id</type>
<name>symbol</name>
<desc>The picture of this object definition is used as symbol.</desc>
</param>
<param>
<type>object</type>
<name>command_object</name>
<desc>Object to receive the menu command (see <funclink>AddMenuItem</funclink>). Can be <code>nil</code> in local calls.</desc>
</param>
<param>
<type>int</type>
<name>extra</name>
<desc>
Additional information to be displayed about the currently selected entry. C4MN_ values are now also defined as constants:
<table>
<rowh>
<col>Constant</col>
<col>Value</col>
<col>Effect</col>
</rowh>
<row>
<col>C4MN_Extra_None</col>
<col>0</col>
<col>Nothing</col>
</row>
<row>
<col>C4MN_Extra_Value</col>
<col>2</col>
<col>Value</col>
</row>
<row>
<col>C4MN_Extra_Info</col>
<col>4</col>
<col>Display object description immediately.</col>
</row>
</table>
</desc>
</param>
<param>
<type>string</type>
<name>caption</name>
<desc>Text to be displayed if the menu is empty.</desc>
</param>
<param>
<type>int</type>
<name>extra_data</name>
<desc>Comparison value for extra 3.</desc>
</param>
<param>
<type>int</type>
<name>style</name>
<desc>
Appearance of the menu. The following constants are defined:
<table>
<rowh>
<col>Constant</col>
<col>Value</col>
<col>Appearance</col>
</rowh>
<row>
<col>C4MN_Style_Normal</col>
<col>0</col>
<col>Normal</col>
</row>
<row>
<col>C4MN_Style_Context</col>
<col>1</col>
<col>Context menu</col>
</row>
<row>
<col>C4MN_Style_Info</col>
<col>2</col>
<col>Info menu</col>
</row>
<row>
<col>C4MN_Style_Dialog</col>
<col>3</col>
<col>Dialog</col>
</row>
<row>
<col>C4MN_Style_EqualItemHeight</col>
<col>128</col>
<col>Can be combined with C4MN_Style_Dialog: all entries with an icon are drawn with the same height.</col>
</row>
</table>
</desc>
</param>
<param>
<type>bool</type>
<name>permanent</name>
<desc>The menu stays open after an entry has been selected.</desc>
</param>
<param>
<type>id</type>
<name>menu_id</name>
<desc>If specified, this id is used as menu id. The current menu id is returned by <funclink>GetMenu</funclink></desc>
<optional />
</param>
</params>
</syntax>
<desc>Creates a user defined menu for the specified object. Menu entries are to be added using <funclink>AddMenuItem</funclink>.</desc>
<examples>
<example>
<text>see <funclink>AddMenuItem</funclink></text>
</example>
</examples>
<related>
<funclink>AddMenuItem</funclink>
<funclink>SelectMenuItem</funclink>
<funclink>GetMenu</funclink>
<funclink>CloseMenu</funclink>
</related>
</func>
<author>springer</author><date>2002-04</date>
<author>Sven2</author><date>2007-03</date>
</funcs>
|