Check-in [6c304fa76f]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Updated documentation prior to 0.2.0 release.
Timelines: family | ancestors | descendants | both | rel1.x
Files: files | file ages | folders
SHA1:6c304fa76f1bd530b3ab6abe47dddce17fd0ffc8
User & Date: mvnathan 2013-08-04 10:44:35
Context
2013-08-04
10:54
Added new documentation to version control. check-in: 8561cd9213 user: mvnathan tags: rel1.x
10:44
Updated documentation prior to 0.2.0 release. check-in: 6c304fa76f user: mvnathan tags: rel1.x
09:47
Merged from dev1.x to rel1.x in anticipation of 0.2.0 release. check-in: a7356e4e43 user: manuv tags: rel1.x
Changes

Changes to api/bc_s.png.

cannot compute difference between binary files

Changes to api/classminx_1_1core_1_1config_1_1config-members.html.

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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: Member List</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>
     
   </div>
   
   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>
   
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>minx</b>      </li>
      <li class="navelem"><b>core</b>      </li>
      <li class="navelem"><b>config</b>      </li>
      <li class="navelem"><a class="el" href="classminx_1_1core_1_1config_1_1config.html">config</a>      </li>
    </ul>

  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">minx.core.config.config Member List</div>  </div>
</div><!--header-->
<div class="contents">

This is the complete list of members for <a class="el" href="classminx_1_1core_1_1config_1_1config.html">minx.core.config.config</a>, including all inherited members.<table>

  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1config_1_1config.html#a4e9564fa5409d882fd9d31dadfa18fb7">__init__</a></td><td><a class="el" href="classminx_1_1core_1_1config_1_1config.html">minx.core.config.config</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1config_1_1config.html#a0002096264b103145c6145f243e4264c">log_level</a></td><td><a class="el" href="classminx_1_1core_1_1config_1_1config.html">minx.core.config.config</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1config_1_1config.html#a94781a9eda13550bd954a8e99034f8c1">log_to_console</a></td><td><a class="el" href="classminx_1_1core_1_1config_1_1config.html">minx.core.config.config</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1config_1_1config.html#a33131535d8753c77e5980870eef35d22">log_to_file</a></td><td><a class="el" href="classminx_1_1core_1_1config_1_1config.html">minx.core.config.config</a></td><td></td></tr>
</table></div><!-- contents -->
</body>
</html>






<


<
<
<



<
<




<
<



<

<



<

<
<
<
<
<




<
|
|
|
<
<
<
<
<
>
|
|





>
|
>
|
|
|
|



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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: Member List</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">


  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>

   </div>

   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>

  </td>





 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.4 -->
<div id="nav-path" class="navpath">
  <ul>





<li class="navelem"><b>minx</b></li><li class="navelem"><b>core</b></li><li class="navelem"><a class="el" href="namespaceminx_1_1core_1_1config.html">config</a></li><li class="navelem"><a class="el" href="classminx_1_1core_1_1config_1_1config.html">config</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">minx.core.config.config Member List</div>  </div>
</div><!--header-->
<div class="contents">

<p>This is the complete list of members for <a class="el" href="classminx_1_1core_1_1config_1_1config.html">minx.core.config.config</a>, including all inherited members.</p>
<table class="directory">
  <tr class="even"><td class="entry"><a class="el" href="classminx_1_1core_1_1config_1_1config.html#a4e9564fa5409d882fd9d31dadfa18fb7">__init__</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1config_1_1config.html">minx.core.config.config</a></td><td class="entry"></td></tr>
  <tr><td class="entry"><a class="el" href="classminx_1_1core_1_1config_1_1config.html#a0002096264b103145c6145f243e4264c">log_level</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1config_1_1config.html">minx.core.config.config</a></td><td class="entry"></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminx_1_1core_1_1config_1_1config.html#a94781a9eda13550bd954a8e99034f8c1">log_to_console</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1config_1_1config.html">minx.core.config.config</a></td><td class="entry"></td></tr>
  <tr><td class="entry"><a class="el" href="classminx_1_1core_1_1config_1_1config.html#a33131535d8753c77e5980870eef35d22">log_to_file</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1config_1_1config.html">minx.core.config.config</a></td><td class="entry"></td></tr>
</table></div><!-- contents -->
</body>
</html>

Changes to api/classminx_1_1core_1_1config_1_1config.html.

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
133
134
135
136
137
...
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
...
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
...
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: minx.core.config.config Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>
     
   </div>
   
   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>
   
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>minx</b>      </li>
      <li class="navelem"><b>core</b>      </li>
      <li class="navelem"><b>config</b>      </li>
      <li class="navelem"><a class="el" href="classminx_1_1core_1_1config_1_1config.html">config</a>      </li>
    </ul>

  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>

  <div class="headertitle">
<div class="title">minx.core.config.config Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Attributes for simple customizations.  
 <a href="classminx_1_1core_1_1config_1_1config.html#details">More...</a></p>

<p><a href="classminx_1_1core_1_1config_1_1config-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>

Public Member Functions</h2></td></tr>
<tr class="memitem:a4e9564fa5409d882fd9d31dadfa18fb7"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1config_1_1config.html#a4e9564fa5409d882fd9d31dadfa18fb7">__init__</a></td></tr>
<tr class="memdesc:a4e9564fa5409d882fd9d31dadfa18fb7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default values for various settings.  <a href="#a4e9564fa5409d882fd9d31dadfa18fb7"></a><br/></td></tr>

<tr class="memitem:a94781a9eda13550bd954a8e99034f8c1"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1config_1_1config.html#a94781a9eda13550bd954a8e99034f8c1">log_to_console</a></td></tr>
<tr class="memdesc:a94781a9eda13550bd954a8e99034f8c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send log messages to STDERR.  <a href="#a94781a9eda13550bd954a8e99034f8c1"></a><br/></td></tr>

<tr class="memitem:a33131535d8753c77e5980870eef35d22"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1config_1_1config.html#a33131535d8753c77e5980870eef35d22">log_to_file</a></td></tr>
<tr class="memdesc:a33131535d8753c77e5980870eef35d22"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send log messages to a file.  <a href="#a33131535d8753c77e5980870eef35d22"></a><br/></td></tr>

<tr class="memitem:a0002096264b103145c6145f243e4264c"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1config_1_1config.html#a0002096264b103145c6145f243e4264c">log_level</a></td></tr>
<tr class="memdesc:a0002096264b103145c6145f243e4264c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the level of logging verbosity.  <a href="#a0002096264b103145c6145f243e4264c"></a><br/></td></tr>

</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Attributes for simple customizations. </p>
<p>This class has the following attributes to allow simple customizations. In the list below, the parenthesized term specifies the type of the attribute and the term in square brackets is the attribute's default value.</p>
<h3>Focus-related Customizations</h3>
<ul>
<li><code>active_border_color</code> <b>(int)</b> [<em>0xFF0000</em>]: This attribute specifies the color of the border of the window with the input focus. It should be a three-byte RGB packed into a single integer. The easiest way to specify this is as a 24-bit hex number, where byte 0 is blue, byte 1 is green, and byte 2 is red. By default, the active window's border color is red. </li>
<li><code>inactive_border_color</code> <b>(int)</b> [<em>0xFFFFFF</em>]: This attribute specifies the color of unfocused windows. By default, this color is white. </li>
<li><code>active_border_size</code> <b>(int)</b> [<em>1</em>]: This attribute specifies the size (in pixels) of the border of the window with the input focus. </li>
<li><code>inactive_border_size</code> <b>(int)</b> [<em>1</em>]: This attribute specifies the border size (in pixels) of inactive windows.</li>
</ul>
<h3>Logging Configuration</h3>
<ul>
<li><code>logger</code> <b>(dict)</b> [<em>see below</em>]: This field is passed to <a href="http://docs.python.org/2/library/logging.config.html#logging.config.dictConfig">logging.config.dictConfig()</a>. The default configuration sets up a <a href="http://docs.python.org/2/library/logging.handlers.html#logging.NullHandler">logging.NullHandler</a> to suppress Minx's log messages.</li>
</ul>
<p>To enable logging, use either <a class="el" href="classminx_1_1core_1_1config_1_1config.html#a94781a9eda13550bd954a8e99034f8c1" title="Send log messages to STDERR.">log_to_console()</a> to send log messages to STDERR or <a class="el" href="classminx_1_1core_1_1config_1_1config.html#a33131535d8753c77e5980870eef35d22" title="Send log messages to a file.">log_to_file()</a> to send them to a file. You can also use <a class="el" href="classminx_1_1core_1_1config_1_1config.html#a0002096264b103145c6145f243e4264c" title="Set the level of logging verbosity.">log_level()</a> to configure the level of verbosity.</p>
<p>The above three functions should be enough to configure logging for the most common cases. However, you can further customize logging by retrieving the keys of the logger dict and reassigning them to the desired values. The following paragraphs provide some details.</p>
<p><code>logger['formatters']['minx_formatter']</code> will get you a reference to the formatter for Minx's log messages. This formatter is itself a dict with the keys <code>'format'</code> and <code>'datefmt'</code>. Consult the <a href="http://docs.python.org/2/library/logging.config.html#logging-config-dictschema">Python logging documentation</a> for further details about formatters.</p>
<p><code>logger['handlers']['minx_handler']</code> yields Minx's logging handler, which is also a dict with keys <code>'class'</code> and <code>'formatter'</code>. As mentioned above, the handler's <code>'class'</code> is <code>'logging.NullHandler'</code>. The value of the <code>'formatter'</code> key is <code>'minx_formatter'</code>. You should reset <code>'class'</code> to another logging handler class (e.g., <code>'logging.FileHandler'</code>). You should also set other keys appropriately. Consult the Python logging module's documentation for more info.</p>
<p>Instead of using the predefined <code>'minx_formatter'</code> and <code>'minx_handler'</code> keys as described above, you can also reset the <code>config</code> object's <code>logger</code> attribute to anything you want.</p>
<h3>Miscellaneous Settings</h3>
<ul>
<li><code>terminal</code> <b>(string)</b> [<em>xterm</em>]: This field specifies the command to use for launching a terminal window. Your PATH variable will be searched to find it; so you don't have to specify a full path. Moreover, you can supply command-line arguments for the terminal program in this setting and they will be passed as-is. Minx's default configuration defines a &lt;a href="../wiki/hooks-list.wiki::launch_terminal&gt;key binding that uses the value of this setting. </li>
<li><code>synchronize_xlib</code> <b>(Boolean)</b> [<em>False</em>]: If set to <code>True</code>, Xlib calls will be synchronous; otherwise, the X protocol operates asynchronously. Synchronous mode can be useful for debugging. </li>
</ul>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a4e9564fa5409d882fd9d31dadfa18fb7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1config_1_1config.html#a4e9564fa5409d882fd9d31dadfa18fb7">minx.core.config.config.__init__</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Default values for various settings. </p>
<p>Instantiating this class will result in a config object with default values for the various settings. Clients can then assign different values to the desired attributes to customize Minx and pass the modified config object to the <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">wm</a> constructor. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a0002096264b103145c6145f243e4264c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1config_1_1config.html#a0002096264b103145c6145f243e4264c">minx.core.config.config.log_level</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the level of logging verbosity. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">level</td><td>The log level from the Python logging module.</td></tr>
  </table>
  </dd>
</dl>
<p>The default log level is <code>logging.WARNING</code>. Thus, only <code>WARNING</code>, <code>ERROR</code>, and <code>CRITICAL</code> messages will be printed. However, with this function, you can change the log level to either produce more or fewer messages.</p>
<p>Consult the Python logging documentation for more details about logging levels. </p>
................................................................................
</div>
</div>
<a class="anchor" id="a94781a9eda13550bd954a8e99034f8c1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1config_1_1config.html#a94781a9eda13550bd954a8e99034f8c1">minx.core.config.config.log_to_console</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Send log messages to STDERR. </p>
<p>This is a convenience function that allows you to avoid dealing directly with the <code>config.logger</code> attribute's complicated dict-of-dict-of-dict structure. Using it, you can easily configure Minx's log messages to be printed to STDERR. </p>

</div>
</div>
<a class="anchor" id="a33131535d8753c77e5980870eef35d22"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1config_1_1config.html#a33131535d8753c77e5980870eef35d22">minx.core.config.config.log_to_file</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Send log messages to a file. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>Log file's name. </td></tr>
    <tr><td class="paramname">mode</td><td>Log file open mode; default = 'w'.</td></tr>
  </table>
  </dd>
</dl>
<p>One of the most common configurations for logging is to send log messages to a file. This function configures the <code>config.logger</code> attribute so that log messages will be written to the named file. By default, the log will be overwritten. However, if you use the value 'a' for the <code>mode</code> parameter, log messages will be appended to the file.</p>






<


<
<
<



<
<




<
<



<

<



<

<
<
<
<
<




<
|
|
|
<
<
<
<
<
>
|
|


|
>







<
<

<
>


|
>

|
>

|
>

|
>

|













|









|





|


|



<
|






|





|







 







<
|


|







 







|


|



<
|











|







 







<
|


|







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
...
121
122
123
124
125
126
127

128
129
130
131
132
133
134
135
136
137
138
...
140
141
142
143
144
145
146
147
148
149
150
151
152
153

154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
...
182
183
184
185
186
187
188

189
190
191
192
193
194
195
196
197
198
199
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: minx.core.config.config Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">


  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>

   </div>

   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>

  </td>





 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.4 -->
<div id="nav-path" class="navpath">
  <ul>





<li class="navelem"><b>minx</b></li><li class="navelem"><b>core</b></li><li class="navelem"><a class="el" href="namespaceminx_1_1core_1_1config.html">config</a></li><li class="navelem"><a class="el" href="classminx_1_1core_1_1config_1_1config.html">config</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classminx_1_1core_1_1config_1_1config-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">minx.core.config.config Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Attributes for simple customizations.  
 <a href="classminx_1_1core_1_1config_1_1config.html#details">More...</a></p>


<table class="memberdecls">

<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a4e9564fa5409d882fd9d31dadfa18fb7"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1config_1_1config.html#a4e9564fa5409d882fd9d31dadfa18fb7">__init__</a></td></tr>
<tr class="memdesc:a4e9564fa5409d882fd9d31dadfa18fb7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default values for various settings.  <a href="#a4e9564fa5409d882fd9d31dadfa18fb7">More...</a><br/></td></tr>
<tr class="separator:a4e9564fa5409d882fd9d31dadfa18fb7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a94781a9eda13550bd954a8e99034f8c1"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1config_1_1config.html#a94781a9eda13550bd954a8e99034f8c1">log_to_console</a></td></tr>
<tr class="memdesc:a94781a9eda13550bd954a8e99034f8c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send log messages to STDERR.  <a href="#a94781a9eda13550bd954a8e99034f8c1">More...</a><br/></td></tr>
<tr class="separator:a94781a9eda13550bd954a8e99034f8c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a33131535d8753c77e5980870eef35d22"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1config_1_1config.html#a33131535d8753c77e5980870eef35d22">log_to_file</a></td></tr>
<tr class="memdesc:a33131535d8753c77e5980870eef35d22"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send log messages to a file.  <a href="#a33131535d8753c77e5980870eef35d22">More...</a><br/></td></tr>
<tr class="separator:a33131535d8753c77e5980870eef35d22"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0002096264b103145c6145f243e4264c"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1config_1_1config.html#a0002096264b103145c6145f243e4264c">log_level</a></td></tr>
<tr class="memdesc:a0002096264b103145c6145f243e4264c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the level of logging verbosity.  <a href="#a0002096264b103145c6145f243e4264c">More...</a><br/></td></tr>
<tr class="separator:a0002096264b103145c6145f243e4264c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Attributes for simple customizations. </p>
<p>This class has the following attributes to allow simple customizations. In the list below, the parenthesized term specifies the type of the attribute and the term in square brackets is the attribute's default value.</p>
<h3>Focus-related Customizations</h3>
<ul>
<li><code>active_border_color</code> <b>(int)</b> [<em>0xFF0000</em>]: This attribute specifies the color of the border of the window with the input focus. It should be a three-byte RGB packed into a single integer. The easiest way to specify this is as a 24-bit hex number, where byte 0 is blue, byte 1 is green, and byte 2 is red. By default, the active window's border color is red. </li>
<li><code>inactive_border_color</code> <b>(int)</b> [<em>0xFFFFFF</em>]: This attribute specifies the color of unfocused windows. By default, this color is white. </li>
<li><code>active_border_size</code> <b>(int)</b> [<em>1</em>]: This attribute specifies the size (in pixels) of the border of the window with the input focus. </li>
<li><code>inactive_border_size</code> <b>(int)</b> [<em>1</em>]: This attribute specifies the border size (in pixels) of inactive windows.</li>
</ul>
<h3>Logging Configuration</h3>
<ul>
<li><code>logger</code> <b>(dict)</b> [<em>see below</em>]: This field is passed to <a href="http://docs.python.org/2/library/logging.config.html#logging.config.dictConfig">logging.config.dictConfig()</a>. The default configuration sets up a <a href="http://docs.python.org/2/library/logging.handlers.html#logging.NullHandler">logging.NullHandler</a> to suppress Minx's log messages.</li>
</ul>
<p>To enable logging, use either <a class="el" href="classminx_1_1core_1_1config_1_1config.html#a94781a9eda13550bd954a8e99034f8c1" title="Send log messages to STDERR. ">log_to_console()</a> to send log messages to STDERR or <a class="el" href="classminx_1_1core_1_1config_1_1config.html#a33131535d8753c77e5980870eef35d22" title="Send log messages to a file. ">log_to_file()</a> to send them to a file. You can also use <a class="el" href="classminx_1_1core_1_1config_1_1config.html#a0002096264b103145c6145f243e4264c" title="Set the level of logging verbosity. ">log_level()</a> to configure the level of verbosity.</p>
<p>The above three functions should be enough to configure logging for the most common cases. However, you can further customize logging by retrieving the keys of the logger dict and reassigning them to the desired values. The following paragraphs provide some details.</p>
<p><code>logger['formatters']['minx_formatter']</code> will get you a reference to the formatter for Minx's log messages. This formatter is itself a dict with the keys <code>'format'</code> and <code>'datefmt'</code>. Consult the <a href="http://docs.python.org/2/library/logging.config.html#logging-config-dictschema">Python logging documentation</a> for further details about formatters.</p>
<p><code>logger['handlers']['minx_handler']</code> yields Minx's logging handler, which is also a dict with keys <code>'class'</code> and <code>'formatter'</code>. As mentioned above, the handler's <code>'class'</code> is <code>'logging.NullHandler'</code>. The value of the <code>'formatter'</code> key is <code>'minx_formatter'</code>. You should reset <code>'class'</code> to another logging handler class (e.g., <code>'logging.FileHandler'</code>). You should also set other keys appropriately. Consult the Python logging module's documentation for more info.</p>
<p>Instead of using the predefined <code>'minx_formatter'</code> and <code>'minx_handler'</code> keys as described above, you can also reset the <code>config</code> object's <code>logger</code> attribute to anything you want.</p>
<h3>Miscellaneous Settings</h3>
<ul>
<li><code>terminal</code> <b>(string)</b> [<em>xterm</em>]: This field specifies the command to use for launching a terminal window. Your PATH variable will be searched to find it; so you don't have to specify a full path. Moreover, you can supply command-line arguments for the terminal program in this setting and they will be passed as-is. Minx's default configuration defines a &lt;a href="../wiki/hooks-list.wiki::launch_terminal&gt;key binding that uses the value of this setting. </li>
<li><code>synchronize_xlib</code> <b>(Boolean)</b> [<em>False</em>]: If set to <code>True</code>, Xlib calls will be synchronous; otherwise, the X protocol operates asynchronously. Synchronous mode can be useful for debugging. </li>
</ul>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a4e9564fa5409d882fd9d31dadfa18fb7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.config.config.__init__ </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>)</td><td></td>
          <td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Default values for various settings. </p>
<p>Instantiating this class will result in a config object with default values for the various settings. Clients can then assign different values to the desired attributes to customize Minx and pass the modified config object to the <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">wm</a> constructor. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a0002096264b103145c6145f243e4264c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.config.config.log_level </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Set the level of logging verbosity. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">level</td><td>The log level from the Python logging module.</td></tr>
  </table>
  </dd>
</dl>
<p>The default log level is <code>logging.WARNING</code>. Thus, only <code>WARNING</code>, <code>ERROR</code>, and <code>CRITICAL</code> messages will be printed. However, with this function, you can change the log level to either produce more or fewer messages.</p>
<p>Consult the Python logging documentation for more details about logging levels. </p>
................................................................................
</div>
</div>
<a class="anchor" id="a94781a9eda13550bd954a8e99034f8c1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.config.config.log_to_console </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>)</td><td></td>
          <td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Send log messages to STDERR. </p>
<p>This is a convenience function that allows you to avoid dealing directly with the <code>config.logger</code> attribute's complicated dict-of-dict-of-dict structure. Using it, you can easily configure Minx's log messages to be printed to STDERR. </p>

</div>
</div>
<a class="anchor" id="a33131535d8753c77e5980870eef35d22"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.config.config.log_to_file </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Send log messages to a file. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>Log file's name. </td></tr>
    <tr><td class="paramname">mode</td><td>Log file open mode; default = 'w'.</td></tr>
  </table>
  </dd>
</dl>
<p>One of the most common configurations for logging is to send log messages to a file. This function configures the <code>config.logger</code> attribute so that log messages will be written to the named file. By default, the log will be overwritten. However, if you use the value 'a' for the <code>mode</code> parameter, log messages will be appended to the file.</p>

Changes to api/classminx_1_1core_1_1focus__list_1_1focus__list-members.html.

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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: Member List</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>
     
   </div>
   
   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>
   
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>minx</b>      </li>
      <li class="navelem"><b>core</b>      </li>
      <li class="navelem"><b>focus_list</b>      </li>
      <li class="navelem"><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html">focus_list</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">minx.core.focus_list.focus_list Member List</div>  </div>
</div><!--header-->
<div class="contents">

This is the complete list of members for <a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html">minx.core.focus_list.focus_list</a>, including all inherited members.<table>

  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html#a617ddeb73fbcc418afe3658b4f0c87df">__init__</a></td><td><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html">minx.core.focus_list.focus_list</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html#a11579a02cc77e9b6ca662dd1a6ab5b16">add</a></td><td><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html">minx.core.focus_list.focus_list</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html#aa9a3f29b1e963c00d653652f0cc65497">backward</a></td><td><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html">minx.core.focus_list.focus_list</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html#a406128103e24aecdaf35defe36dfbd52">forward</a></td><td><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html">minx.core.focus_list.focus_list</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html#a566682bf578420634575c809d5c57546">head</a></td><td><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html">minx.core.focus_list.focus_list</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html#a3f47523e3414a510dfd8e56f68ca8eef">remove</a></td><td><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html">minx.core.focus_list.focus_list</a></td><td></td></tr>
</table></div><!-- contents -->
</body>
</html>






<


<
<
<



<
<




<
<



<

<



<

<
<
<
<
<




<
|
|
|
<
<
<
|
<
|
|





>
|
>
|
|
|
|
|
|



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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: Member List</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">


  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>

   </div>

   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>

  </td>





 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.4 -->
<div id="nav-path" class="navpath">
  <ul>



<li class="navelem"><b>minx</b></li><li class="navelem"><b>core</b></li><li class="navelem"><b>focus_list</b></li><li class="navelem"><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html">focus_list</a></li>  </ul>

</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">minx.core.focus_list.focus_list Member List</div>  </div>
</div><!--header-->
<div class="contents">

<p>This is the complete list of members for <a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html">minx.core.focus_list.focus_list</a>, including all inherited members.</p>
<table class="directory">
  <tr class="even"><td class="entry"><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html#a617ddeb73fbcc418afe3658b4f0c87df">__init__</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html">minx.core.focus_list.focus_list</a></td><td class="entry"></td></tr>
  <tr><td class="entry"><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html#a11579a02cc77e9b6ca662dd1a6ab5b16">add</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html">minx.core.focus_list.focus_list</a></td><td class="entry"></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html#aa9a3f29b1e963c00d653652f0cc65497">backward</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html">minx.core.focus_list.focus_list</a></td><td class="entry"></td></tr>
  <tr><td class="entry"><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html#a406128103e24aecdaf35defe36dfbd52">forward</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html">minx.core.focus_list.focus_list</a></td><td class="entry"></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html#a566682bf578420634575c809d5c57546">head</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html">minx.core.focus_list.focus_list</a></td><td class="entry"></td></tr>
  <tr><td class="entry"><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html#a3f47523e3414a510dfd8e56f68ca8eef">remove</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html">minx.core.focus_list.focus_list</a></td><td class="entry"></td></tr>
</table></div><!-- contents -->
</body>
</html>

Changes to api/classminx_1_1core_1_1focus__list_1_1focus__list.html.

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
...
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: minx.core.focus_list.focus_list Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>
     
   </div>
   
   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>
   
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>minx</b>      </li>
      <li class="navelem"><b>core</b>      </li>
      <li class="navelem"><b>focus_list</b>      </li>
      <li class="navelem"><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html">focus_list</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>

  <div class="headertitle">
<div class="title">minx.core.focus_list.focus_list Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>A doubly-linked circular list for keeping track of windows that can be focused.  
 <a href="classminx_1_1core_1_1focus__list_1_1focus__list.html#details">More...</a></p>

<p><a href="classminx_1_1core_1_1focus__list_1_1focus__list-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>

Public Member Functions</h2></td></tr>
<tr class="memitem:a617ddeb73fbcc418afe3658b4f0c87df"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a617ddeb73fbcc418afe3658b4f0c87df"></a>
def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html#a617ddeb73fbcc418afe3658b4f0c87df">__init__</a></td></tr>
<tr class="memdesc:a617ddeb73fbcc418afe3658b4f0c87df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an empty list. <br/></td></tr>

<tr class="memitem:a11579a02cc77e9b6ca662dd1a6ab5b16"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html#a11579a02cc77e9b6ca662dd1a6ab5b16">add</a></td></tr>
<tr class="memdesc:a11579a02cc77e9b6ca662dd1a6ab5b16"><td class="mdescLeft">&#160;</td><td class="mdescRight">Insert an item at the beginning of the list.  <a href="#a11579a02cc77e9b6ca662dd1a6ab5b16"></a><br/></td></tr>

<tr class="memitem:a3f47523e3414a510dfd8e56f68ca8eef"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html#a3f47523e3414a510dfd8e56f68ca8eef">remove</a></td></tr>
<tr class="memdesc:a3f47523e3414a510dfd8e56f68ca8eef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove specified item from list.  <a href="#a3f47523e3414a510dfd8e56f68ca8eef"></a><br/></td></tr>

<tr class="memitem:a566682bf578420634575c809d5c57546"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a566682bf578420634575c809d5c57546"></a>
def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html#a566682bf578420634575c809d5c57546">head</a></td></tr>
<tr class="memdesc:a566682bf578420634575c809d5c57546"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return list's first element or None if list is empty. <br/></td></tr>

<tr class="memitem:a406128103e24aecdaf35defe36dfbd52"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html#a406128103e24aecdaf35defe36dfbd52">forward</a></td></tr>
<tr class="memdesc:a406128103e24aecdaf35defe36dfbd52"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move head to next element.  <a href="#a406128103e24aecdaf35defe36dfbd52"></a><br/></td></tr>

<tr class="memitem:aa9a3f29b1e963c00d653652f0cc65497"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html#aa9a3f29b1e963c00d653652f0cc65497">backward</a></td></tr>
<tr class="memdesc:aa9a3f29b1e963c00d653652f0cc65497"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move head to previous element.  <a href="#aa9a3f29b1e963c00d653652f0cc65497"></a><br/></td></tr>

</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>A doubly-linked circular list for keeping track of windows that can be focused. </p>
<p>This class implements a doubly-linked circular list that is meant to be used by <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">the window manager</a> for keeping track of the list of <a class="el" href="classminx_1_1core_1_1window_1_1window.html">top-level windows</a> that can be focused. The head of this list will always be taken to be the currently focused window. </p>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a11579a02cc77e9b6ca662dd1a6ab5b16"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html#a11579a02cc77e9b6ca662dd1a6ab5b16">minx.core.focus_list.focus_list.add</a> </td>













































































          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Insert an item at the beginning of the list. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">item</td><td>The item to be appended.</td></tr>
  </table>
  </dd>
</dl>
<p>This method inserts item (which can be of any type) at the beginning of the list, taking care to maintain circularity.</p>
<dl class="section note"><dt>Note:</dt><dd>We add new items to the beginning of the list because this is usually how we want input focus to behave: when a new window is created, it should acquire the input focus. </dd></dl>

</div>
</div>
<a class="anchor" id="aa9a3f29b1e963c00d653652f0cc65497"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html#aa9a3f29b1e963c00d653652f0cc65497">minx.core.focus_list.focus_list.backward</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Move head to previous element. </p>
<p>This method is meant to allow moving the input focus from the current <a class="el" href="classminx_1_1core_1_1window_1_1window.html">top-level window</a> to the previous one in the <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">window manager's</a> list of windows that can be focused.</p>
<p>If the focus list is empty, this function does nothing. </p>

</div>
</div>
<a class="anchor" id="a406128103e24aecdaf35defe36dfbd52"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html#a406128103e24aecdaf35defe36dfbd52">minx.core.focus_list.focus_list.forward</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Move head to next element. </p>
<p>This method is meant to allow moving the input focus from the current <a class="el" href="classminx_1_1core_1_1window_1_1window.html">top-level window</a> to the next one in the <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">window manager's</a> list of windows that can be focused.</p>
<p>If the focus list is empty, this function does nothing. </p>

</div>
</div>
<a class="anchor" id="a3f47523e3414a510dfd8e56f68ca8eef"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html#a3f47523e3414a510dfd8e56f68ca8eef">minx.core.focus_list.focus_list.remove</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>item</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Remove specified item from list. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">item</td><td>List item to be removed.</td></tr>
  </table>
  </dd>
</dl>
<p>This method searches the list for item and, if it is present, removes it, taking care to maintain circularity. If item is the first element in the list, the second element will become the list's new head after the removal.</p>
<dl class="section note"><dt>Note:</dt><dd>To be able to find item, we need its type to support the equality operator. Also, if item occurs more than once, the first instance will be removed. </dd></dl>

</div>
</div>
</div><!-- contents -->
</body>
</html>






<


<
<
<



<
<




<
<



<

<



<

<
<
<
<
<




<
|
|
|
<
<
<
|
<
|
|


|
>







<
<

<
>




>

|
>

|
>



>

|
>

|
>

|

|
|





<
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







<
|

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

|






|






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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
...
164
165
166
167
168
169
170

171
172















































































173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: minx.core.focus_list.focus_list Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">


  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>

   </div>

   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>

  </td>





 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.4 -->
<div id="nav-path" class="navpath">
  <ul>



<li class="navelem"><b>minx</b></li><li class="navelem"><b>core</b></li><li class="navelem"><b>focus_list</b></li><li class="navelem"><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html">focus_list</a></li>  </ul>

</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classminx_1_1core_1_1focus__list_1_1focus__list-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">minx.core.focus_list.focus_list Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>A doubly-linked circular list for keeping track of windows that can be focused.  
 <a href="classminx_1_1core_1_1focus__list_1_1focus__list.html#details">More...</a></p>


<table class="memberdecls">

<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a617ddeb73fbcc418afe3658b4f0c87df"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a617ddeb73fbcc418afe3658b4f0c87df"></a>
def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html#a617ddeb73fbcc418afe3658b4f0c87df">__init__</a></td></tr>
<tr class="memdesc:a617ddeb73fbcc418afe3658b4f0c87df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an empty list. <br/></td></tr>
<tr class="separator:a617ddeb73fbcc418afe3658b4f0c87df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11579a02cc77e9b6ca662dd1a6ab5b16"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html#a11579a02cc77e9b6ca662dd1a6ab5b16">add</a></td></tr>
<tr class="memdesc:a11579a02cc77e9b6ca662dd1a6ab5b16"><td class="mdescLeft">&#160;</td><td class="mdescRight">Insert an item at the beginning of the list.  <a href="#a11579a02cc77e9b6ca662dd1a6ab5b16">More...</a><br/></td></tr>
<tr class="separator:a11579a02cc77e9b6ca662dd1a6ab5b16"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f47523e3414a510dfd8e56f68ca8eef"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html#a3f47523e3414a510dfd8e56f68ca8eef">remove</a></td></tr>
<tr class="memdesc:a3f47523e3414a510dfd8e56f68ca8eef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove specified item from list.  <a href="#a3f47523e3414a510dfd8e56f68ca8eef">More...</a><br/></td></tr>
<tr class="separator:a3f47523e3414a510dfd8e56f68ca8eef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a566682bf578420634575c809d5c57546"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a566682bf578420634575c809d5c57546"></a>
def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html#a566682bf578420634575c809d5c57546">head</a></td></tr>
<tr class="memdesc:a566682bf578420634575c809d5c57546"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return list's first element or None if list is empty. <br/></td></tr>
<tr class="separator:a566682bf578420634575c809d5c57546"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a406128103e24aecdaf35defe36dfbd52"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html#a406128103e24aecdaf35defe36dfbd52">forward</a></td></tr>
<tr class="memdesc:a406128103e24aecdaf35defe36dfbd52"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move head to next element.  <a href="#a406128103e24aecdaf35defe36dfbd52">More...</a><br/></td></tr>
<tr class="separator:a406128103e24aecdaf35defe36dfbd52"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa9a3f29b1e963c00d653652f0cc65497"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1focus__list_1_1focus__list.html#aa9a3f29b1e963c00d653652f0cc65497">backward</a></td></tr>
<tr class="memdesc:aa9a3f29b1e963c00d653652f0cc65497"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move head to previous element.  <a href="#aa9a3f29b1e963c00d653652f0cc65497">More...</a><br/></td></tr>
<tr class="separator:aa9a3f29b1e963c00d653652f0cc65497"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A doubly-linked circular list for keeping track of windows that can be focused. </p>
<p>This class implements a doubly-linked circular list that is meant to be used by <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">the window manager</a> for keeping track of the list of <a class="el" href="classminxlib_1_1window.html">top-level windows</a> that can be focused. The head of this list will always be taken to be the currently focused window. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a11579a02cc77e9b6ca662dd1a6ab5b16"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>

          <td class="memname">def minx.core.focus_list.focus_list.add </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>item</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Insert an item at the beginning of the list. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">item</td><td>The item to be added.</td></tr>
  </table>
  </dd>
</dl>
<p>This method inserts item (which can be of any type) at the beginning of the list, taking care to maintain circularity.</p>
<dl class="section note"><dt>Note</dt><dd>We add new items to the beginning of the list because this is usually how we want input focus to behave: when a new window is created, it should acquire the input focus. </dd></dl>

</div>
</div>
<a class="anchor" id="aa9a3f29b1e963c00d653652f0cc65497"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.focus_list.focus_list.backward </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Move head to previous element. </p>
<p>This method is meant to allow moving the input focus from the current <a class="el" href="classminxlib_1_1window.html">top-level window</a> to the previous one in the <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">window manager's</a> list of windows that can be focused.</p>
<p>If the focus list is empty, this function does nothing. </p>

</div>
</div>
<a class="anchor" id="a406128103e24aecdaf35defe36dfbd52"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.focus_list.focus_list.forward </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Move head to next element. </p>
<p>This method is meant to allow moving the input focus from the current <a class="el" href="classminxlib_1_1window.html">top-level window</a> to the next one in the <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">window manager's</a> list of windows that can be focused.</p>
<p>If the focus list is empty, this function does nothing. </p>

</div>
</div>
<a class="anchor" id="a3f47523e3414a510dfd8e56f68ca8eef"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.focus_list.focus_list.remove </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>

</div><div class="memdoc">
















































































<p>Remove specified item from list. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">item</td><td>List item to be removed.</td></tr>
  </table>
  </dd>
</dl>
<p>This method searches the list for item and, if it is present, removes it, taking care to maintain circularity. If item is the first element in the list, the second element will become the list's new head after the removal.</p>
<dl class="section note"><dt>Note</dt><dd>To be able to find item, we need its type to support the equality operator. Also, if item occurs more than once, the first instance will be removed. </dd></dl>

</div>
</div>
</div><!-- contents -->
</body>
</html>

Changes to api/classminx_1_1core_1_1hooks_1_1hooks-members.html.

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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: Member List</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>
     
   </div>
   
   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>
   
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>minx</b>      </li>
      <li class="navelem"><b>core</b>      </li>
      <li class="navelem"><b>hooks</b>      </li>
      <li class="navelem"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html">hooks</a>      </li>
    </ul>

  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">minx.core.hooks.hooks Member List</div>  </div>
</div><!--header-->
<div class="contents">

This is the complete list of members for <a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html">minx.core.hooks.hooks</a>, including all inherited members.<table>

  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#aa8dfbac91f9952cdda3812c8dd396fce">__init__</a></td><td><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html">minx.core.hooks.hooks</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#aee2143f5fc08601ded72a564544ff824">add</a></td><td><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html">minx.core.hooks.hooks</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a0c70d95929daa5101a8815b2f00bc581">default_priority</a></td><td><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html">minx.core.hooks.hooks</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a35e9417f8b5a450368ee09ae7ddf1af7">max_priority</a></td><td><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html">minx.core.hooks.hooks</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#aa7cd4a793af1f6e84380c8838015e84c">min_priority</a></td><td><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html">minx.core.hooks.hooks</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a7248db24422493912f0b0f5589f2b341">names</a></td><td><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html">minx.core.hooks.hooks</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a0be6448ad78e08223bc2174f8e20fc68">remove</a></td><td><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html">minx.core.hooks.hooks</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a7184c493ebf93af23091df6fc8ec0bcf">rename</a></td><td><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html">minx.core.hooks.hooks</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a44254dc1c35f5f257c68d8024e1f402d">trigger</a></td><td><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html">minx.core.hooks.hooks</a></td><td></td></tr>
</table></div><!-- contents -->
</body>
</html>






<


<
<
<



<
<




<
<



<

<



<

<
<
<
<
<




<
|
|
|
<
<
<
<
<
>
|
|





>
|
>
|
|
|
|
|
|
|
|
|



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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: Member List</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">


  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>

   </div>

   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>

  </td>





 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.4 -->
<div id="nav-path" class="navpath">
  <ul>





<li class="navelem"><b>minx</b></li><li class="navelem"><b>core</b></li><li class="navelem"><b>hooks</b></li><li class="navelem"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html">hooks</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">minx.core.hooks.hooks Member List</div>  </div>
</div><!--header-->
<div class="contents">

<p>This is the complete list of members for <a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html">minx.core.hooks.hooks</a>, including all inherited members.</p>
<table class="directory">
  <tr class="even"><td class="entry"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#aa8dfbac91f9952cdda3812c8dd396fce">__init__</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html">minx.core.hooks.hooks</a></td><td class="entry"></td></tr>
  <tr><td class="entry"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#aee2143f5fc08601ded72a564544ff824">add</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html">minx.core.hooks.hooks</a></td><td class="entry"></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a0c70d95929daa5101a8815b2f00bc581">default_priority</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html">minx.core.hooks.hooks</a></td><td class="entry"></td></tr>
  <tr><td class="entry"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a35e9417f8b5a450368ee09ae7ddf1af7">max_priority</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html">minx.core.hooks.hooks</a></td><td class="entry"></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#aa7cd4a793af1f6e84380c8838015e84c">min_priority</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html">minx.core.hooks.hooks</a></td><td class="entry"></td></tr>
  <tr><td class="entry"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a7248db24422493912f0b0f5589f2b341">names</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html">minx.core.hooks.hooks</a></td><td class="entry"></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a0be6448ad78e08223bc2174f8e20fc68">remove</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html">minx.core.hooks.hooks</a></td><td class="entry"></td></tr>
  <tr><td class="entry"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a7184c493ebf93af23091df6fc8ec0bcf">rename</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html">minx.core.hooks.hooks</a></td><td class="entry"></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a44254dc1c35f5f257c68d8024e1f402d">trigger</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html">minx.core.hooks.hooks</a></td><td class="entry"></td></tr>
</table></div><!-- contents -->
</body>
</html>

Changes to api/classminx_1_1core_1_1hooks_1_1hooks.html.

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
...
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164








165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
...
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
...
241
242
243
244
245
246
247
248

249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
...
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
...
305
306
307
308
309
310
311
312

313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
...
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
...
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
...
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: minx.core.hooks.hooks Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>
     
   </div>
   
   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>
   
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>minx</b>      </li>
      <li class="navelem"><b>core</b>      </li>
      <li class="navelem"><b>hooks</b>      </li>
      <li class="navelem"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html">hooks</a>      </li>
    </ul>

  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>

  <div class="headertitle">
<div class="title">minx.core.hooks.hooks Class Reference<div class="ingroups"><a class="el" href="group__grp__minx__core__hooks.html">Hooks Infrastructure</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Mapping arbitrary key types to callable objects.  
 <a href="classminx_1_1core_1_1hooks_1_1hooks.html#details">More...</a></p>

<p><a href="classminx_1_1core_1_1hooks_1_1hooks-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>

Public Member Functions</h2></td></tr>
<tr class="memitem:aa8dfbac91f9952cdda3812c8dd396fce"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#aa8dfbac91f9952cdda3812c8dd396fce">__init__</a></td></tr>
<tr class="memdesc:aa8dfbac91f9952cdda3812c8dd396fce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an empty hook map.  <a href="#aa8dfbac91f9952cdda3812c8dd396fce"></a><br/></td></tr>

<tr class="memitem:aee2143f5fc08601ded72a564544ff824"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#aee2143f5fc08601ded72a564544ff824">add</a></td></tr>
<tr class="memdesc:aee2143f5fc08601ded72a564544ff824"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a new function for some key.  <a href="#aee2143f5fc08601ded72a564544ff824"></a><br/></td></tr>

<tr class="memitem:a0be6448ad78e08223bc2174f8e20fc68"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a0be6448ad78e08223bc2174f8e20fc68">remove</a></td></tr>
<tr class="memdesc:a0be6448ad78e08223bc2174f8e20fc68"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove all hooks for specified name.  <a href="#a0be6448ad78e08223bc2174f8e20fc68"></a><br/></td></tr>

<tr class="memitem:a7184c493ebf93af23091df6fc8ec0bcf"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a7184c493ebf93af23091df6fc8ec0bcf">rename</a></td></tr>
<tr class="memdesc:a7184c493ebf93af23091df6fc8ec0bcf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rename the specified hook.  <a href="#a7184c493ebf93af23091df6fc8ec0bcf"></a><br/></td></tr>

<tr class="memitem:a44254dc1c35f5f257c68d8024e1f402d"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a44254dc1c35f5f257c68d8024e1f402d">trigger</a></td></tr>
<tr class="memdesc:a44254dc1c35f5f257c68d8024e1f402d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Execute functions for a given key.  <a href="#a44254dc1c35f5f257c68d8024e1f402d"></a><br/></td></tr>

<tr class="memitem:a7248db24422493912f0b0f5589f2b341"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a7248db24422493912f0b0f5589f2b341">names</a></td></tr>
<tr class="memdesc:a7248db24422493912f0b0f5589f2b341"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get names of currently defined hooks.  <a href="#a7248db24422493912f0b0f5589f2b341"></a><br/></td></tr>

<tr class="memitem:a35e9417f8b5a450368ee09ae7ddf1af7"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a35e9417f8b5a450368ee09ae7ddf1af7">max_priority</a></td></tr>
<tr class="memdesc:a35e9417f8b5a450368ee09ae7ddf1af7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Priority value of highest-priority hook for some key.  <a href="#a35e9417f8b5a450368ee09ae7ddf1af7"></a><br/></td></tr>

<tr class="memitem:aa7cd4a793af1f6e84380c8838015e84c"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#aa7cd4a793af1f6e84380c8838015e84c">min_priority</a></td></tr>
<tr class="memdesc:aa7cd4a793af1f6e84380c8838015e84c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Priority value of lowest-priority hook for some key.  <a href="#aa7cd4a793af1f6e84380c8838015e84c"></a><br/></td></tr>

<tr class="memitem:a0c70d95929daa5101a8815b2f00bc581"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a0c70d95929daa5101a8815b2f00bc581">default_priority</a></td></tr>
<tr class="memdesc:a0c70d95929daa5101a8815b2f00bc581"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default priority for hooks.  <a href="#a0c70d95929daa5101a8815b2f00bc581"></a><br/></td></tr>

</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Mapping arbitrary key types to callable objects. </p>
<p>This class maps keys (strings, ints, whatever) to prioritized lists of callables (i.e., functions or function objects). After a mapping has been setup, clients can trigger the functions for a key.</p>
<p>This class provides a general infrastructure for Minx's support for customization via hooks. Although we can use any (reasonable) type as the keys, in Minx, keys are strings that name the different hooks that Minx supports (e.g., 'manage_hook', 'x_create_notify', and so on). If you name your hooks using a non-string type, those hooks will be added to the map but simply be ignored. </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aa8dfbac91f9952cdda3812c8dd396fce"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#aa8dfbac91f9952cdda3812c8dd396fce">minx.core.hooks.hooks.__init__</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Create an empty hook map. </p>
<dl class="section return"><dt>Returns:</dt><dd>An empty hook map.</dd></dl>
<p>When a new hooks object is created, it will have no hook functions in it. Clients (i.e., other Minx classes and functions or end-user configuration code) will have to then add hook functions to the hook map.</p>
<dl class="section note"><dt>Note:</dt><dd>In general, there should be no need in end-user code to create a hooks object. Rather end-users should use the hooks attribute of the <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">main window manager object</a>. Refer to the <a href="../wiki/hooks-howto.wiki">Hooks HOWTO</a> for more on typical usage patterns for this class. </dd></dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="aee2143f5fc08601ded72a564544ff824"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#aee2143f5fc08601ded72a564544ff824">minx.core.hooks.hooks.add</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Add a new function for some key. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">k</td><td>The name of the hook. </td></tr>
    <tr><td class="paramname">f</td><td>The function to be executed for k. </td></tr>
    <tr><td class="paramname">p</td><td>The function priority (must be in range [1, 100]).</td></tr>
  </table>
  </dd>
</dl>
<p>This method adds f to the (prioritized) list of functions corresponding to k. If f is already in the list for k, it will not be duplicated. Thus, you can safely call this function multiple times with the same hook without worrying about creating duplicate entries in the hook lists or needing to first check to avoid duplication. This is useful, for example, when creating window objects that add hooks for various X events; the same function will be passed for each window instance and we don't want duplicate entries of the same function in our hook map (because each hook should be called once and only once per triggering).</p>
<p>Priorities should be integers in the range [1, 100]. Higher numbers will insert f into the beginning of the list. If the priority p is not supplied, it will be assigned a default priority. Passing a non-integral value or an out-of-range value for the parameter p will also result in the priority for f being set to the default priority.</p>








<dl class="section note"><dt>Note:</dt><dd>As mentioned earlier, although you can use any (reasonable) type for the hook map's keys, in Minx, we use strings as the keys. That is, pass a string as the first parameter k. </dd></dl>

</div>
</div>
<a class="anchor" id="a0c70d95929daa5101a8815b2f00bc581"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a0c70d95929daa5101a8815b2f00bc581">minx.core.hooks.hooks.default_priority</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Default priority for hooks. </p>
<dl class="section return"><dt>Returns:</dt><dd>Integer specifying default hook priority.</dd></dl>
<p>To allow end-users greater control over the execution order of hook functions, the <a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html" title="Mapping arbitrary key types to callable objects.">minx.core.hooks.hooks</a> class arranges hook functions according to priorities, which must be integers in the range [1, 100]. Higher priority hooks are executed before lower priority ones.</p>
<p>If end-users don't specify the priority for a hook, it will be assigned the default priority, which is the value returned by this function.</p>
<dl class="section note"><dt>Note:</dt><dd>Since hook priorities must lie in [1, 100], we use 50 as the default priority as this will allow end-users to add their hooks both above and below the default level. </dd></dl>

</div>
</div>
<a class="anchor" id="a35e9417f8b5a450368ee09ae7ddf1af7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a35e9417f8b5a450368ee09ae7ddf1af7">minx.core.hooks.hooks.max_priority</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Priority value of highest-priority hook for some key. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">k</td><td>The name of the hook. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Priority (integer) of highest-priority hook corresponding to k.</dd></dl>
<p>This function is intended to allow end-users to determine the priority of the current highest-priority hook function corresponding to k so that they can insert higher priority functions. Here is a somewhat contrived snippet of code illustrating typical usage:</p>
<div class="fragment"><pre class="fragment">             #!/usr/bin/env python
 
             import minx
 
             def my_manage_hook(w):
                 prop = w.properties()
                 if prop['class'].lower() == 'gkrellm':
                    return False
................................................................................
             if m &lt; 0: # no manage_hook installed
                m = wm.hooks.default_priority() + 1
             else: # some module installed a manage_hook
                m = m + 1
             wm.hooks.add('manage_hook', my_manage_hook, m)
 
             # Okay, let's run the window manager...
             wm.start()</pre></div><p>The above example is contrived because if that is all your Minx start-up file contained, there would be no manage_hook installed and, so, no need to check to ensure that my_manage_hook() would execute first. Furthermore, usually, only a single manage_hook would be needed; there's no point to having multiple manage hooks.</p>

<p>Nonetheless, the example serves to illustrate how and why you might want to use the <a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a35e9417f8b5a450368ee09ae7ddf1af7" title="Priority value of highest-priority hook for some key.">hooks.max_priority()</a> function.</p>
<p>Note that if the hook map does not contain any hooks for the key k, this function will return a negative number.</p>
<dl class="section note"><dt>Note:</dt><dd>As mentioned earlier, although you can use any (reasonable) type for the hook map's keys, in Minx, we use strings as the keys. That is, pass a string for the parameter k. </dd></dl>

</div>
</div>
<a class="anchor" id="aa7cd4a793af1f6e84380c8838015e84c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#aa7cd4a793af1f6e84380c8838015e84c">minx.core.hooks.hooks.min_priority</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Priority value of lowest-priority hook for some key. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">k</td><td>The name of the hook. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Priority (integer) of lowest-priority hook corresponding to k.</dd></dl>
<p>This function is intended to allow end-users to determine the priority of the current lowest-priority hook function corresponding to k so that they can insert lower priority functions.</p>
<p>Here is a somewhat contrived snippet of code illustrating typical usage:</p>
<div class="fragment"><pre class="fragment">             #!/usr/bin/env python
 
             import minx
 
             def my_manage_hook(w):
                 prop = w.properties()
                 if prop['class'].lower() == 'gkrellm':
                    return False
................................................................................
             if m &lt; 0: # no manage_hook installed
                m = wm.hooks.default_priority() - 1
             else: # some module installed a manage_hook
                m = m - 1
             wm.hooks.add('manage_hook', my_manage_hook, m)
 
             # Okay, let's run the window manager...
             wm.start()</pre></div><p>The above example is contrived because if that is all your Minx start-up file contained, there would be no manage_hook installed and, so, no need to check to ensure that my_manage_hook() would execute last. Furthermore, usually, only a single manage_hook would be needed; there's no point to having multiple manage hooks.</p>

<p>Nonetheless, the example serves to illustrate how and why you might want to use the <a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#aa7cd4a793af1f6e84380c8838015e84c" title="Priority value of lowest-priority hook for some key.">hooks.min_priority()</a> function.</p>
<p>If the hook map does not contain any hooks for the key k, this function will return a negative number.</p>
<dl class="section note"><dt>Note:</dt><dd>Typically, you would want your hooks to execute before currently installed hooks. Thus, this function is much less useful than <a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a35e9417f8b5a450368ee09ae7ddf1af7" title="Priority value of highest-priority hook for some key.">hooks.max_priority()</a>, but is provided for the sake of completeness and just in case someone or some situation finds it necessary. </dd></dl>

</div>
</div>
<a class="anchor" id="a7248db24422493912f0b0f5589f2b341"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a7248db24422493912f0b0f5589f2b341">minx.core.hooks.hooks.names</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get names of currently defined hooks. </p>
<dl class="section return"><dt>Returns:</dt><dd>List of strings containing names of currently defined hooks.</dd></dl>
<p>This function returns the names of all the currently defined hooks. Callers should not rely on the returned names being in any particular order.</p>
<dl class="section note"><dt>Note:</dt><dd>Although Minx uses strings for the keys in its hook map, if end-users add hooks using keys of other types, the returned list will contain those types as well. That is, Minx makes no effort to enforce using strings as hook names. If you do, that's fine; however, those particular hooks will not be triggered (so don't waste your time and your computer's resources). </dd></dl>

</div>
</div>
<a class="anchor" id="a0be6448ad78e08223bc2174f8e20fc68"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a0be6448ad78e08223bc2174f8e20fc68">minx.core.hooks.hooks.remove</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Remove all hooks for specified name. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">k</td><td>Name of hook that is to be removed.</td></tr>
  </table>
  </dd>
</dl>
<p>This function will remove all the hooks corresponding to the name k.</p>
<p>Please understand that this is a fairly dangerous function! It is intended to be used in conjunction with hooks for key bindings. Specifically, you can use it to remove the default key bindings. Using it to remove other hooks will almost certainly lead to trouble.</p>
<dl class="section note"><dt>Note:</dt><dd>As mentioned earlier, although you can use any (reasonable) type for the hook map's keys, in Minx, we use strings as the keys. That is, pass a string for the parameter k. </dd></dl>

</div>
</div>
<a class="anchor" id="a7184c493ebf93af23091df6fc8ec0bcf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a7184c493ebf93af23091df6fc8ec0bcf">minx.core.hooks.hooks.rename</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Rename the specified hook. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">k</td><td>Current name of hook to be renamed. </td></tr>
    <tr><td class="paramname">n</td><td>New hook name.</td></tr>
  </table>
  </dd>
</dl>
<p>This function will assign the name n to the hooks currently identified by k. If the hook map does not contain any hooks corresponding to k, the function will do nothing. However, if there are already hooks assigned to n and to k, the older hooks for n will be replaced by the ones for k.</p>
<p>Needless to say, this is a fairly dangerous function! Use it only to rename the default key bindings. Renaming other hooks is a Very Bad Idea (TM).</p>
<dl class="section note"><dt>Note:</dt><dd>Both k and n should be strings. Although you can use any (reasonable) type as keys for the hook map, Minx convention is to use strings. Other key types will result in "ghost" hooks, i.e., hook functions that are never triggered. </dd></dl>

</div>
</div>
<a class="anchor" id="a44254dc1c35f5f257c68d8024e1f402d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a44254dc1c35f5f257c68d8024e1f402d">minx.core.hooks.hooks.trigger</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Execute functions for a given key. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">k</td><td>The name of the hook whose functions we want to call. </td></tr>
    <tr><td class="paramname">p</td><td>Parameters to be passed to the hook functions. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>List of hook return values.</dd></dl>
<p>This method triggers all the functions corresponding to k, calling them in order of descending priorities. Functions that have the same priority will be executed in the order in which they were added to the hook map.</p>
<p>Each function will be passed the parameters in the positional args tuple p. Thus, hook functions can take an arbitrary number of arguments. Furthermore, these hook function parameters can be of any type; this method doesn't care and simply passes them through to the hooks as-is.</p>
<p>This function collects the return values of all the hook functions for key k in a list. Callers of this function can use the return values in whatever way they please. For example, depending on the specific hook, you may:</p>
<ul>
<li>Simply ignore the hook return values. </li>
<li>Use only the first return value, i.e., the value returned by the highest-priority hook. </li>
<li>Use the last return value (i.e., last hook executed). </li>
<li>Use all the return values.</li>
</ul>
<p>If a hook wants or needs to cut short the execution of the remaining hooks in its chain, it can raise a <a class="el" href="classminx_1_1core_1_1hooks_1_1short__circuit.html" title="An exception for cutting short the execution of a chain of hooks.">short_circuit</a> exception. If the hook also wants to return a value along with cutting short its hook chain, it will have to pass the return value via the <a class="el" href="classminx_1_1core_1_1hooks_1_1short__circuit.html" title="An exception for cutting short the execution of a chain of hooks.">short_circuit</a> exception.</p>
<p>The <a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a44254dc1c35f5f257c68d8024e1f402d" title="Execute functions for a given key.">hooks.trigger()</a> function will stop executing the hooks for key k when it sees a <a class="el" href="classminx_1_1core_1_1hooks_1_1short__circuit.html" title="An exception for cutting short the execution of a chain of hooks.">short_circuit</a> exception.</p>
<dl class="section note"><dt>Note:</dt><dd>As mentioned earlier, although you can use any (reasonable) type for the hook map's keys, in Minx, we use strings as the keys. That is, pass a string as the first parameter k. </dd></dl>

</div>
</div>
</div><!-- contents -->
</body>
</html>






<


<
<
<



<
<




<
<



<

<



<

<
<
<
<
<




<
|
|
|
<
<
<
<
<
>
|
|


|
>







<
<

<
>


|
>

|
>

|
>

|
>

|
>

|
>

|
>

|
>

|
>

|



|





|


|



<
|


|

|



|





|







 







<
|


|








|
>
>
>
>
>
>
>
>
|








|


|



<
|


|
|

|








|







 







<
|


|





|

|







 







|
>
|

|








|







 







<
|


|





|


|







 







|
>
|

|








|


|



<
|


|

|








|







 







<
|


|







|








|







 







<
|


|








|








|







 







<
|


|






|









|
|
|






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
...
130
131
132
133
134
135
136

137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173

174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
...
199
200
201
202
203
204
205

206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
...
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
...
262
263
264
265
266
267
268

269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
...
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322

323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
...
347
348
349
350
351
352
353

354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
...
390
391
392
393
394
395
396

397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
...
434
435
436
437
438
439
440

441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: minx.core.hooks.hooks Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">


  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>

   </div>

   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>

  </td>





 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.4 -->
<div id="nav-path" class="navpath">
  <ul>





<li class="navelem"><b>minx</b></li><li class="navelem"><b>core</b></li><li class="navelem"><b>hooks</b></li><li class="navelem"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html">hooks</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classminx_1_1core_1_1hooks_1_1hooks-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">minx.core.hooks.hooks Class Reference<div class="ingroups"><a class="el" href="group__grp__minx__core__hooks.html">Hooks Infrastructure</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Mapping arbitrary key types to callable objects.  
 <a href="classminx_1_1core_1_1hooks_1_1hooks.html#details">More...</a></p>


<table class="memberdecls">

<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aa8dfbac91f9952cdda3812c8dd396fce"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#aa8dfbac91f9952cdda3812c8dd396fce">__init__</a></td></tr>
<tr class="memdesc:aa8dfbac91f9952cdda3812c8dd396fce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an empty hook map.  <a href="#aa8dfbac91f9952cdda3812c8dd396fce">More...</a><br/></td></tr>
<tr class="separator:aa8dfbac91f9952cdda3812c8dd396fce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aee2143f5fc08601ded72a564544ff824"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#aee2143f5fc08601ded72a564544ff824">add</a></td></tr>
<tr class="memdesc:aee2143f5fc08601ded72a564544ff824"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a new function for some key.  <a href="#aee2143f5fc08601ded72a564544ff824">More...</a><br/></td></tr>
<tr class="separator:aee2143f5fc08601ded72a564544ff824"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0be6448ad78e08223bc2174f8e20fc68"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a0be6448ad78e08223bc2174f8e20fc68">remove</a></td></tr>
<tr class="memdesc:a0be6448ad78e08223bc2174f8e20fc68"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove all hooks for specified name.  <a href="#a0be6448ad78e08223bc2174f8e20fc68">More...</a><br/></td></tr>
<tr class="separator:a0be6448ad78e08223bc2174f8e20fc68"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7184c493ebf93af23091df6fc8ec0bcf"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a7184c493ebf93af23091df6fc8ec0bcf">rename</a></td></tr>
<tr class="memdesc:a7184c493ebf93af23091df6fc8ec0bcf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rename the specified hook.  <a href="#a7184c493ebf93af23091df6fc8ec0bcf">More...</a><br/></td></tr>
<tr class="separator:a7184c493ebf93af23091df6fc8ec0bcf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a44254dc1c35f5f257c68d8024e1f402d"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a44254dc1c35f5f257c68d8024e1f402d">trigger</a></td></tr>
<tr class="memdesc:a44254dc1c35f5f257c68d8024e1f402d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Execute functions for a given key.  <a href="#a44254dc1c35f5f257c68d8024e1f402d">More...</a><br/></td></tr>
<tr class="separator:a44254dc1c35f5f257c68d8024e1f402d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7248db24422493912f0b0f5589f2b341"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a7248db24422493912f0b0f5589f2b341">names</a></td></tr>
<tr class="memdesc:a7248db24422493912f0b0f5589f2b341"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get names of currently defined hooks.  <a href="#a7248db24422493912f0b0f5589f2b341">More...</a><br/></td></tr>
<tr class="separator:a7248db24422493912f0b0f5589f2b341"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a35e9417f8b5a450368ee09ae7ddf1af7"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a35e9417f8b5a450368ee09ae7ddf1af7">max_priority</a></td></tr>
<tr class="memdesc:a35e9417f8b5a450368ee09ae7ddf1af7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Priority value of highest-priority hook for some key.  <a href="#a35e9417f8b5a450368ee09ae7ddf1af7">More...</a><br/></td></tr>
<tr class="separator:a35e9417f8b5a450368ee09ae7ddf1af7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa7cd4a793af1f6e84380c8838015e84c"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#aa7cd4a793af1f6e84380c8838015e84c">min_priority</a></td></tr>
<tr class="memdesc:aa7cd4a793af1f6e84380c8838015e84c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Priority value of lowest-priority hook for some key.  <a href="#aa7cd4a793af1f6e84380c8838015e84c">More...</a><br/></td></tr>
<tr class="separator:aa7cd4a793af1f6e84380c8838015e84c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c70d95929daa5101a8815b2f00bc581"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a0c70d95929daa5101a8815b2f00bc581">default_priority</a></td></tr>
<tr class="memdesc:a0c70d95929daa5101a8815b2f00bc581"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default priority for hooks.  <a href="#a0c70d95929daa5101a8815b2f00bc581">More...</a><br/></td></tr>
<tr class="separator:a0c70d95929daa5101a8815b2f00bc581"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Mapping arbitrary key types to callable objects. </p>
<p>This class maps keys (strings, ints, whatever) to prioritized lists of callables (i.e., functions or function objects). After a mapping has been setup, clients can trigger the functions for a key.</p>
<p>This class provides a general infrastructure for Minx's support for customization via hooks. Although we can use any (reasonable) type as the keys, in Minx, keys are strings that name the different hooks that Minx supports (e.g., 'manage_hook', 'x_create_notify', and so on). If you name your hooks using a non-string type, those hooks will be added to the map but simply be ignored. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aa8dfbac91f9952cdda3812c8dd396fce"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.hooks.hooks.__init__ </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>)</td><td></td>
          <td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Create an empty hook map. </p>
<dl class="section return"><dt>Returns</dt><dd>An empty hook map.</dd></dl>
<p>When a new hooks object is created, it will have no hook functions in it. Clients (i.e., other Minx classes and functions or end-user configuration code) will have to then add hook functions to the hook map.</p>
<dl class="section note"><dt>Note</dt><dd>In general, there should be no need in end-user code to create a hooks object. Rather, end-users should use the hooks attribute of the <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">main window manager object</a>. Refer to the <a href="../wiki/hooks-howto.wiki">Hooks HOWTO</a> for more on typical usage patterns for this class. </dd></dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="aee2143f5fc08601ded72a564544ff824"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.hooks.hooks.add </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Add a new function for some key. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">k</td><td>The name of the hook. </td></tr>
    <tr><td class="paramname">f</td><td>The function to be executed for k. </td></tr>
    <tr><td class="paramname">p</td><td>The function priority (must be in range [1, 100]).</td></tr>
  </table>
  </dd>
</dl>
<p>This method adds f to the (prioritized) list of functions corresponding to k. If f is already in the list for k, it will not be duplicated. Thus, you can safely call this function multiple times with the same hook without worrying about creating duplicate entries in the hook lists or needing to first check to avoid duplication. This is useful, for example, when creating window objects that add hooks for various X events; the same function will be passed for each window instance and we don't want duplicate entries of the same function in our hook map (because each hook should be called once and only once per triggering).</p>
<p>Priorities should be integers in the range [1, 100]. Higher numbers will insert f into the beginning of the list. If the priority p is not supplied, it will be assigned a default priority. Passing a non-integral value for the parameter p will also result in the priority for f being set to the default priority.</p>
<p>To add a hook at the highest priority, pass MAX_PRIORITY as the value of p. Similarly, to add a hook at the lowest priority, pass MIN_PRIORITY as the value of p. Alternatively, to add hooks at the highest or lowest priorities, you can pass values greater than hundred or less than one respectively (however, using MAX_PRIORITY and MIN_PRIORITY is probably clearer).</p>
<p>Here is a snippet of code illustrating how to add a hook for some event 'foo' so that it is the highest priority hook:</p>
<pre class="fragment">             wm.hooks.add('foo', my_foo_hook, wm.hooks.MAX_PRIORITY)</pre><p>In general, you should not care about the order in which hooks execute. That is, you should implement hook functions so that the final result is the same regardless of the order of their execution. Having said that, however, such idealism is not always feasible, and, depending on the specific situation, perhaps not even wholly desirable. Thus, if you do need to control the order in which your hooks execute, you should be aware that the order in which you add hooks can be significant, especially if you use MIN_PRIORITY and MAX_PRIORITY.</p>
<p>For example, let's say you have two hooks A and B for some key "foo" and want to execute A before B and B before every other hook for "foo." If you add the hooks in the following order:</p>
<pre class="fragment">             wm.hooks.add('foo', A, wm.hooks.MAX_PRIORITY)
             wm.hooks.add('foo', B, wm.hooks.MAX_PRIORITY)</pre><p>B will end up at a higher priority than A and will execute before A instead of the other way around. This is because, MIN_PRIORITY and MAX_PRIORITY look at the current minimum and maximum priorities and are not absolute values. To achieve the effect described above, you should first add B and then A. Alternatively, you could also do the following:</p>
<pre class="fragment">             wm.hooks.add('foo', A, wm.hooks.MAX_PRIORITY)
             wm.hooks.add('foo', B, wm.hooks.max_priority('foo'))</pre><p>The above code will first add A at the current highest priority for "foo" and then add B at the same priority as A.</p>
<dl class="section note"><dt>Note</dt><dd>As mentioned earlier, although you can use any (reasonable) type for the hook map's keys, in Minx, we use strings as the keys. That is, pass a string as the first parameter k. </dd></dl>

</div>
</div>
<a class="anchor" id="a0c70d95929daa5101a8815b2f00bc581"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.hooks.hooks.default_priority </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>)</td><td></td>
          <td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Default priority for hooks. </p>
<dl class="section return"><dt>Returns</dt><dd>Integer specifying default hook priority.</dd></dl>
<p>To allow end-users greater control over the execution order of hook functions, the <a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html" title="Mapping arbitrary key types to callable objects. ">minx.core.hooks.hooks</a> class arranges hook functions according to priorities, which must be integers in the range [1, 100]. Higher priority hooks are executed before lower priority ones.</p>
<p>If end-users don't specify the priority for a hook, it will be assigned the default priority, which is the value returned by this function.</p>
<dl class="section note"><dt>Note</dt><dd>Since hook priorities must lie in [1, 100], we use 50 as the default priority as this will allow end-users to add their hooks both above and below the default level. </dd></dl>

</div>
</div>
<a class="anchor" id="a35e9417f8b5a450368ee09ae7ddf1af7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.hooks.hooks.max_priority </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Priority value of highest-priority hook for some key. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">k</td><td>The name of the hook. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Priority (integer) of highest-priority hook corresponding to k.</dd></dl>
<p>This function is intended to allow end-users to determine the priority of the current highest-priority hook function corresponding to k so that they can insert higher priority functions. Here is a somewhat contrived snippet of code illustrating typical usage:</p>
<pre class="fragment">             #!/usr/bin/env python
 
             import minx
 
             def my_manage_hook(w):
                 prop = w.properties()
                 if prop['class'].lower() == 'gkrellm':
                    return False
................................................................................
             if m &lt; 0: # no manage_hook installed
                m = wm.hooks.default_priority() + 1
             else: # some module installed a manage_hook
                m = m + 1
             wm.hooks.add('manage_hook', my_manage_hook, m)
 
             # Okay, let's run the window manager...
             wm.start()</pre><p>The above example is contrived because if that is all your Minx start-up file contained, there would be no manage_hook installed and, so, no need to check to ensure that my_manage_hook() would execute first. Furthermore, usually, only a single manage_hook would be needed; there's no point to having multiple manage hooks.</p>
<p>Moreover, to add a hook at the highest priority, you can simply pass MAX_PRIORITY to the call to <a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#aee2143f5fc08601ded72a564544ff824" title="Add a new function for some key. ">hooks.add()</a> instead of going about it yourself. For example, to add the highest priority hook for some event 'foo', you could just call the <a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#aee2143f5fc08601ded72a564544ff824" title="Add a new function for some key. ">hooks.add()</a> method as shown below:</p>
<pre class="fragment">             wm.hooks.add('foo', my_foo_hook, wm.hooks.MAX_PRIORITY)</pre><p>Nonetheless, the example serves to illustrate how and why you might want to use the <a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a35e9417f8b5a450368ee09ae7ddf1af7" title="Priority value of highest-priority hook for some key. ">hooks.max_priority()</a> function.</p>
<p>Note that if the hook map does not contain any hooks for the key k, this function will return a negative number.</p>
<dl class="section note"><dt>Note</dt><dd>As mentioned earlier, although you can use any (reasonable) type for the hook map's keys, in Minx, we use strings as the keys. That is, pass a string for the parameter k. </dd></dl>

</div>
</div>
<a class="anchor" id="aa7cd4a793af1f6e84380c8838015e84c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.hooks.hooks.min_priority </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Priority value of lowest-priority hook for some key. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">k</td><td>The name of the hook. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Priority (integer) of lowest-priority hook corresponding to k.</dd></dl>
<p>This function is intended to allow end-users to determine the priority of the current lowest-priority hook function corresponding to k so that they can insert lower priority functions.</p>
<p>Here is a somewhat contrived snippet of code illustrating typical usage:</p>
<pre class="fragment">             #!/usr/bin/env python
 
             import minx
 
             def my_manage_hook(w):
                 prop = w.properties()
                 if prop['class'].lower() == 'gkrellm':
                    return False
................................................................................
             if m &lt; 0: # no manage_hook installed
                m = wm.hooks.default_priority() - 1
             else: # some module installed a manage_hook
                m = m - 1
             wm.hooks.add('manage_hook', my_manage_hook, m)
 
             # Okay, let's run the window manager...
             wm.start()</pre><p>The above example is contrived because if that is all your Minx start-up file contained, there would be no manage_hook installed and, so, no need to check to ensure that my_manage_hook() would execute last. Furthermore, usually, only a single manage_hook would be needed; there's no point to having multiple manage hooks.</p>
<p>Moreover, to add a hook at the lowest priority, you can simply pass MIN_PRIORITY to the call to <a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#aee2143f5fc08601ded72a564544ff824" title="Add a new function for some key. ">hooks.add()</a> instead of going about it yourself. For example, to add the lowest priority hook for some event 'foo', you could just call the <a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#aee2143f5fc08601ded72a564544ff824" title="Add a new function for some key. ">hooks.add()</a> method as shown below:</p>
<pre class="fragment">             wm.hooks.add('foo', my_foo_hook, wm.hooks.MIN_PRIORITY)</pre><p>Nonetheless, the example serves to illustrate how and why you might want to use the <a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#aa7cd4a793af1f6e84380c8838015e84c" title="Priority value of lowest-priority hook for some key. ">hooks.min_priority()</a> function.</p>
<p>If the hook map does not contain any hooks for the key k, this function will return a negative number.</p>
<dl class="section note"><dt>Note</dt><dd>Typically, you would want your hooks to execute before currently installed hooks. Thus, this function is much less useful than <a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a35e9417f8b5a450368ee09ae7ddf1af7" title="Priority value of highest-priority hook for some key. ">hooks.max_priority()</a>, but is provided for the sake of completeness and just in case someone or some situation finds it necessary. </dd></dl>

</div>
</div>
<a class="anchor" id="a7248db24422493912f0b0f5589f2b341"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.hooks.hooks.names </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>)</td><td></td>
          <td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Get names of currently defined hooks. </p>
<dl class="section return"><dt>Returns</dt><dd>List of strings containing names of currently defined hooks.</dd></dl>
<p>This function returns the names of all the currently defined hooks. Callers should not rely on the returned names being in any particular order.</p>
<dl class="section note"><dt>Note</dt><dd>Although Minx uses strings for the keys in its hook map, if end-users add hooks using keys of other types, the returned list will contain those types as well. That is, Minx makes no effort to enforce using strings as hook names. If you do, that's fine; however, those particular hooks will not be triggered (so don't waste your time and your computer's resources). </dd></dl>

</div>
</div>
<a class="anchor" id="a0be6448ad78e08223bc2174f8e20fc68"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.hooks.hooks.remove </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Remove all hooks for specified name. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">k</td><td>Name of hook that is to be removed.</td></tr>
  </table>
  </dd>
</dl>
<p>This function will remove all the hooks corresponding to the name k.</p>
<p>Please understand that this is a fairly dangerous function! It is intended to be used in conjunction with hooks for key bindings. Specifically, you can use it to remove the default key bindings. Using it to remove other hooks will almost certainly lead to trouble.</p>
<dl class="section note"><dt>Note</dt><dd>As mentioned earlier, although you can use any (reasonable) type for the hook map's keys, in Minx, we use strings as the keys. That is, pass a string for the parameter k. </dd></dl>

</div>
</div>
<a class="anchor" id="a7184c493ebf93af23091df6fc8ec0bcf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.hooks.hooks.rename </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Rename the specified hook. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">k</td><td>Current name of hook to be renamed. </td></tr>
    <tr><td class="paramname">n</td><td>New hook name.</td></tr>
  </table>
  </dd>
</dl>
<p>This function will assign the name n to the hooks currently identified by k. If the hook map does not contain any hooks corresponding to k, the function will do nothing. However, if there are already hooks assigned to n and to k, the older hooks for n will be replaced by the ones for k.</p>
<p>Needless to say, this is a fairly dangerous function! Use it only to rename the default key bindings. Renaming other hooks is a Very Bad Idea (TM).</p>
<dl class="section note"><dt>Note</dt><dd>Both k and n should be strings. Although you can use any (reasonable) type as keys for the hook map, Minx convention is to use strings. Other key types will result in "ghost" hooks, i.e., hook functions that are never triggered. </dd></dl>

</div>
</div>
<a class="anchor" id="a44254dc1c35f5f257c68d8024e1f402d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.hooks.hooks.trigger </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Execute functions for a given key. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">k</td><td>The name of the hook whose functions we want to call. </td></tr>
    <tr><td class="paramname">p</td><td>Parameters to be passed to the hook functions. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>List of hook return values.</dd></dl>
<p>This method triggers all the functions corresponding to k, calling them in order of descending priorities. Functions that have the same priority will be executed in the order in which they were added to the hook map.</p>
<p>Each function will be passed the parameters in the positional args tuple p. Thus, hook functions can take an arbitrary number of arguments. Furthermore, these hook function parameters can be of any type; this method doesn't care and simply passes them through to the hooks as-is.</p>
<p>This function collects the return values of all the hook functions for key k in a list. Callers of this function can use the return values in whatever way they please. For example, depending on the specific hook, you may:</p>
<ul>
<li>Simply ignore the hook return values. </li>
<li>Use only the first return value, i.e., the value returned by the highest-priority hook. </li>
<li>Use the last return value (i.e., last hook executed). </li>
<li>Use all the return values.</li>
</ul>
<p>If a hook wants or needs to cut short the execution of the remaining hooks in its chain, it can raise a <a class="el" href="classminx_1_1core_1_1hooks_1_1short__circuit.html" title="An exception for cutting short the execution of a chain of hooks. ">short_circuit</a> exception. If the hook also wants to return a value along with cutting short its hook chain, it will have to pass the return value via the <a class="el" href="classminx_1_1core_1_1hooks_1_1short__circuit.html" title="An exception for cutting short the execution of a chain of hooks. ">short_circuit</a> exception.</p>
<p>The <a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a44254dc1c35f5f257c68d8024e1f402d" title="Execute functions for a given key. ">hooks.trigger()</a> function will stop executing the hooks for key k when it sees a <a class="el" href="classminx_1_1core_1_1hooks_1_1short__circuit.html" title="An exception for cutting short the execution of a chain of hooks. ">short_circuit</a> exception.</p>
<dl class="section note"><dt>Note</dt><dd>As mentioned earlier, although you can use any (reasonable) type for the hook map's keys, in Minx, we use strings as the keys. That is, pass a string as the first parameter k. </dd></dl>

</div>
</div>
</div><!-- contents -->
</body>
</html>

Changes to api/classminx_1_1core_1_1hooks_1_1priority__queue-members.html.

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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: Member List</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>
     
   </div>
   
   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>
   
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>minx</b>      </li>
      <li class="navelem"><b>core</b>      </li>
      <li class="navelem"><b>hooks</b>      </li>
      <li class="navelem"><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html">priority_queue</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">minx.core.hooks.priority_queue Member List</div>  </div>
</div><!--header-->
<div class="contents">

This is the complete list of members for <a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html">minx.core.hooks.priority_queue</a>, including all inherited members.<table>

  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html#a2e99949efd6e99d871f7eaec308ec14b">__init__</a></td><td><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html">minx.core.hooks.priority_queue</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html#a96ab98d430c0da4af56ffd7de39b191d">__iter__</a></td><td><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html">minx.core.hooks.priority_queue</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html#a7a0851d80c5cf6a56bea2bb1d48a2102">add</a></td><td><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html">minx.core.hooks.priority_queue</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html#a1cf29a7fdf61452acf83f27e36f12f09">max_priority</a></td><td><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html">minx.core.hooks.priority_queue</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html#a4572827f4d46408f7c03be8bdfd7cb18">min_priority</a></td><td><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html">minx.core.hooks.priority_queue</a></td><td></td></tr>
</table></div><!-- contents -->
</body>
</html>






<


<
<
<



<
<




<
<



<

<



<

<
<
<
<
<




<
|
|
|
<
<
<
|
<
|
|





>
|
>
|
|
|
|
|



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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: Member List</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">


  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>

   </div>

   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>

  </td>





 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.4 -->
<div id="nav-path" class="navpath">
  <ul>



<li class="navelem"><b>minx</b></li><li class="navelem"><b>core</b></li><li class="navelem"><b>hooks</b></li><li class="navelem"><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html">priority_queue</a></li>  </ul>

</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">minx.core.hooks.priority_queue Member List</div>  </div>
</div><!--header-->
<div class="contents">

<p>This is the complete list of members for <a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html">minx.core.hooks.priority_queue</a>, including all inherited members.</p>
<table class="directory">
  <tr class="even"><td class="entry"><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html#a2e99949efd6e99d871f7eaec308ec14b">__init__</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html">minx.core.hooks.priority_queue</a></td><td class="entry"></td></tr>
  <tr><td class="entry"><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html#a96ab98d430c0da4af56ffd7de39b191d">__iter__</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html">minx.core.hooks.priority_queue</a></td><td class="entry"></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html#a7a0851d80c5cf6a56bea2bb1d48a2102">add</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html">minx.core.hooks.priority_queue</a></td><td class="entry"></td></tr>
  <tr><td class="entry"><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html#a1cf29a7fdf61452acf83f27e36f12f09">max_priority</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html">minx.core.hooks.priority_queue</a></td><td class="entry"></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html#a4572827f4d46408f7c03be8bdfd7cb18">min_priority</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html">minx.core.hooks.priority_queue</a></td><td class="entry"></td></tr>
</table></div><!-- contents -->
</body>
</html>

Changes to api/classminx_1_1core_1_1hooks_1_1priority__queue.html.

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
...
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151






































152
153
154
155
156
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: minx.core.hooks.priority_queue Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>
     
   </div>
   
   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>
   
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>minx</b>      </li>
      <li class="navelem"><b>core</b>      </li>
      <li class="navelem"><b>hooks</b>      </li>
      <li class="navelem"><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html">priority_queue</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>

  <div class="headertitle">
<div class="title">minx.core.hooks.priority_queue Class Reference<div class="ingroups"><a class="el" href="group__grp__minx__core__hooks.html">Hooks Infrastructure</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>A helper class for Minx's hooks implementation.  
 <a href="classminx_1_1core_1_1hooks_1_1priority__queue.html#details">More...</a></p>

<p><a href="classminx_1_1core_1_1hooks_1_1priority__queue-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>

Public Member Functions</h2></td></tr>
<tr class="memitem:a2e99949efd6e99d871f7eaec308ec14b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2e99949efd6e99d871f7eaec308ec14b"></a>
def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html#a2e99949efd6e99d871f7eaec308ec14b">__init__</a></td></tr>
<tr class="memdesc:a2e99949efd6e99d871f7eaec308ec14b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an empty priority queue. <br/></td></tr>

<tr class="memitem:a7a0851d80c5cf6a56bea2bb1d48a2102"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html#a7a0851d80c5cf6a56bea2bb1d48a2102">add</a></td></tr>
<tr class="memdesc:a7a0851d80c5cf6a56bea2bb1d48a2102"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add an element with specified priority.  <a href="#a7a0851d80c5cf6a56bea2bb1d48a2102"></a><br/></td></tr>
<tr class="memitem:a1cf29a7fdf61452acf83f27e36f12f09"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1cf29a7fdf61452acf83f27e36f12f09"></a>

def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html#a1cf29a7fdf61452acf83f27e36f12f09">max_priority</a></td></tr>
<tr class="memdesc:a1cf29a7fdf61452acf83f27e36f12f09"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return priority of highest-priority item in priority queue. <br/></td></tr>
<tr class="memitem:a4572827f4d46408f7c03be8bdfd7cb18"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4572827f4d46408f7c03be8bdfd7cb18"></a>

def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html#a4572827f4d46408f7c03be8bdfd7cb18">min_priority</a></td></tr>
<tr class="memdesc:a4572827f4d46408f7c03be8bdfd7cb18"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return priority of lowest-priority item in priority queue. <br/></td></tr>

<tr class="memitem:a96ab98d430c0da4af56ffd7de39b191d"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html#a96ab98d430c0da4af56ffd7de39b191d">__iter__</a></td></tr>
<tr class="memdesc:a96ab98d430c0da4af56ffd7de39b191d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Iterator interface to priority queue.  <a href="#a96ab98d430c0da4af56ffd7de39b191d"></a><br/></td></tr>

</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>A helper class for Minx's hooks implementation. </p>
<p>This class implements a priority queue that the hooks class can use to prioritize its hook function lists.</p>
<dl class="section note"><dt>Note:</dt><dd>This class is not a general-purpose priority queue implementation. It is specifically designed for use by the <a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html" title="Mapping arbitrary key types to callable objects.">minx.core.hooks.hooks</a> class. It is also not meant to be used by end-users, who should treat it as internal to Minx. </dd></dl>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a96ab98d430c0da4af56ffd7de39b191d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html#a96ab98d430c0da4af56ffd7de39b191d">minx.core.hooks.priority_queue.__iter__</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Iterator interface to priority queue. </p>
<p>This function returns an iterator for accessing the priority queue's elements in order of descending priority. </p>

</div>
</div>
<a class="anchor" id="a7a0851d80c5cf6a56bea2bb1d48a2102"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html#a7a0851d80c5cf6a56bea2bb1d48a2102">minx.core.hooks.priority_queue.add</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Add an element with specified priority. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">v</td><td>The value to be added to the priority queue. </td></tr>
    <tr><td class="paramname">p</td><td>The priority of the value to be added. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>False if priority queue already contains v; True otherwise.</dd></dl>
<p>This function adds v with priority p to the priority queue. This function does not perform any checks on the value of p, requiring its caller to implement appropriate policies regarding priorities.</p>
<p>If the priority queue already contains v, it will not be added again. Thus, clients can make repeated calls to this function with the same value without having to worry about creating duplicate entries. </p>







































</div>
</div>
</div><!-- contents -->
</body>
</html>






<


<
<
<



<
<




<
<



<

<



<

<
<
<
<
<




<
|
|
|
<
<
<
|
<
|
|


|
>







<
<

<
>




>

|
<
>
|
|
<
>
|
|
>

|
>

|


|
|





|


|



<
|











|







 







<
|


|






|



>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>





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
...
110
111
112
113
114
115
116

117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: minx.core.hooks.priority_queue Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">


  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>

   </div>

   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>

  </td>





 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.4 -->
<div id="nav-path" class="navpath">
  <ul>



<li class="navelem"><b>minx</b></li><li class="navelem"><b>core</b></li><li class="navelem"><b>hooks</b></li><li class="navelem"><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html">priority_queue</a></li>  </ul>

</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classminx_1_1core_1_1hooks_1_1priority__queue-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">minx.core.hooks.priority_queue Class Reference<div class="ingroups"><a class="el" href="group__grp__minx__core__hooks.html">Hooks Infrastructure</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>A helper class for Minx's hooks implementation.  
 <a href="classminx_1_1core_1_1hooks_1_1priority__queue.html#details">More...</a></p>


<table class="memberdecls">

<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a2e99949efd6e99d871f7eaec308ec14b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2e99949efd6e99d871f7eaec308ec14b"></a>
def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html#a2e99949efd6e99d871f7eaec308ec14b">__init__</a></td></tr>
<tr class="memdesc:a2e99949efd6e99d871f7eaec308ec14b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an empty priority queue. <br/></td></tr>
<tr class="separator:a2e99949efd6e99d871f7eaec308ec14b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a0851d80c5cf6a56bea2bb1d48a2102"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html#a7a0851d80c5cf6a56bea2bb1d48a2102">add</a></td></tr>
<tr class="memdesc:a7a0851d80c5cf6a56bea2bb1d48a2102"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add an element with specified priority.  <a href="#a7a0851d80c5cf6a56bea2bb1d48a2102">More...</a><br/></td></tr>

<tr class="separator:a7a0851d80c5cf6a56bea2bb1d48a2102"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1cf29a7fdf61452acf83f27e36f12f09"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html#a1cf29a7fdf61452acf83f27e36f12f09">max_priority</a></td></tr>
<tr class="memdesc:a1cf29a7fdf61452acf83f27e36f12f09"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return priority of highest-priority item in priority queue.  <a href="#a1cf29a7fdf61452acf83f27e36f12f09">More...</a><br/></td></tr>

<tr class="separator:a1cf29a7fdf61452acf83f27e36f12f09"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4572827f4d46408f7c03be8bdfd7cb18"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html#a4572827f4d46408f7c03be8bdfd7cb18">min_priority</a></td></tr>
<tr class="memdesc:a4572827f4d46408f7c03be8bdfd7cb18"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return priority of lowest-priority item in priority queue.  <a href="#a4572827f4d46408f7c03be8bdfd7cb18">More...</a><br/></td></tr>
<tr class="separator:a4572827f4d46408f7c03be8bdfd7cb18"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96ab98d430c0da4af56ffd7de39b191d"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1hooks_1_1priority__queue.html#a96ab98d430c0da4af56ffd7de39b191d">__iter__</a></td></tr>
<tr class="memdesc:a96ab98d430c0da4af56ffd7de39b191d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Iterator interface to priority queue.  <a href="#a96ab98d430c0da4af56ffd7de39b191d">More...</a><br/></td></tr>
<tr class="separator:a96ab98d430c0da4af56ffd7de39b191d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A helper class for Minx's hooks implementation. </p>
<p>This class implements a priority queue that the hooks class can use to prioritize its hook function lists.</p>
<dl class="section note"><dt>Note</dt><dd>This class is not a general-purpose priority queue implementation. It is specifically designed for use by the <a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html" title="Mapping arbitrary key types to callable objects. ">minx.core.hooks.hooks</a> class. It is also not meant to be used by end-users, who should treat it as internal to Minx. </dd></dl>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a96ab98d430c0da4af56ffd7de39b191d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.hooks.priority_queue.__iter__ </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>)</td><td></td>
          <td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Iterator interface to priority queue. </p>
<p>This function returns an iterator for accessing the priority queue's elements in order of descending priority. </p>

</div>
</div>
<a class="anchor" id="a7a0851d80c5cf6a56bea2bb1d48a2102"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.hooks.priority_queue.add </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Add an element with specified priority. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">v</td><td>The value to be added to the priority queue. </td></tr>
    <tr><td class="paramname">p</td><td>The priority of the value to be added. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>False if priority queue already contains v; True otherwise.</dd></dl>
<p>This function adds v with priority p to the priority queue. This function does not perform any checks on the value of p, requiring its caller to implement appropriate policies regarding priorities.</p>
<p>If the priority queue already contains v, it will not be added again. Thus, clients can make repeated calls to this function with the same value without having to worry about creating duplicate entries. </p>

</div>
</div>
<a class="anchor" id="a1cf29a7fdf61452acf83f27e36f12f09"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.hooks.priority_queue.max_priority </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return priority of highest-priority item in priority queue. </p>
<p>If the priority queue is empty, this function will return -1. </p>

</div>
</div>
<a class="anchor" id="a4572827f4d46408f7c03be8bdfd7cb18"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.hooks.priority_queue.min_priority </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return priority of lowest-priority item in priority queue. </p>
<p>If the priority queue is empty, this function will return -1. </p>

</div>
</div>
</div><!-- contents -->
</body>
</html>

Changes to api/classminx_1_1core_1_1hooks_1_1short__circuit-members.html.

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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: Member List</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>
     
   </div>
   
   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>
   
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>minx</b>      </li>
      <li class="navelem"><b>core</b>      </li>
      <li class="navelem"><b>hooks</b>      </li>
      <li class="navelem"><a class="el" href="classminx_1_1core_1_1hooks_1_1short__circuit.html">short_circuit</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">minx.core.hooks.short_circuit Member List</div>  </div>
</div><!--header-->
<div class="contents">

This is the complete list of members for <a class="el" href="classminx_1_1core_1_1hooks_1_1short__circuit.html">minx.core.hooks.short_circuit</a>, including all inherited members.<table>

  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1hooks_1_1short__circuit.html#a7d39db9ce379cccd73951c4f19c49b6a">__init__</a></td><td><a class="el" href="classminx_1_1core_1_1hooks_1_1short__circuit.html">minx.core.hooks.short_circuit</a></td><td></td></tr>
</table></div><!-- contents -->
</body>
</html>






<


<
<
<



<
<




<
<



<

<



<

<
<
<
<
<




<
|
|
|
<
<
<
|
<
|
|





>
|
>
|



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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: Member List</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">


  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>

   </div>

   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>

  </td>





 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.4 -->
<div id="nav-path" class="navpath">
  <ul>



<li class="navelem"><b>minx</b></li><li class="navelem"><b>core</b></li><li class="navelem"><b>hooks</b></li><li class="navelem"><a class="el" href="classminx_1_1core_1_1hooks_1_1short__circuit.html">short_circuit</a></li>  </ul>

</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">minx.core.hooks.short_circuit Member List</div>  </div>
</div><!--header-->
<div class="contents">

<p>This is the complete list of members for <a class="el" href="classminx_1_1core_1_1hooks_1_1short__circuit.html">minx.core.hooks.short_circuit</a>, including all inherited members.</p>
<table class="directory">
  <tr class="even"><td class="entry"><a class="el" href="classminx_1_1core_1_1hooks_1_1short__circuit.html#a7d39db9ce379cccd73951c4f19c49b6a">__init__</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1hooks_1_1short__circuit.html">minx.core.hooks.short_circuit</a></td><td class="entry"></td></tr>
</table></div><!-- contents -->
</body>
</html>

Changes to api/classminx_1_1core_1_1hooks_1_1short__circuit.html.

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
..
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
133
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: minx.core.hooks.short_circuit Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>
     
   </div>
   
   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>
   
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>minx</b>      </li>
      <li class="navelem"><b>core</b>      </li>
      <li class="navelem"><b>hooks</b>      </li>
      <li class="navelem"><a class="el" href="classminx_1_1core_1_1hooks_1_1short__circuit.html">short_circuit</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>

  <div class="headertitle">
<div class="title">minx.core.hooks.short_circuit Class Reference<div class="ingroups"><a class="el" href="group__grp__minx__core__hooks.html">Hooks Infrastructure</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>An exception for cutting short the execution of a chain of hooks.  
 <a href="classminx_1_1core_1_1hooks_1_1short__circuit.html#details">More...</a></p>

<p><a href="classminx_1_1core_1_1hooks_1_1short__circuit-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>

Public Member Functions</h2></td></tr>
<tr class="memitem:a7d39db9ce379cccd73951c4f19c49b6a"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1hooks_1_1short__circuit.html#a7d39db9ce379cccd73951c4f19c49b6a">__init__</a></td></tr>
<tr class="memdesc:a7d39db9ce379cccd73951c4f19c49b6a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a <a class="el" href="classminx_1_1core_1_1hooks_1_1short__circuit.html" title="An exception for cutting short the execution of a chain of hooks.">short_circuit</a> exception with the specified return value.  <a href="#a7d39db9ce379cccd73951c4f19c49b6a"></a><br/></td></tr>

</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>An exception for cutting short the execution of a chain of hooks. </p>
<p>This class allows an end-user hook function to have Minx stop excecuting the remaining hooks in its chain of hooks.</p>
<dl class="section note"><dt>Note:</dt><dd>In addition to being a customization mechanism available to end-users, Minx also uses hooks internally for various purposes. All hooks, internal and external, are stored in a single hook map maintained by the <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">main window manager object</a>. This design allows for a very powerful way of customizing the window manager because it gives you access to even the low-level X event processing...</dd></dl>
<dl class="section user"><dt></b></dt><dd>However, with great power comes great responsibilty! In general, it would be unwise to short-circuit Minx's internal hooks. That is, <em>just because you can, doesn't mean you should</em>. As a rule of thumb, use short-circuting only when you're absolutely sure it won't have an adverse effect.</dd></dl>
<dl class="section user"><dt></b></dt><dd>For example, the <code>manage_hook</code> is expected to return True or False depending on whether it wants a particular window managed or not. While it would be unusual to have more than one <code>manage_hook</code> (because one hook can perform multiple checks on window properties for all window types), if you do have more than one <code>manage_hook</code>, the one that returns a False can short-circuit the rest because Minx will only manage a window if all the manage hooks return True. Thus, if even one returns False, there's no point executing the remaining hooks; that one can simply short-circuit the rest of the <code>manage_hook</code> chain. </dd></dl>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a7d39db9ce379cccd73951c4f19c49b6a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1hooks_1_1short__circuit.html#a7d39db9ce379cccd73951c4f19c49b6a">minx.core.hooks.short_circuit.__init__</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Create a <a class="el" href="classminx_1_1core_1_1hooks_1_1short__circuit.html" title="An exception for cutting short the execution of a chain of hooks.">short_circuit</a> exception with the specified return value. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">ret</td><td>The hook's return value (default = None).</td></tr>
  </table>
  </dd>
</dl>
<p>If a function raises an exception, it cannot also communicate a return value to its caller using the usual function return mechanism. Instead, we allow the short-circuiting hook to stuff its return value into the <a class="el" href="classminx_1_1core_1_1hooks_1_1short__circuit.html" title="An exception for cutting short the execution of a chain of hooks.">short_circuit</a> exception. The <a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a44254dc1c35f5f257c68d8024e1f402d" title="Execute functions for a given key.">hooks.trigger()</a> function will extract the return value from its <a class="el" href="classminx_1_1core_1_1hooks_1_1short__circuit.html" title="An exception for cutting short the execution of a chain of hooks.">short_circuit</a> exception handler and also stop executing the remaining hooks in the short-circuiting hook's chain.</p>
<p>Here is an example of an end-user hook short-circuiting its chain of hooks and returning a value:</p>
<div class="fragment"><pre class="fragment">             #!/usr/bin/env python
 
             import minx
             from minx.core.hooks import short_circuit
 
             def my_manage_hook(w):
                 prop = w.properties()
                 if prop['class'].lower() == 'gkrellm':
                    raise short_circuit(False)
                 return True
 
             wm = minx.core.wm()
             wm.hooks.add('manage_hook', my_manage_hook)
             wm.start()</pre></div><dl class="section note"><dt>Note:</dt><dd>The return value can be anything the hook function wants to return. The exception and hooks classes don't care about it; they simply pass it back to the Minx function that triggered the hooks. </dd></dl>

</div>
</div>
</div><!-- contents -->
</body>
</html>






<


<
<
<



<
<




<
<



<

<



<

<
<
<
<
<




<
|
|
|
<
<
<
|
<
|
|


|
>







<
<

<
>


|
>

|


|
|
|
|





|







 







<
|

|
|





|

|












|






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
..
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: minx.core.hooks.short_circuit Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">


  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>

   </div>

   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>

  </td>





 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.4 -->
<div id="nav-path" class="navpath">
  <ul>



<li class="navelem"><b>minx</b></li><li class="navelem"><b>core</b></li><li class="navelem"><b>hooks</b></li><li class="navelem"><a class="el" href="classminx_1_1core_1_1hooks_1_1short__circuit.html">short_circuit</a></li>  </ul>

</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classminx_1_1core_1_1hooks_1_1short__circuit-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">minx.core.hooks.short_circuit Class Reference<div class="ingroups"><a class="el" href="group__grp__minx__core__hooks.html">Hooks Infrastructure</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>An exception for cutting short the execution of a chain of hooks.  
 <a href="classminx_1_1core_1_1hooks_1_1short__circuit.html#details">More...</a></p>


<table class="memberdecls">

<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a7d39db9ce379cccd73951c4f19c49b6a"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1hooks_1_1short__circuit.html#a7d39db9ce379cccd73951c4f19c49b6a">__init__</a></td></tr>
<tr class="memdesc:a7d39db9ce379cccd73951c4f19c49b6a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a <a class="el" href="classminx_1_1core_1_1hooks_1_1short__circuit.html" title="An exception for cutting short the execution of a chain of hooks. ">short_circuit</a> exception with the specified return value.  <a href="#a7d39db9ce379cccd73951c4f19c49b6a">More...</a><br/></td></tr>
<tr class="separator:a7d39db9ce379cccd73951c4f19c49b6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>An exception for cutting short the execution of a chain of hooks. </p>
<p>This class allows an end-user hook function to have Minx stop excecuting the remaining hooks in its chain of hooks.</p>
<dl class="section note"><dt>Note</dt><dd>In addition to being a customization mechanism available to end-users, Minx also uses hooks internally for various purposes. All hooks, internal and external, are stored in a single hook map maintained by the <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">main window manager object</a>. This design allows for a very powerful way of customizing the window manager because it gives you access to even the low-level X event processing...</dd></dl>
<dl class="section user"><dt></dt><dd>However, with great power comes great responsibilty! In general, it would be unwise to short-circuit Minx's internal hooks. That is, <em>just because you can, doesn't mean you should</em>. As a rule of thumb, use short-circuting only when you're absolutely sure it won't have an adverse effect.</dd></dl>
<dl class="section user"><dt></dt><dd>For example, the <code>manage_hook</code> is expected to return True or False depending on whether it wants a particular window managed or not. While it would be unusual to have more than one <code>manage_hook</code> (because one hook can perform multiple checks on window properties for all window types), if you do have more than one <code>manage_hook</code>, the one that returns a False can short-circuit the rest because Minx will only manage a window if all the manage hooks return True. Thus, if even one returns False, there's no point executing the remaining hooks; that one can simply short-circuit the rest of the <code>manage_hook</code> chain. </dd></dl>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a7d39db9ce379cccd73951c4f19c49b6a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.hooks.short_circuit.__init__ </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Create a <a class="el" href="classminx_1_1core_1_1hooks_1_1short__circuit.html" title="An exception for cutting short the execution of a chain of hooks. ">short_circuit</a> exception with the specified return value. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ret</td><td>The hook's return value (default = None).</td></tr>
  </table>
  </dd>
</dl>
<p>If a function raises an exception, it cannot also communicate a return value to its caller using the usual function return mechanism. Instead, we allow the short-circuiting hook to stuff its return value into the <a class="el" href="classminx_1_1core_1_1hooks_1_1short__circuit.html" title="An exception for cutting short the execution of a chain of hooks. ">short_circuit</a> exception. The <a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html#a44254dc1c35f5f257c68d8024e1f402d" title="Execute functions for a given key. ">hooks.trigger()</a> function will extract the return value from its <a class="el" href="classminx_1_1core_1_1hooks_1_1short__circuit.html" title="An exception for cutting short the execution of a chain of hooks. ">short_circuit</a> exception handler and also stop executing the remaining hooks in the short-circuiting hook's chain.</p>
<p>Here is an example of an end-user hook short-circuiting its chain of hooks and returning a value:</p>
<pre class="fragment">             #!/usr/bin/env python
 
             import minx
             from minx.core.hooks import short_circuit
 
             def my_manage_hook(w):
                 prop = w.properties()
                 if prop['class'].lower() == 'gkrellm':
                    raise short_circuit(False)
                 return True
 
             wm = minx.core.wm()
             wm.hooks.add('manage_hook', my_manage_hook)
             wm.start()</pre><dl class="section note"><dt>Note</dt><dd>The return value can be anything the hook function wants to return. The exception and hooks classes don't care about it; they simply pass it back to the Minx function that triggered the hooks. </dd></dl>

</div>
</div>
</div><!-- contents -->
</body>
</html>

Changes to api/classminx_1_1core_1_1wm_1_1wm-members.html.

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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: Member List</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>
     
   </div>
   
   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>
   
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>minx</b>      </li>
      <li class="navelem"><b>core</b>      </li>
      <li class="navelem"><b>wm</b>      </li>
      <li class="navelem"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">wm</a>      </li>
    </ul>

  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">minx.core.wm.wm Member List</div>  </div>
</div><!--header-->
<div class="contents">

This is the complete list of members for <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm.wm</a>, including all inherited members.<table>

  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a5b9849924e9b3c79f85fe6692b4f090d">__init__</a></td><td><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm.wm</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a231e2c2649ba535cd8e1d9ee63c68877">add_to_focus_list</a></td><td><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm.wm</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aa7bb3b39fc857a69018ae557a6eebf2d">configure_x</a></td><td><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm.wm</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a6089c7316bc45c665c05ae2795c56996">connect_x</a></td><td><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm.wm</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#ae3db27611edca228340055445802872e">event_loop</a></td><td><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm.wm</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a7d2a16b2c0677dd444c5ad544df88dce">focus_next</a></td><td><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm.wm</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a655ca8ced7f1ae946a763d36509cb2fc">focus_prev</a></td><td><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm.wm</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aa135b308c00953677da47e6406195349">kill</a></td><td><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm.wm</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a0f0fc5aba6b2d1cb9e7d7d26734db2ce">manage</a></td><td><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm.wm</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a625060054eff4ec46b7bf59c8b81f648">manage_existing</a></td><td><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm.wm</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aa44262717bcd97a14c4934b76f7b6033">nuke</a></td><td><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm.wm</a></td><td></td></tr>

  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a083cf0ffb160167457fc29d838b907f1">spawn</a></td><td><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm.wm</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aafe86ca729c1c4e016a62c9e827c3462">start</a></td><td><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm.wm</a></td><td></td></tr>
</table></div><!-- contents -->
</body>
</html>






<


<
<
<



<
<




<
<



<

<



<

<
<
<
<
<




<
|
|
|
<
<
<
<
<
>
|
|





>
|
>
|
|
|
|
|
|
|
|
|
|
|
>
|
|



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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: Member List</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">


  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>

   </div>

   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>

  </td>





 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.4 -->
<div id="nav-path" class="navpath">
  <ul>





<li class="navelem"><b>minx</b></li><li class="navelem"><b>core</b></li><li class="navelem"><a class="el" href="namespaceminx_1_1core_1_1wm.html">wm</a></li><li class="navelem"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">wm</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">minx.core.wm.wm Member List</div>  </div>
</div><!--header-->
<div class="contents">

<p>This is the complete list of members for <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm.wm</a>, including all inherited members.</p>
<table class="directory">
  <tr class="even"><td class="entry"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a5b9849924e9b3c79f85fe6692b4f090d">__init__</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm.wm</a></td><td class="entry"></td></tr>
  <tr><td class="entry"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a231e2c2649ba535cd8e1d9ee63c68877">add_to_focus_list</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm.wm</a></td><td class="entry"></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aa7bb3b39fc857a69018ae557a6eebf2d">configure_x</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm.wm</a></td><td class="entry"></td></tr>
  <tr><td class="entry"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a6089c7316bc45c665c05ae2795c56996">connect_x</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm.wm</a></td><td class="entry"></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#ae3db27611edca228340055445802872e">event_loop</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm.wm</a></td><td class="entry"></td></tr>
  <tr><td class="entry"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a7d2a16b2c0677dd444c5ad544df88dce">focus_next</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm.wm</a></td><td class="entry"></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a655ca8ced7f1ae946a763d36509cb2fc">focus_prev</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm.wm</a></td><td class="entry"></td></tr>
  <tr><td class="entry"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aa135b308c00953677da47e6406195349">kill</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm.wm</a></td><td class="entry"></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a0f0fc5aba6b2d1cb9e7d7d26734db2ce">manage</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm.wm</a></td><td class="entry"></td></tr>
  <tr><td class="entry"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a625060054eff4ec46b7bf59c8b81f648">manage_existing</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm.wm</a></td><td class="entry"></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aa44262717bcd97a14c4934b76f7b6033">nuke</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm.wm</a></td><td class="entry"></td></tr>
  <tr><td class="entry"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a7b7d6a9ed932238e93d4939a4b890929">quit</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm.wm</a></td><td class="entry"></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a083cf0ffb160167457fc29d838b907f1">spawn</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm.wm</a></td><td class="entry"></td></tr>
  <tr><td class="entry"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aafe86ca729c1c4e016a62c9e827c3462">start</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm.wm</a></td><td class="entry"></td></tr>
</table></div><!-- contents -->
</body>
</html>

Changes to api/classminx_1_1core_1_1wm_1_1wm.html.

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
133
134
135
136
137


































138
139
140
141
142
143
144

145
146
147
148
149
150
151
...
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174

175
176
177
178
179
180
181


182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
...
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
...
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
...
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
...
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474



















475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
...
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
...
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
...
545
546
547
548
549
550
551
552
553
554
555
556
557
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: minx.core.wm.wm Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>
     
   </div>
   
   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>
   
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>minx</b>      </li>
      <li class="navelem"><b>core</b>      </li>
      <li class="navelem"><b>wm</b>      </li>
      <li class="navelem"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">wm</a>      </li>
    </ul>

  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>

  <div class="headertitle">
<div class="title">minx.core.wm.wm Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Main window manager object.  
 <a href="classminx_1_1core_1_1wm_1_1wm.html#details">More...</a></p>

<p><a href="classminx_1_1core_1_1wm_1_1wm-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>

Public Member Functions</h2></td></tr>
<tr class="memitem:a5b9849924e9b3c79f85fe6692b4f090d"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a5b9849924e9b3c79f85fe6692b4f090d">__init__</a></td></tr>
<tr class="memdesc:a5b9849924e9b3c79f85fe6692b4f090d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create the main window manager object.  <a href="#a5b9849924e9b3c79f85fe6692b4f090d"></a><br/></td></tr>

<tr class="memitem:aafe86ca729c1c4e016a62c9e827c3462"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aafe86ca729c1c4e016a62c9e827c3462">start</a></td></tr>
<tr class="memdesc:aafe86ca729c1c4e016a62c9e827c3462"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start the window manager.  <a href="#aafe86ca729c1c4e016a62c9e827c3462"></a><br/></td></tr>

<tr class="memitem:a6089c7316bc45c665c05ae2795c56996"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a6089c7316bc45c665c05ae2795c56996">connect_x</a></td></tr>
<tr class="memdesc:a6089c7316bc45c665c05ae2795c56996"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connect to the X server.  <a href="#a6089c7316bc45c665c05ae2795c56996"></a><br/></td></tr>

<tr class="memitem:aa7bb3b39fc857a69018ae557a6eebf2d"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aa7bb3b39fc857a69018ae557a6eebf2d">configure_x</a></td></tr>
<tr class="memdesc:aa7bb3b39fc857a69018ae557a6eebf2d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configure X server to send Minx events it needs to manage windows.  <a href="#aa7bb3b39fc857a69018ae557a6eebf2d"></a><br/></td></tr>

<tr class="memitem:a625060054eff4ec46b7bf59c8b81f648"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a625060054eff4ec46b7bf59c8b81f648">manage_existing</a></td></tr>
<tr class="memdesc:a625060054eff4ec46b7bf59c8b81f648"><td class="mdescLeft">&#160;</td><td class="mdescRight">Manage existing top-level windows.  <a href="#a625060054eff4ec46b7bf59c8b81f648"></a><br/></td></tr>

<tr class="memitem:ae3db27611edca228340055445802872e"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#ae3db27611edca228340055445802872e">event_loop</a></td></tr>
<tr class="memdesc:ae3db27611edca228340055445802872e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve and process X events.  <a href="#ae3db27611edca228340055445802872e"></a><br/></td></tr>

<tr class="memitem:a7d2a16b2c0677dd444c5ad544df88dce"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a7d2a16b2c0677dd444c5ad544df88dce">focus_next</a></td></tr>
<tr class="memdesc:a7d2a16b2c0677dd444c5ad544df88dce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Focus next window.  <a href="#a7d2a16b2c0677dd444c5ad544df88dce"></a><br/></td></tr>

<tr class="memitem:a655ca8ced7f1ae946a763d36509cb2fc"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a655ca8ced7f1ae946a763d36509cb2fc">focus_prev</a></td></tr>
<tr class="memdesc:a655ca8ced7f1ae946a763d36509cb2fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Focus previous window.  <a href="#a655ca8ced7f1ae946a763d36509cb2fc"></a><br/></td></tr>

<tr class="memitem:aa135b308c00953677da47e6406195349"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aa135b308c00953677da47e6406195349">kill</a></td></tr>
<tr class="memdesc:aa135b308c00953677da47e6406195349"><td class="mdescLeft">&#160;</td><td class="mdescRight">Kill window.  <a href="#aa135b308c00953677da47e6406195349"></a><br/></td></tr>

<tr class="memitem:aa44262717bcd97a14c4934b76f7b6033"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aa44262717bcd97a14c4934b76f7b6033">nuke</a></td></tr>
<tr class="memdesc:aa44262717bcd97a14c4934b76f7b6033"><td class="mdescLeft">&#160;</td><td class="mdescRight">Kill window using brute force.  <a href="#aa44262717bcd97a14c4934b76f7b6033"></a><br/></td></tr>

<tr class="memitem:a083cf0ffb160167457fc29d838b907f1"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a083cf0ffb160167457fc29d838b907f1">spawn</a></td></tr>
<tr class="memdesc:a083cf0ffb160167457fc29d838b907f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Run specified command.  <a href="#a083cf0ffb160167457fc29d838b907f1"></a><br/></td></tr>

<tr class="memitem:a231e2c2649ba535cd8e1d9ee63c68877"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a231e2c2649ba535cd8e1d9ee63c68877">add_to_focus_list</a></td></tr>
<tr class="memdesc:a231e2c2649ba535cd8e1d9ee63c68877"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a newly created top-level window to the focus list.  <a href="#a231e2c2649ba535cd8e1d9ee63c68877"></a><br/></td></tr>

<tr class="memitem:a0f0fc5aba6b2d1cb9e7d7d26734db2ce"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a0f0fc5aba6b2d1cb9e7d7d26734db2ce">manage</a></td></tr>
<tr class="memdesc:a0f0fc5aba6b2d1cb9e7d7d26734db2ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if given window should be managed or not.  <a href="#a0f0fc5aba6b2d1cb9e7d7d26734db2ce"></a><br/></td></tr>




</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Main window manager object. </p>
<p>This class encapsulates all the internal state required by the window manager. Typically, you will create an instance of this class in order to start the window manager. For example, the simplest Minx configuration would be a file with the following contents:</p>
<div class="fragment"><pre class="fragment">         #!/usr/bin/env python
         import minx
         minx.core.wm().start()</pre></div><p>Of course, the above code requires the minx package to be in your Python path. But, assuming that is the case, it would start Minx with the default keybindings, hooks, and other settings.</p>
<p>To make simple customizations, create an instance of the <a class="el" href="classminx_1_1core_1_1config_1_1config.html">config</a> class and pass that to the wm constructor:</p>
<div class="fragment"><pre class="fragment">         #!/usr/bin/env python
 
         import minx
 
         conf = minx.core.config()
         conf.active_border_color = 0x00FF00 # green
 
         minx.core.wm(conf).start()</pre></div><p>In addition to customizing window border attributes, the config class enables logging to be configured. Here is an example:</p>
<div class="fragment"><pre class="fragment">         #!/usr/bin/env python
 
         import logging
         import minx
 
         conf = minx.core.config()
         conf.log_to_file('minx.log')
         conf.log_level(logging.DEBUG)
 
         minx.core.wm(conf).start()</pre></div><p>The <a href="../wiki/logging.wiki">Logging HOWTO</a> provides more details on logging configuration.</p>
<p>Apart from the simple attribute customizations shown above, if you would also like to change the way Minx responds to various events, you will have to define hook functions and pass those to Minx. Here is a simple example:</p>
<div class="fragment"><pre class="fragment">         #!/usr/bin/env python
 
         import minx
 
         def my_manage_hook(w):
             prop = w.properties()
             if prop['class'].lower() == 'gkrellm':
                return False
             return True
 
         wm = minx.core.wm()
         wm.hooks.add('manage_hook', my_manage_hook)
         wm.start()</pre></div><p>The above configuration will setup a manage hook that instructs Minx to ignore the GKrellM window. Have a look at the <a href="../wiki/hooks-howto.wiki">Hooks HOWTO</a> for lots more info about configuring Minx using hooks. Additionally, the <a href="../wiki/hooks-list.wiki">Hooks List</a> documents all the hooks that Minx currently supports.</p>
<p>One important use of hooks is for defining custom key bindings. The <a href="../wiki/key-bindings.wiki">Key Bindings HOWTO</a> has the details.</p>
<dl class="section note"><dt>Note:</dt><dd>Although this class is defined in the minx.core.wm "package" and, technically, must be accessed as <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html" title="Main window manager object.">minx.core.wm.wm</a>, it can, in fact (and as illustrated in the code snippets above), be referred to simply as minx.core.wm. </dd></dl>


































</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a5b9849924e9b3c79f85fe6692b4f090d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a5b9849924e9b3c79f85fe6692b4f090d">minx.core.wm.wm.__init__</a> </td>

          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Create the main window manager object. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">conf</td><td>Config object containing simple customizations.</td></tr>
  </table>
  </dd>
</dl>
<p>The wm class implements the main interface to the Minx window manager. You will have to first create an instance of this class and then call its <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aafe86ca729c1c4e016a62c9e827c3462" title="Start the window manager.">start()</a> method to run the window manager. This constructor simply sets up some internal attributes, the most important of which are:</p>
<ul>
<li>config </li>
<li>hooks</li>

</ul>
<p>The <a class="el" href="classminx_1_1core_1_1config_1_1config.html">config</a> object specifies various settings such as the border colors, sizes, etc. To customize these settings, you will (typically) create a config object, change its various attributes, and pass that object into this constructor. (Alternatively, you could first create a wm object and then access its config attribute; however, the former approach is the preferred style.)</p>
<p>If you don't supply a config object, the window manager will use default settings.</p>
<p>The wm object's <a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html">hooks</a> attribute maps names of hook functions (i.e., strings) to prioritized lists of callables. Minx will trigger these hooks at appropriate points in its event processing workflow. Minx uses hooks both internally (to handle various events) and "externally" (to allow end-users to customize its behaviour).</p>
<p>To supply your own hooks, after creating a wm instance, use its hooks attribute to add hook functions for various events. Take a look at the <a href="../wiki/hooks-howto.wiki">Hooks HOWTO</a> for more on customizing Minx with hook functions. The <a href="../wiki/hooks-list.wiki">Hooks List</a> documents all the hooks currently supported by Minx.</p>
<p>As mentioned earlier, Minx leverages its hooks mechanism to allow end-users to define custom key bindings. The <a href="../wiki/key-bindings.wiki">Key Bindings HOWTO</a> explains this feature.</p>
<p>One thing to keep in mind about hooks is that, since Minx uses them internally, it is easy to override its internal hooks and even disable them. Usually, this will cause Bad Things (TM) to happen. Thus, you should exercise care when dealing with "dangerous" hooks. As long as you stick to "external" hooks used by Minx specifically to effect customization, you should be okay. </p>



</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a231e2c2649ba535cd8e1d9ee63c68877"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a231e2c2649ba535cd8e1d9ee63c68877">minx.core.wm.wm.add_to_focus_list</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Add a newly created top-level window to the focus list. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">w</td><td>The <a class="el" href="classminx_1_1core_1_1window_1_1window.html" title="Encapsulation of top-level X windows.">minx.core.window.window</a> wrapper object encapsulating the top-level window.</td></tr>
  </table>
  </dd>
</dl>
<p>This function is meant to be used internally by Minx. Specifically, the wm constructor calls it to take over management of any top-level windows that might have been created before Minx was started. Also, the <code>MapNotify</code> handler in the xevents class uses it to add a newly mapped top-level window to the focus list and to focus it.</p>
<p>End-users should not use this function. </p>

</div>
</div>
<a class="anchor" id="aa7bb3b39fc857a69018ae557a6eebf2d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aa7bb3b39fc857a69018ae557a6eebf2d">minx.core.wm.wm.configure_x</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Configure X server to send Minx events it needs to manage windows. </p>
<p>This method sets up the event mask for all the root windows so that Minx gets the notifications it needs to be able to manage windows. It also sets up passive keyboard grabs to make the keybindings mechanism work.</p>
<dl class="section note"><dt>Note:</dt><dd>This method is mostly an internal one meant to be used by Minx itself. In fact, it is called by <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aafe86ca729c1c4e016a62c9e827c3462" title="Start the window manager.">wm.start()</a>. You should not really need to call it yourself. However, we provide this as a public method to allow customization in case you want to do something after connecting to and setting up X but before the remaining steps in Minx's usual start-up sequence.</dd></dl>
<dl class="section user"><dt></b></dt><dd>If you decide not to use <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aafe86ca729c1c4e016a62c9e827c3462" title="Start the window manager.">wm.start()</a>, look at the Minx code to see how and what you will need to do to effectively use this function. </dd></dl>

</div>
</div>
<a class="anchor" id="a6089c7316bc45c665c05ae2795c56996"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a6089c7316bc45c665c05ae2795c56996">minx.core.wm.wm.connect_x</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Connect to the X server. </p>
<p>This method connects to the X server. If we are unable to do so, it will raise a <a class="el" href="structminxlib_1_1connection__error.html" title="An exception object to indicate failure to connect to X server.">minxlib.connection_error</a>.</p>
<dl class="section note"><dt>Note:</dt><dd>This method is mostly an internal one meant to be used by Minx itself. In fact, it is called by <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aafe86ca729c1c4e016a62c9e827c3462" title="Start the window manager.">wm.start()</a>. You should not really need to call it yourself. However, we provide this as a public method to allow customization in case you want to do something after connecting to X but before the other steps in Minx's usual start-up sequence.</dd></dl>
<dl class="section user"><dt></b></dt><dd>If you decide not to use <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aafe86ca729c1c4e016a62c9e827c3462" title="Start the window manager.">wm.start()</a>, look at the Minx code to see how and what you will need to do to effectively use this function. </dd></dl>

</div>
</div>
<a class="anchor" id="ae3db27611edca228340055445802872e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#ae3db27611edca228340055445802872e">minx.core.wm.wm.event_loop</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Retrieve and process X events. </p>
<p>This method implements Minx's event loop. Once we enter this function, Minx will initiate an infinite loop, wherein it blocks, waiting for the X server to send it events. When it receives an event notification, it will trigger its internal event processing hooks to respond appropriately.</p>
<dl class="section note"><dt>Note:</dt><dd>This method is mostly an internal one meant to be used by Minx itself. In fact, it is called by <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aafe86ca729c1c4e016a62c9e827c3462" title="Start the window manager.">wm.start()</a>. You should not really need to call it yourself. However, we provide this as a public method to allow customization in case you want to do something after connecting to X, setting it up, and managing the existing top-level windows but right before entering the event loop.</dd></dl>
<dl class="section user"><dt></b></dt><dd>If you decide not to use <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aafe86ca729c1c4e016a62c9e827c3462" title="Start the window manager.">wm.start()</a>, look at the Minx code to see how and what you will need to do to effectively use this function. </dd></dl>

</div>
</div>
<a class="anchor" id="a7d2a16b2c0677dd444c5ad544df88dce"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a7d2a16b2c0677dd444c5ad544df88dce">minx.core.wm.wm.focus_next</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Focus next window. </p>
<p>This function passes input focus to the next window in the window manager's list of top-level windows that can accept input focus. It is meant to be invoked via a key binding's hook. Here is an example of intended usage:</p>
<div class="fragment"><pre class="fragment">             #!/usr/bin/env python
 
             import minx
 
             wm = minx.core.wm()
             wm.hooks.add(  'F1', wm.focus_next)
             wm.hooks.add('S-F1', wm.focus_prev)
             wm.start()</pre></div><p>With that in your Minx start-up script, you will be able to cycle input focus with F1 and SHIFT + F1 (in addition to the default key bindings for focus cycling, viz., ALT + Tab and ALT + SHIFT + Tab). </p>

</div>
</div>
<a class="anchor" id="a655ca8ced7f1ae946a763d36509cb2fc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a655ca8ced7f1ae946a763d36509cb2fc">minx.core.wm.wm.focus_prev</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Focus previous window. </p>
<p>This function passes input focus to the previous window in the window manager's list of top-level windows that can accept input focus. It is meant to be invoked via a key binding's hook. Here is an example of intended usage:</p>
<div class="fragment"><pre class="fragment">             #!/usr/bin/env python
 
             import minx
 
             wm = minx.core.wm()
             wm.hooks.add(  'F1', wm.focus_next)
             wm.hooks.add('S-F1', wm.focus_prev)
             wm.start()</pre></div><p>With that in your Minx start-up script, you will be able to cycle input focus with F1 and SHIFT + F1 (in addition to the default key bindings for focus cycling, viz., ALT + Tab and ALT + SHIFT + Tab). </p>

</div>
</div>
<a class="anchor" id="aa135b308c00953677da47e6406195349"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aa135b308c00953677da47e6406195349">minx.core.wm.wm.kill</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Kill window. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">w</td><td>The window to be killed.</td></tr>
  </table>
  </dd>
</dl>
<p>This function kills the X client application that created the window w and all of its other windows and X resources. If w is not supplied by the caller, this function will kill the currently focused window. </p>

</div>
</div>
<a class="anchor" id="a0f0fc5aba6b2d1cb9e7d7d26734db2ce"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a0f0fc5aba6b2d1cb9e7d7d26734db2ce">minx.core.wm.wm.manage</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Check if given window should be managed or not. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">w</td><td>The <a class="el" href="classminxlib_1_1window.html">minxlib.window</a> to be checked. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>True if Minx should manage w, false if it should ignore w.</dd></dl>
<p>This function triggers the manage hooks setup by end-users and checks all their return values. If all the manage hooks return True, then this function will return True. If any of the manage hooks returns False, this function will return False. Thus, Minx will only manage a top-level window if all the manage hooks return True.</p>
<dl class="section note"><dt>Note:</dt><dd>This function is meant to be used internally by Minx. End-user code should refrain from calling it. </dd></dl>

</div>
</div>
<a class="anchor" id="a625060054eff4ec46b7bf59c8b81f648"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a625060054eff4ec46b7bf59c8b81f648">minx.core.wm.wm.manage_existing</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Manage existing top-level windows. </p>
<p>Minx uses this function to get the list of existing top-level windows and add them to its internal data structures so it can manage them. This is necessary, for example, when an end-user's ~/.xinitrc starts X programs before starting the window manager. It is also required when the window manager is restarted or when a user switches from another running window manager to Minx.</p>
<dl class="section note"><dt>Note:</dt><dd>This method is mostly an internal one meant to be used by Minx itself. In fact, it is called by <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aafe86ca729c1c4e016a62c9e827c3462" title="Start the window manager.">wm.start()</a>. You should not really need to call it yourself. However, we provide this as a public method to allow customization in case you want to do something after connecting to X, setting it up, and managing the existing top-level windows but before entering the event loop.</dd></dl>
<dl class="section user"><dt></b></dt><dd>If you decide not to use <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aafe86ca729c1c4e016a62c9e827c3462" title="Start the window manager.">wm.start()</a>, look at the Minx code to see how and what you will need to do to effectively use this function. </dd></dl>

</div>
</div>
<a class="anchor" id="aa44262717bcd97a14c4934b76f7b6033"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aa44262717bcd97a14c4934b76f7b6033">minx.core.wm.wm.nuke</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Kill window using brute force. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">w</td><td>The window to be nuked.</td></tr>
  </table>
  </dd>
</dl>
<p>This function kills the X client application that created the window w and all of its other windows and X resources. If w is not supplied by the caller, this function will kill the currently focused window.</p>
<dl class="section note"><dt>Note:</dt><dd>Whereas the <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aa135b308c00953677da47e6406195349" title="Kill window.">kill()</a> function attempts a graceful shutdown, this function resorts to brute force. It is meant to be used on windows that advertise support for the WM_DELETE_WINDOW protocol but don't implement it properly, thus, requiring a brute force kill (i.e., a nuking). </dd></dl>




















</div>
</div>
<a class="anchor" id="a083cf0ffb160167457fc29d838b907f1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a083cf0ffb160167457fc29d838b907f1">minx.core.wm.wm.spawn</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Run specified command. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">cmd</td><td>A string containing the command and command-line arguments.</td></tr>
  </table>
  </dd>
</dl>
<p>This function can be used to run arbitrary commands. Minx does not wait for the command to complete or communicate with it any further after starting it. The intent of this function is to facilitate launching GUI applications via window manager key bindings.</p>
<p>If the command fails, Minx will write details to its log (if logging has been enabled). </p>
................................................................................
</div>
</div>
<a class="anchor" id="aafe86ca729c1c4e016a62c9e827c3462"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aafe86ca729c1c4e016a62c9e827c3462">minx.core.wm.wm.start</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Start the window manager. </p>
<p>Call this method after creating a wm instance to get Minx up and running. Here is an example showing how to start Minx with its default settings, key bindings, etc.:</p>
<div class="fragment"><pre class="fragment">             #!/usr/bin/env python
             import minx
             minx.core.wm().start()</pre></div><p>If you would like to customize Minx by specifying your own hooks to be able deal with various events, the initialization and start-up sequence will be a three step procedure as shown below:</p>
<div class="fragment"><pre class="fragment">             #!/usr/bin/env python
 
             import minx
 
             # Define your hook functions
             def my_manage_hook(w):
                 return True # actually, you would do something more useful
 
................................................................................
 
             # Step two: customize using hooks
             wm.hooks.add('manage_hook', my_manage_hook)
             wm.hooks.add(  'F1', wm.focus_next) # custom key binding
             wm.hooks.add('S-F1', wm.focus_prev) # custom key binding
 
             # Step three: start the window manager
             wm.start()</pre></div> 
</div>
</div>
</div><!-- contents -->
</body>
</html>






<


<
<
<



<
<




<
<



<

<



<

<
<
<
<
<




<
|
|
|
<
<
<
<
<
>
|
|


|
>







<
<

<
>


|
>

|
>

|
>

|
>

|
>

|
>

|
>

|
>

|
>

|
>

|
>

|
>

|
>
>
>
>

|


|

|

|






|
|








|

|











|

|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|





<
>







 







<
|


|





|


|
>

|
<



|
>
>



|





|







 







<
|


|

|













|


|



<
|



|
|








|


|



<
|


|
|
|








|


|



<
|



|
|








|


|



<
|



|






|








|


|



<
|



|






|








|







 







<
|


|

|












|







 







<
|


|





|

|








|


|



<
|



|
|








|







 







<
|


|

|




|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>








|







 







<
|


|







 







|


|



<
|



|

|
|







 







|





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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171

172
173
174
175
176
177
178
179
...
182
183
184
185
186
187
188

189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204

205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
...
230
231
232
233
234
235
236

237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262

263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283

284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304

305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325

326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352

353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
...
383
384
385
386
387
388
389

390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
...
418
419
420
421
422
423
424

425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451

452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
...
476
477
478
479
480
481
482

483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
...
531
532
533
534
535
536
537

538
539
540
541
542
543
544
545
546
547
548
...
550
551
552
553
554
555
556
557
558
559
560
561
562
563

564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
...
581
582
583
584
585
586
587
588
589
590
591
592
593
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: minx.core.wm.wm Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">


  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>

   </div>

   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>

  </td>





 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.4 -->
<div id="nav-path" class="navpath">
  <ul>





<li class="navelem"><b>minx</b></li><li class="navelem"><b>core</b></li><li class="navelem"><a class="el" href="namespaceminx_1_1core_1_1wm.html">wm</a></li><li class="navelem"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">wm</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classminx_1_1core_1_1wm_1_1wm-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">minx.core.wm.wm Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Main window manager object.  
 <a href="classminx_1_1core_1_1wm_1_1wm.html#details">More...</a></p>


<table class="memberdecls">

<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a5b9849924e9b3c79f85fe6692b4f090d"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a5b9849924e9b3c79f85fe6692b4f090d">__init__</a></td></tr>
<tr class="memdesc:a5b9849924e9b3c79f85fe6692b4f090d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create the main window manager object.  <a href="#a5b9849924e9b3c79f85fe6692b4f090d">More...</a><br/></td></tr>
<tr class="separator:a5b9849924e9b3c79f85fe6692b4f090d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aafe86ca729c1c4e016a62c9e827c3462"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aafe86ca729c1c4e016a62c9e827c3462">start</a></td></tr>
<tr class="memdesc:aafe86ca729c1c4e016a62c9e827c3462"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start the window manager.  <a href="#aafe86ca729c1c4e016a62c9e827c3462">More...</a><br/></td></tr>
<tr class="separator:aafe86ca729c1c4e016a62c9e827c3462"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6089c7316bc45c665c05ae2795c56996"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a6089c7316bc45c665c05ae2795c56996">connect_x</a></td></tr>
<tr class="memdesc:a6089c7316bc45c665c05ae2795c56996"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connect to the X server.  <a href="#a6089c7316bc45c665c05ae2795c56996">More...</a><br/></td></tr>
<tr class="separator:a6089c7316bc45c665c05ae2795c56996"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa7bb3b39fc857a69018ae557a6eebf2d"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aa7bb3b39fc857a69018ae557a6eebf2d">configure_x</a></td></tr>
<tr class="memdesc:aa7bb3b39fc857a69018ae557a6eebf2d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configure X server to send Minx events it needs to manage windows.  <a href="#aa7bb3b39fc857a69018ae557a6eebf2d">More...</a><br/></td></tr>
<tr class="separator:aa7bb3b39fc857a69018ae557a6eebf2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a625060054eff4ec46b7bf59c8b81f648"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a625060054eff4ec46b7bf59c8b81f648">manage_existing</a></td></tr>
<tr class="memdesc:a625060054eff4ec46b7bf59c8b81f648"><td class="mdescLeft">&#160;</td><td class="mdescRight">Manage existing top-level windows.  <a href="#a625060054eff4ec46b7bf59c8b81f648">More...</a><br/></td></tr>
<tr class="separator:a625060054eff4ec46b7bf59c8b81f648"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae3db27611edca228340055445802872e"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#ae3db27611edca228340055445802872e">event_loop</a></td></tr>
<tr class="memdesc:ae3db27611edca228340055445802872e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve and process X events.  <a href="#ae3db27611edca228340055445802872e">More...</a><br/></td></tr>
<tr class="separator:ae3db27611edca228340055445802872e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d2a16b2c0677dd444c5ad544df88dce"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a7d2a16b2c0677dd444c5ad544df88dce">focus_next</a></td></tr>
<tr class="memdesc:a7d2a16b2c0677dd444c5ad544df88dce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Focus next window.  <a href="#a7d2a16b2c0677dd444c5ad544df88dce">More...</a><br/></td></tr>
<tr class="separator:a7d2a16b2c0677dd444c5ad544df88dce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a655ca8ced7f1ae946a763d36509cb2fc"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a655ca8ced7f1ae946a763d36509cb2fc">focus_prev</a></td></tr>
<tr class="memdesc:a655ca8ced7f1ae946a763d36509cb2fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Focus previous window.  <a href="#a655ca8ced7f1ae946a763d36509cb2fc">More...</a><br/></td></tr>
<tr class="separator:a655ca8ced7f1ae946a763d36509cb2fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa135b308c00953677da47e6406195349"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aa135b308c00953677da47e6406195349">kill</a></td></tr>
<tr class="memdesc:aa135b308c00953677da47e6406195349"><td class="mdescLeft">&#160;</td><td class="mdescRight">Kill window.  <a href="#aa135b308c00953677da47e6406195349">More...</a><br/></td></tr>
<tr class="separator:aa135b308c00953677da47e6406195349"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa44262717bcd97a14c4934b76f7b6033"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aa44262717bcd97a14c4934b76f7b6033">nuke</a></td></tr>
<tr class="memdesc:aa44262717bcd97a14c4934b76f7b6033"><td class="mdescLeft">&#160;</td><td class="mdescRight">Kill window using brute force.  <a href="#aa44262717bcd97a14c4934b76f7b6033">More...</a><br/></td></tr>
<tr class="separator:aa44262717bcd97a14c4934b76f7b6033"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a083cf0ffb160167457fc29d838b907f1"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a083cf0ffb160167457fc29d838b907f1">spawn</a></td></tr>
<tr class="memdesc:a083cf0ffb160167457fc29d838b907f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Run specified command.  <a href="#a083cf0ffb160167457fc29d838b907f1">More...</a><br/></td></tr>
<tr class="separator:a083cf0ffb160167457fc29d838b907f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a231e2c2649ba535cd8e1d9ee63c68877"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a231e2c2649ba535cd8e1d9ee63c68877">add_to_focus_list</a></td></tr>
<tr class="memdesc:a231e2c2649ba535cd8e1d9ee63c68877"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a newly created top-level window to the focus list.  <a href="#a231e2c2649ba535cd8e1d9ee63c68877">More...</a><br/></td></tr>
<tr class="separator:a231e2c2649ba535cd8e1d9ee63c68877"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f0fc5aba6b2d1cb9e7d7d26734db2ce"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a0f0fc5aba6b2d1cb9e7d7d26734db2ce">manage</a></td></tr>
<tr class="memdesc:a0f0fc5aba6b2d1cb9e7d7d26734db2ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if given window should be managed or not.  <a href="#a0f0fc5aba6b2d1cb9e7d7d26734db2ce">More...</a><br/></td></tr>
<tr class="separator:a0f0fc5aba6b2d1cb9e7d7d26734db2ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7b7d6a9ed932238e93d4939a4b890929"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#a7b7d6a9ed932238e93d4939a4b890929">quit</a></td></tr>
<tr class="memdesc:a7b7d6a9ed932238e93d4939a4b890929"><td class="mdescLeft">&#160;</td><td class="mdescRight">Quit the window manager.  <a href="#a7b7d6a9ed932238e93d4939a4b890929">More...</a><br/></td></tr>
<tr class="separator:a7b7d6a9ed932238e93d4939a4b890929"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Main window manager object. </p>
<p>This class encapsulates all the internal state required by the window manager. Typically, you will create an instance of this class in order to start the window manager. For example, the simplest Minx configuration would be a file with the following contents:</p>
<pre class="fragment">         #!/usr/bin/env python
         import minx
         minx.core.wm().start()</pre><p>Of course, the above code requires the minx package to be in your Python path. But, assuming that is the case, it would start Minx with the default key bindings, hooks, and other settings.</p>
<p>To make simple customizations, create an instance of the <a class="el" href="classminx_1_1core_1_1config_1_1config.html">config</a> class and pass that to the wm constructor:</p>
<pre class="fragment">         #!/usr/bin/env python
 
         import minx
 
         conf = minx.core.config()
         conf.active_border_color = 0x00FF00 # green
 
         minx.core.wm(conf).start()</pre><p>In addition to customizing window border attributes, the config class enables logging to be configured. Here is an example:</p>
<pre class="fragment">         #!/usr/bin/env python
 
         import logging
         import minx
 
         conf = minx.core.config()
         conf.log_to_file('minx.log')
         conf.log_level(logging.DEBUG)
 
         minx.core.wm(conf).start()</pre><p>The <a href="../wiki/logging.wiki">Logging HOWTO</a> provides more details on logging configuration.</p>
<p>Apart from the simple attribute customizations shown above, if you would also like to change the way Minx responds to various events, you will have to define hook functions and pass those to Minx. Here is a simple example:</p>
<pre class="fragment">         #!/usr/bin/env python
 
         import minx
 
         def my_manage_hook(w):
             prop = w.properties()
             if prop['class'].lower() == 'gkrellm':
                return False
             return True
 
         wm = minx.core.wm()
         wm.hooks.add('manage_hook', my_manage_hook)
         wm.start()</pre><p>The above configuration will setup a manage hook that instructs Minx to ignore the GKrellM window. Have a look at the <a href="../wiki/hooks-howto.wiki">Hooks HOWTO</a> for lots more info about configuring Minx using hooks. Additionally, the <a href="../wiki/hooks-list.wiki">Hooks List</a> documents all the hooks that Minx currently supports.</p>
<p>One important use of hooks is for defining custom key bindings. The <a href="../wiki/key-bindings.wiki">Key Bindings HOWTO</a> has the details.</p>
<p>To customize how Minx arranges windows, you can:</p>
<ul>
<li>Specify the layouts you would like to use </li>
<li>Specify the layout for particular windows </li>
<li>Implement your own layouts</li>
</ul>
<p>Here is an example that illustrates the first two of the above possibilities:</p>
<pre class="fragment">         #!/usr/bin/env python
 
         import minx
 
         def my_init_hook(m):
             scr = m.root_windows
             m.layouts.add(minx.layout.tall(m, scr[0]))
             m.layouts.add(minx.layout.rows(m, scr[1]))
 
         def my_receptive_layout_hook(w):
             prop = w.properties()
             if 'gimp' in prop['class'].lower():
                 global wm
                 try:
                     L = wm.layouts.find('gimp')
                     return L
                 except minx.core.layman.unknown_layout:
                    parent = wm.root_windows[w.screen()]
                    return minx.layout.gimp(wm, parent)
             return None
 
         wm = minx.core.wm()
         wm.hooks.add('init_hook', my_init_hook)
         wm.hooks.add('receptive_layout_hook', my_receptive_layout_hook)
         wm.start()</pre><p>The <a href="../wiki/hooks-list.wiki#init_hook">init hook</a> allows you to setup the layouts you want to use. If you don't supply an init hook, Minx will use a default layout for each screen. At this time, the default layout is the <a class="el" href="classminx_1_1layout_1_1full_1_1full.html">full</a> layout, which shows one window at a time by resizing windows to occupy the entire screen. In the above example, we use the tall layout for the first screen and the rows layout for the second screen. Of course, this would only work if you actually have two screens. Please also note that the tall and rows layout classes have not yet been implemented; we use these nonexistent layouts just to illustrate the intended spirit of layouts specification.</p>
<p>The <a href="../wiki/hooks-list.wiki#receptive_layout_hook">receptive layout hook</a> allows you to either create or find a layout for each new window that Minx manages. In the above example, we created an instance of the gimp layout when Gimp starts up and use that for subsequent windows. For all other window types, we fall back to either the tall or rows layouts setup in the init hook. If, for some reason, the tall and rows layouts refuse to manage the new window, Minx will fall back its default, viz., the full layout. Again, like tall and rows, the gimp layout does not exist yet; it was used merely to illustrate how the receptive layout hook is intended to work.</p>
<p>Documentation for implementing layouts will come later.</p>
<dl class="section note"><dt>Note</dt><dd>Although this class is defined in the <a class="el" href="namespaceminx_1_1core_1_1wm.html" title="Main interface object for Minx&#39;s end-users. ">minx.core.wm</a> "package" and, technically, must be accessed as <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html" title="Main window manager object. ">minx.core.wm.wm</a>, it can, in fact (and as illustrated in the code snippets above), be referred to simply as <a class="el" href="namespaceminx_1_1core_1_1wm.html" title="Main interface object for Minx&#39;s end-users. ">minx.core.wm</a>. </dd></dl>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a5b9849924e9b3c79f85fe6692b4f090d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>

          <td class="memname">def minx.core.wm.wm.__init__ </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Create the main window manager object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conf</td><td>Config object containing simple customizations.</td></tr>
  </table>
  </dd>
</dl>
<p>The wm class implements the main interface to the Minx window manager. You will have to first create an instance of this class and then call its <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aafe86ca729c1c4e016a62c9e827c3462" title="Start the window manager. ">start()</a> method to run the window manager. This constructor simply sets up some internal attributes, the most important of which are:</p>
<ul>
<li>config </li>
<li>hooks </li>
<li>layouts</li>
</ul>
<p>The <a class="el" href="classminx_1_1core_1_1config_1_1config.html">config</a> object specifies various settings such as the border colors, sizes, etc. To customize these settings, you will (typically) create a config object, change its various attributes, and pass that object into this constructor. (Alternatively, you could first create a wm object and then access its config attribute.) If you don't supply a config object, the window manager will use default settings.</p>

<p>The wm object's <a class="el" href="classminx_1_1core_1_1hooks_1_1hooks.html">hooks</a> attribute maps names of hook functions (i.e., strings) to prioritized lists of callables. Minx will trigger these hooks at appropriate points in its event processing workflow. Minx uses hooks both internally (to handle various events) and "externally" (to allow end-users to customize its behaviour).</p>
<p>To supply your own hooks, after creating a wm instance, use its hooks attribute to add hook functions for various events. Take a look at the <a href="../wiki/hooks-howto.wiki">Hooks HOWTO</a> for more on customizing Minx with hook functions. The <a href="../wiki/hooks-list.wiki">Hooks List</a> documents all the hooks currently supported by Minx.</p>
<p>As mentioned earlier, Minx leverages its hooks mechanism to allow end-users to define custom key bindings. The <a href="../wiki/key-bindings.wiki">Key Bindings HOWTO</a> explains this feature.</p>
<p>One thing to keep in mind about hooks is that, since Minx uses them internally, it is easy to override its internal hooks and even disable them. Usually, this will cause Bad Things (TM) to happen. Thus, you should exercise care when dealing with "dangerous" hooks. As long as you stick to "external" hooks used by Minx specifically to effect customization, you should be okay.</p>
<p>Finally, the <a class="el" href="classminx_1_1core_1_1layman_1_1layman.html">layouts</a> object provides an interface for dealing with window layouts. By default, Minx uses the <a class="el" href="classminx_1_1layout_1_1full_1_1full.html">full</a> layout, which shows one window at a time, resizing windows so that they occupy the entire screen. You can use the <a href="../wiki/hooks-list.wiki#init_hook">init hook</a> to add your preferred layouts to the layout manager.</p>
<p>Another way to customize layout selection is to use the <a href="../wiki/hooks-list.wiki#receptive_layout_hook">receptive layout hook</a>, which provides a mechanism for deciding a layout for each new window. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a231e2c2649ba535cd8e1d9ee63c68877"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.wm.wm.add_to_focus_list </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Add a newly created top-level window to the focus list. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">w</td><td>The <a class="el" href="classminxlib_1_1window.html">minxlib.window</a> to be added.</td></tr>
  </table>
  </dd>
</dl>
<p>This function is meant to be used internally by Minx. Specifically, the wm constructor calls it to take over management of any top-level windows that might have been created before Minx was started. Also, the <code>MapNotify</code> handler in the xevents class uses it to add a newly mapped top-level window to the focus list and to focus it.</p>
<p>End-users should not use this function. </p>

</div>
</div>
<a class="anchor" id="aa7bb3b39fc857a69018ae557a6eebf2d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.wm.wm.configure_x </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>)</td><td></td>
          <td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Configure X server to send Minx events it needs to manage windows. </p>
<p>This method sets up the event mask for all the root windows so that Minx gets the notifications it needs to be able to manage windows. It also sets up passive keyboard grabs to make the keybindings mechanism work.</p>
<dl class="section note"><dt>Note</dt><dd>This method is mostly an internal one meant to be used by Minx itself. In fact, it is called by <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aafe86ca729c1c4e016a62c9e827c3462" title="Start the window manager. ">wm.start()</a>. You should not really need to call it yourself. However, we provide this as a public method to allow customization in case you want to do something after connecting to and setting up X but before the remaining steps in Minx's usual start-up sequence.</dd></dl>
<dl class="section user"><dt></dt><dd>If you decide not to use <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aafe86ca729c1c4e016a62c9e827c3462" title="Start the window manager. ">wm.start()</a>, look at the Minx code to see how and what you will need to do to effectively use this function. </dd></dl>

</div>
</div>
<a class="anchor" id="a6089c7316bc45c665c05ae2795c56996"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.wm.wm.connect_x </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>)</td><td></td>
          <td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Connect to the X server. </p>
<p>This method connects to the X server. If we are unable to do so, it will raise a <a class="el" href="structminxlib_1_1connection__error.html" title="An exception object to indicate failure to connect to X server. ">minxlib.connection_error</a>.</p>
<dl class="section note"><dt>Note</dt><dd>This method is mostly an internal one meant to be used by Minx itself. In fact, it is called by <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aafe86ca729c1c4e016a62c9e827c3462" title="Start the window manager. ">wm.start()</a>. You should not really need to call it yourself. However, we provide this as a public method to allow customization in case you want to do something after connecting to X but before the other steps in Minx's usual start-up sequence.</dd></dl>
<dl class="section user"><dt></dt><dd>If you decide not to use <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aafe86ca729c1c4e016a62c9e827c3462" title="Start the window manager. ">wm.start()</a>, look at the Minx code to see how and what you will need to do to effectively use this function. </dd></dl>

</div>
</div>
<a class="anchor" id="ae3db27611edca228340055445802872e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.wm.wm.event_loop </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>)</td><td></td>
          <td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Retrieve and process X events. </p>
<p>This method implements Minx's event loop. Once we enter this function, Minx will initiate an infinite loop, wherein it blocks, waiting for the X server to send it events. When it receives an event notification, it will trigger its internal event processing hooks to respond appropriately.</p>
<dl class="section note"><dt>Note</dt><dd>This method is mostly an internal one meant to be used by Minx itself. In fact, it is called by <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aafe86ca729c1c4e016a62c9e827c3462" title="Start the window manager. ">wm.start()</a>. You should not really need to call it yourself. However, we provide this as a public method to allow customization in case you want to do something after connecting to X, setting it up, and managing the existing top-level windows but right before entering the event loop.</dd></dl>
<dl class="section user"><dt></dt><dd>If you decide not to use <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aafe86ca729c1c4e016a62c9e827c3462" title="Start the window manager. ">wm.start()</a>, look at the Minx code to see how and what you will need to do to effectively use this function. </dd></dl>

</div>
</div>
<a class="anchor" id="a7d2a16b2c0677dd444c5ad544df88dce"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.wm.wm.focus_next </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>)</td><td></td>
          <td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Focus next window. </p>
<p>This function passes input focus to the next window in the window manager's list of top-level windows that can accept input focus. It is meant to be invoked via a key binding's hook. Here is an example of intended usage:</p>
<pre class="fragment">             #!/usr/bin/env python
 
             import minx
 
             wm = minx.core.wm()
             wm.hooks.add(  'F1', wm.focus_next)
             wm.hooks.add('S-F1', wm.focus_prev)
             wm.start()</pre><p>With that in your Minx start-up script, you will be able to cycle input focus with F1 and SHIFT + F1 (in addition to the default key bindings for focus cycling, viz., ALT + Tab and ALT + SHIFT + Tab). </p>

</div>
</div>
<a class="anchor" id="a655ca8ced7f1ae946a763d36509cb2fc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.wm.wm.focus_prev </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>)</td><td></td>
          <td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Focus previous window. </p>
<p>This function passes input focus to the previous window in the window manager's list of top-level windows that can accept input focus. It is meant to be invoked via a key binding's hook. Here is an example of intended usage:</p>
<pre class="fragment">             #!/usr/bin/env python
 
             import minx
 
             wm = minx.core.wm()
             wm.hooks.add(  'F1', wm.focus_next)
             wm.hooks.add('S-F1', wm.focus_prev)
             wm.start()</pre><p>With that in your Minx start-up script, you will be able to cycle input focus with F1 and SHIFT + F1 (in addition to the default key bindings for focus cycling, viz., ALT + Tab and ALT + SHIFT + Tab). </p>

</div>
</div>
<a class="anchor" id="aa135b308c00953677da47e6406195349"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.wm.wm.kill </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Kill window. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">w</td><td>The <a class="el" href="classminxlib_1_1window.html">minxlib.window</a> to be killed.</td></tr>
  </table>
  </dd>
</dl>
<p>This function kills the X client application that created the window w and all of its other windows and X resources. If w is not supplied by the caller, this function will kill the currently focused window. </p>

</div>
</div>
<a class="anchor" id="a0f0fc5aba6b2d1cb9e7d7d26734db2ce"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.wm.wm.manage </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Check if given window should be managed or not. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">w</td><td>The <a class="el" href="classminxlib_1_1window.html">minxlib.window</a> to be checked. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if Minx should manage w, false if it should ignore w.</dd></dl>
<p>This function triggers the manage hooks setup by end-users and checks all their return values. If all the manage hooks return True, then this function will return True. If any of the manage hooks returns False, this function will return False. Thus, Minx will only manage a top-level window if all the manage hooks return True.</p>
<dl class="section note"><dt>Note</dt><dd>This function is meant to be used internally by Minx. End-user code should refrain from calling it. </dd></dl>

</div>
</div>
<a class="anchor" id="a625060054eff4ec46b7bf59c8b81f648"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.wm.wm.manage_existing </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>)</td><td></td>
          <td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Manage existing top-level windows. </p>
<p>Minx uses this function to get the list of existing top-level windows and add them to its internal data structures so it can manage them. This is necessary, for example, when an end-user's ~/.xinitrc starts X programs before starting the window manager. It is also required when the window manager is restarted or when a user switches from another running window manager to Minx.</p>
<dl class="section note"><dt>Note</dt><dd>This method is mostly an internal one meant to be used by Minx itself. In fact, it is called by <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aafe86ca729c1c4e016a62c9e827c3462" title="Start the window manager. ">wm.start()</a>. You should not really need to call it yourself. However, we provide this as a public method to allow customization in case you want to do something after connecting to X, setting it up, and managing the existing top-level windows but before entering the event loop.</dd></dl>
<dl class="section user"><dt></dt><dd>If you decide not to use <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aafe86ca729c1c4e016a62c9e827c3462" title="Start the window manager. ">wm.start()</a>, look at the Minx code to see how and what you will need to do to effectively use this function. </dd></dl>

</div>
</div>
<a class="anchor" id="aa44262717bcd97a14c4934b76f7b6033"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.wm.wm.nuke </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Kill window using brute force. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">w</td><td>The <a class="el" href="classminxlib_1_1window.html">minxlib.window</a> to be nuked.</td></tr>
  </table>
  </dd>
</dl>
<p>This function kills the X client application that created the window w and all of its other windows and X resources. If w is not supplied by the caller, this function will kill the currently focused window.</p>
<dl class="section note"><dt>Note</dt><dd>Whereas the <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html#aa135b308c00953677da47e6406195349" title="Kill window. ">kill()</a> function attempts a graceful shutdown, this function resorts to brute force. It is meant to be used on windows that advertise support for the WM_DELETE_WINDOW protocol but don't implement it properly, thus, requiring a brute force kill (i.e., a nuking). </dd></dl>

</div>
</div>
<a class="anchor" id="a7b7d6a9ed932238e93d4939a4b890929"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.wm.wm.quit </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Quit the window manager. </p>
<p>This function sets a flag that will eventually result in Minx exiting its event loop. It is meant to be invoked via a key binding or other similar action. </p>

</div>
</div>
<a class="anchor" id="a083cf0ffb160167457fc29d838b907f1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.wm.wm.spawn </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Run specified command. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cmd</td><td>A string containing the command and command-line arguments.</td></tr>
  </table>
  </dd>
</dl>
<p>This function can be used to run arbitrary commands. Minx does not wait for the command to complete or communicate with it any further after starting it. The intent of this function is to facilitate launching GUI applications via window manager key bindings.</p>
<p>If the command fails, Minx will write details to its log (if logging has been enabled). </p>
................................................................................
</div>
</div>
<a class="anchor" id="aafe86ca729c1c4e016a62c9e827c3462"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.wm.wm.start </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>)</td><td></td>
          <td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Start the window manager. </p>
<p>Call this method after creating a wm instance to get Minx up and running. Here is an example showing how to start Minx with its default settings, key bindings, etc.:</p>
<pre class="fragment">             #!/usr/bin/env python
             import minx
             minx.core.wm().start()</pre><p>If you would like to customize Minx by specifying your own hooks to be able to deal with various events, the initialization and start-up sequence will be a three step procedure as shown below:</p>
<pre class="fragment">             #!/usr/bin/env python
 
             import minx
 
             # Define your hook functions
             def my_manage_hook(w):
                 return True # actually, you would do something more useful
 
................................................................................
 
             # Step two: customize using hooks
             wm.hooks.add('manage_hook', my_manage_hook)
             wm.hooks.add(  'F1', wm.focus_next) # custom key binding
             wm.hooks.add('S-F1', wm.focus_prev) # custom key binding
 
             # Step three: start the window manager
             wm.start()</pre> 
</div>
</div>
</div><!-- contents -->
</body>
</html>

Changes to api/classminx_1_1core_1_1xevents_1_1xevents-members.html.

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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: Member List</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>
     
   </div>
   
   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>
   
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>minx</b>      </li>
      <li class="navelem"><b>core</b>      </li>
      <li class="navelem"><b>xevents</b>      </li>
      <li class="navelem"><a class="el" href="classminx_1_1core_1_1xevents_1_1xevents.html">xevents</a>      </li>
    </ul>

  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">minx.core.xevents.xevents Member List</div>  </div>
</div><!--header-->
<div class="contents">

This is the complete list of members for <a class="el" href="classminx_1_1core_1_1xevents_1_1xevents.html">minx.core.xevents.xevents</a>, including all inherited members.<table>

  <tr class="memlist"><td><a class="el" href="classminx_1_1core_1_1xevents_1_1xevents.html#a2f3eb3f560100c4eef7da5ac01e77d6e">__init__</a></td><td><a class="el" href="classminx_1_1core_1_1xevents_1_1xevents.html">minx.core.xevents.xevents</a></td><td></td></tr>
</table></div><!-- contents -->
</body>
</html>






<


<
<
<



<
<




<
<



<

<



<

<
<
<
<
<




<
|
|
|
<
<
<
<
<
>
|
|





>
|
>
|



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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: Member List</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">


  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>

   </div>

   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>

  </td>





 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.4 -->
<div id="nav-path" class="navpath">
  <ul>





<li class="navelem"><b>minx</b></li><li class="navelem"><b>core</b></li><li class="navelem"><a class="el" href="namespaceminx_1_1core_1_1xevents.html">xevents</a></li><li class="navelem"><a class="el" href="classminx_1_1core_1_1xevents_1_1xevents.html">xevents</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">minx.core.xevents.xevents Member List</div>  </div>
</div><!--header-->
<div class="contents">

<p>This is the complete list of members for <a class="el" href="classminx_1_1core_1_1xevents_1_1xevents.html">minx.core.xevents.xevents</a>, including all inherited members.</p>
<table class="directory">
  <tr class="even"><td class="entry"><a class="el" href="classminx_1_1core_1_1xevents_1_1xevents.html#a2f3eb3f560100c4eef7da5ac01e77d6e">__init__</a></td><td class="entry"><a class="el" href="classminx_1_1core_1_1xevents_1_1xevents.html">minx.core.xevents.xevents</a></td><td class="entry"></td></tr>
</table></div><!-- contents -->
</body>
</html>

Changes to api/classminx_1_1core_1_1xevents_1_1xevents.html.

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
..
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: minx.core.xevents.xevents Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>
     
   </div>
   
   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>
   
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>minx</b>      </li>
      <li class="navelem"><b>core</b>      </li>
      <li class="navelem"><b>xevents</b>      </li>
      <li class="navelem"><a class="el" href="classminx_1_1core_1_1xevents_1_1xevents.html">xevents</a>      </li>
    </ul>

  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>

  <div class="headertitle">
<div class="title">minx.core.xevents.xevents Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Helper class for handling various X events.  
 <a href="classminx_1_1core_1_1xevents_1_1xevents.html#details">More...</a></p>

<p><a href="classminx_1_1core_1_1xevents_1_1xevents-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>

Public Member Functions</h2></td></tr>
<tr class="memitem:a2f3eb3f560100c4eef7da5ac01e77d6e"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1xevents_1_1xevents.html#a2f3eb3f560100c4eef7da5ac01e77d6e">__init__</a></td></tr>
<tr class="memdesc:a2f3eb3f560100c4eef7da5ac01e77d6e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize X event handlers.  <a href="#a2f3eb3f560100c4eef7da5ac01e77d6e"></a><br/></td></tr>

</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Helper class for handling various X events. </p>
<p>This class encapsulates the X event handlers so that the <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">main window manager object</a> can delegate this low-level functionality. This class is not really meant to be used by end-users; it should be considered internal to Minx. </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a2f3eb3f560100c4eef7da5ac01e77d6e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="classminx_1_1core_1_1xevents_1_1xevents.html#a2f3eb3f560100c4eef7da5ac01e77d6e">minx.core.xevents.xevents.__init__</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Initialize X event handlers. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">wm</td><td>The <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">main window manager object</a>.</td></tr>
  </table>
  </dd>
</dl>
<p>This class is meant to be used by <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm</a> so the main window manager object can delegate all the low-level X event handling. Consequently, the xevents object needs a reference to the main window manager object so it can access and manipulate the window manager's internal state in response to various X events. </p>

</div>
</div>
</div><!-- contents -->
</body>
</html>






<


<
<
<



<
<




<
<



<

<



<

<
<
<
<
<




<
|
|
|
<
<
<
<
<
>
|
|


|
>







<
<

<
>


|
>

|


|





|







 







<
|


|












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
..
71
72
73
74
75
76
77

78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: minx.core.xevents.xevents Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">


  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>

   </div>

   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>

  </td>





 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.4 -->
<div id="nav-path" class="navpath">
  <ul>





<li class="navelem"><b>minx</b></li><li class="navelem"><b>core</b></li><li class="navelem"><a class="el" href="namespaceminx_1_1core_1_1xevents.html">xevents</a></li><li class="navelem"><a class="el" href="classminx_1_1core_1_1xevents_1_1xevents.html">xevents</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classminx_1_1core_1_1xevents_1_1xevents-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">minx.core.xevents.xevents Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Helper class for handling various X events.  
 <a href="classminx_1_1core_1_1xevents_1_1xevents.html#details">More...</a></p>


<table class="memberdecls">

<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a2f3eb3f560100c4eef7da5ac01e77d6e"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminx_1_1core_1_1xevents_1_1xevents.html#a2f3eb3f560100c4eef7da5ac01e77d6e">__init__</a></td></tr>
<tr class="memdesc:a2f3eb3f560100c4eef7da5ac01e77d6e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize X event handlers.  <a href="#a2f3eb3f560100c4eef7da5ac01e77d6e">More...</a><br/></td></tr>
<tr class="separator:a2f3eb3f560100c4eef7da5ac01e77d6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Helper class for handling various X events. </p>
<p>This class encapsulates the X event handlers so that the <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">main window manager object</a> can delegate this low-level functionality. This class is not really meant to be used by end-users; it should be considered internal to Minx. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a2f3eb3f560100c4eef7da5ac01e77d6e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def minx.core.xevents.xevents.__init__ </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Initialize X event handlers. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">wm</td><td>The <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">main window manager object</a>.</td></tr>
  </table>
  </dd>
</dl>
<p>This class is meant to be used by <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm</a> so the main window manager object can delegate all the low-level X event handling. Consequently, the xevents object needs a reference to the main window manager object so it can access and manipulate the window manager's internal state in response to various X events. </p>

</div>
</div>
</div><!-- contents -->
</body>
</html>

Changes to api/classminxlib_1_1display-members.html.

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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: Member List</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>
     
   </div>
   
   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>
   
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>minxlib</b>      </li>
      <li class="navelem"><a class="el" href="classminxlib_1_1display.html">display</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">minxlib::display Member List</div>  </div>
</div><!--header-->
<div class="contents">

This is the complete list of members for <a class="el" href="classminxlib_1_1display.html">minxlib::display</a>, including all inherited members.<table>


  <tr class="memlist"><td><a class="el" href="classminxlib_1_1display.html#abf98b9c3ed1be571ac67f4d81299ac80">display</a>(const std::string &amp;name=std::string(), bool sync=false)</td><td><a class="el" href="classminxlib_1_1display.html">minxlib::display</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1display.html#a802de60bfccd522260e7017375107383">get_event</a>()</td><td><a class="el" href="classminxlib_1_1display.html">minxlib::display</a></td><td></td></tr>

  <tr class="memlist"><td><a class="el" href="classminxlib_1_1display.html#a3f17b5a341887db1a1efe32484579434">get_keyboard_mapping</a>()</td><td><a class="el" href="classminxlib_1_1display.html">minxlib::display</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1display.html#abc56c11989510e79c5d0250691736037">get_root_windows</a>()</td><td><a class="el" href="classminxlib_1_1display.html">minxlib::display</a></td><td></td></tr>

  <tr class="memlist"><td><a class="el" href="classminxlib_1_1display.html#a3ddcc8ecc83546b53e51cd5b71107759">get_top_level_windows</a>()</td><td><a class="el" href="classminxlib_1_1display.html">minxlib::display</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1display.html#ac8731d30891e0a85aafb9cfff9637f2d">pythonize</a>()</td><td><a class="el" href="classminxlib_1_1display.html">minxlib::display</a></td><td><code> [static]</code></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1display.html#ad4907e4c464734da00672b8b8eecc712">xlib</a>()</td><td><a class="el" href="classminxlib_1_1display.html">minxlib::display</a></td><td><code> [inline]</code></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1display.html#a0047f94fe48bf363cbf1fdae8e750ec2">~display</a>()</td><td><a class="el" href="classminxlib_1_1display.html">minxlib::display</a></td><td></td></tr>
</table></div><!-- contents -->
</body>
</html>






<


<
<
<



<
<




<
<



<

<



<

<
<
<
<
<




<
|
|
|
<
|
<
|
|





>
|
>
>
|
|
>
|
<
>
|
|
<
|



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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: Member List</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">


  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>

   </div>

   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>

  </td>





 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.4 -->
<div id="nav-path" class="navpath">
  <ul>

<li class="navelem"><b>minxlib</b></li><li class="navelem"><a class="el" href="classminxlib_1_1display.html">display</a></li>  </ul>

</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">minxlib::display Member List</div>  </div>
</div><!--header-->
<div class="contents">

<p>This is the complete list of members for <a class="el" href="classminxlib_1_1display.html">minxlib::display</a>, including all inherited members.</p>
<table class="directory">
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1display.html#a11cefbd347e06c34e5231815a71aaa9e">create_window</a>(const window &amp;p, int x, int y, int w, int h)</td><td class="entry"><a class="el" href="classminxlib_1_1display.html">minxlib::display</a></td><td class="entry"></td></tr>
  <tr><td class="entry"><a class="el" href="classminxlib_1_1display.html#abf98b9c3ed1be571ac67f4d81299ac80">display</a>(const std::string &amp;name=std::string(), bool sync=false)</td><td class="entry"><a class="el" href="classminxlib_1_1display.html">minxlib::display</a></td><td class="entry"></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1display.html#a802de60bfccd522260e7017375107383">get_event</a>()</td><td class="entry"><a class="el" href="classminxlib_1_1display.html">minxlib::display</a></td><td class="entry"></td></tr>
  <tr><td class="entry"><a class="el" href="classminxlib_1_1display.html#a7bcefebb3bc9fb9e52912ad30aec73dc">get_focused_window</a>()</td><td class="entry"><a class="el" href="classminxlib_1_1display.html">minxlib::display</a></td><td class="entry"></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1display.html#a3f17b5a341887db1a1efe32484579434">get_keyboard_mapping</a>()</td><td class="entry"><a class="el" href="classminxlib_1_1display.html">minxlib::display</a></td><td class="entry"></td></tr>

  <tr><td class="entry"><a class="el" href="classminxlib_1_1display.html#aacba3ed6a8a59419595c72d54afb347b">get_root_windows</a>()</td><td class="entry"><a class="el" href="classminxlib_1_1display.html">minxlib::display</a></td><td class="entry"></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1display.html#a3ddcc8ecc83546b53e51cd5b71107759">get_top_level_windows</a>()</td><td class="entry"><a class="el" href="classminxlib_1_1display.html">minxlib::display</a></td><td class="entry"></td></tr>
  <tr><td class="entry"><a class="el" href="classminxlib_1_1display.html#ac8731d30891e0a85aafb9cfff9637f2d">pythonize</a>()</td><td class="entry"><a class="el" href="classminxlib_1_1display.html">minxlib::display</a></td><td class="entry"><span class="mlabel">static</span></td></tr>

  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1display.html#a0047f94fe48bf363cbf1fdae8e750ec2">~display</a>()</td><td class="entry"><a class="el" href="classminxlib_1_1display.html">minxlib::display</a></td><td class="entry"></td></tr>
</table></div><!-- contents -->
</body>
</html>

Changes to api/classminxlib_1_1display.html.

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
...
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160




























































161
162
163
164
165
166
167
168



















169
170
171
172
173
174

175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218

219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245



246
247
248

249
250
251

252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277

278
279
280
281
282
283

284
285
286
287
288
289
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: minxlib::display Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>
     
   </div>
   
   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>
   
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>minxlib</b>      </li>
      <li class="navelem"><a class="el" href="classminxlib_1_1display.html">display</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a>  </div>

  <div class="headertitle">
<div class="title">minxlib::display Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Encapsulate the details of the connection to the X server.  
 <a href="classminxlib_1_1display.html#details">More...</a></p>

<p><code>#include &lt;display.hh&gt;</code></p>

<p><a href="classminxlib_1_1display-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>

Public Member Functions</h2></td></tr>
<tr class="memitem:abf98b9c3ed1be571ac67f4d81299ac80"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1display.html#abf98b9c3ed1be571ac67f4d81299ac80">display</a> (const std::string &amp;name=std::string(), bool sync=false)</td></tr>
<tr class="memdesc:abf98b9c3ed1be571ac67f4d81299ac80"><td class="mdescLeft">&#160;</td><td class="mdescRight">Open a connection to the X server.  <a href="#abf98b9c3ed1be571ac67f4d81299ac80"></a><br/></td></tr>
<tr class="memitem:ad4907e4c464734da00672b8b8eecc712"><td class="memItemLeft" align="right" valign="top">Display *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1display.html#ad4907e4c464734da00672b8b8eecc712">xlib</a> ()</td></tr>
<tr class="memdesc:ad4907e4c464734da00672b8b8eecc712"><td class="mdescLeft">&#160;</td><td class="mdescRight">"Convert" a display object to a Display*.  <a href="#ad4907e4c464734da00672b8b8eecc712"></a><br/></td></tr>

<tr class="memitem:a0047f94fe48bf363cbf1fdae8e750ec2"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1display.html#a0047f94fe48bf363cbf1fdae8e750ec2">~display</a> ()</td></tr>
<tr class="memdesc:a0047f94fe48bf363cbf1fdae8e750ec2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Close the connection to the X server.  <a href="#a0047f94fe48bf363cbf1fdae8e750ec2"></a><br/></td></tr>




<tr class="memitem:abc56c11989510e79c5d0250691736037"><td class="memItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="classminxlib_1_1window.html">window</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1display.html#abc56c11989510e79c5d0250691736037">get_root_windows</a> ()</td></tr>
<tr class="memdesc:abc56c11989510e79c5d0250691736037"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the list of root windows.  <a href="#abc56c11989510e79c5d0250691736037"></a><br/></td></tr>

<tr class="memitem:a3ddcc8ecc83546b53e51cd5b71107759"><td class="memItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="classminxlib_1_1window.html">window</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1display.html#a3ddcc8ecc83546b53e51cd5b71107759">get_top_level_windows</a> ()</td></tr>
<tr class="memdesc:a3ddcc8ecc83546b53e51cd5b71107759"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve top-level windows across all screens.  <a href="#a3ddcc8ecc83546b53e51cd5b71107759"></a><br/></td></tr>




<tr class="memitem:a3f17b5a341887db1a1efe32484579434"><td class="memItemLeft" align="right" valign="top">std::vector&lt; std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1display.html#a3f17b5a341887db1a1efe32484579434">get_keyboard_mapping</a> ()</td></tr>
<tr class="memdesc:a3f17b5a341887db1a1efe32484579434"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve currently supported keysyms in string form.  <a href="#a3f17b5a341887db1a1efe32484579434"></a><br/></td></tr>

<tr class="memitem:a802de60bfccd522260e7017375107383"><td class="memItemLeft" align="right" valign="top">boost::shared_ptr&lt; <a class="el" href="structminxlib_1_1event.html">event</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1display.html#a802de60bfccd522260e7017375107383">get_event</a> ()</td></tr>
<tr class="memdesc:a802de60bfccd522260e7017375107383"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the next event from the X server.  <a href="#a802de60bfccd522260e7017375107383"></a><br/></td></tr>


<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:ac8731d30891e0a85aafb9cfff9637f2d"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1display.html#ac8731d30891e0a85aafb9cfff9637f2d">pythonize</a> ()</td></tr>
<tr class="memdesc:ac8731d30891e0a85aafb9cfff9637f2d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Export the display class to minxlib Python module.  <a href="#ac8731d30891e0a85aafb9cfff9637f2d"></a><br/></td></tr>

</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Encapsulate the details of the connection to the X server. </p>
<p>This class provides an API for the Python parts of Minx to be able to talk to the display server. It wraps around the relevant parts of Xlib and exposes its functionality to Python via <a href="http://www.boost.org/libs/python/doc/">Boost.Python</a>.</p>
<p>This class is meant to be used by the <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm</a> Python class. When end-user Minx configs start-up the window manager, they will instantiate minx.core.wm, which, in turn, will create an instance of <a class="el" href="classminxlib_1_1display.html" title="Encapsulate the details of the connection to the X server.">minxlib::display</a> to establish the connection to the X server.</p>
<dl class="section note"><dt>Note:</dt><dd>This class should only be instantiated once and really should not be subclassed. However, there is nothing in its implementation to prevent you from creating multiple <a class="el" href="classminxlib_1_1display.html" title="Encapsulate the details of the connection to the X server.">minxlib::display</a> objects or from subclassing it.</dd></dl>
<dl class="section user"><dt></b></dt><dd>Nonetheless, it is rare to ever want to have more than one instance of this class, to subclass it, or to want to access it from multiple thread contexts. If you need to do such things, you will have to take care of the details of tracking the multiple connections, accessing them from different threads, etc.</dd></dl>
<dl class="section user"><dt></b></dt><dd>In short, don't do these funky things; minxlib and the minx library are not designed for it and you really shouldn't need such functionality anyway (multithreaded window manager with multiple connections to the X server? really? why? don't you have enough problems in your life already?). </dd></dl>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="abf98b9c3ed1be571ac67f4d81299ac80"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classminxlib_1_1display.html#abf98b9c3ed1be571ac67f4d81299ac80">minxlib::display::display</a> </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em> = <code>std::string()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Open a connection to the X server. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>Name of the X server. </td></tr>
    <tr><td class="paramname">sync</td><td>Flag for synchronizing Xlib requests. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>A valid connection to the display server.</dd></dl>
<p>Instantiating a <a class="el" href="classminxlib_1_1display.html" title="Encapsulate the details of the connection to the X server.">minxlib::display</a> object automatically sets up a connection to the X server. If the connection fails, a <a class="el" href="structminxlib_1_1connection__error.html" title="An exception object to indicate failure to connect to X server.">connection_error</a> will be thrown.</p>
<p>The name parameter will usually be an empty string, in which case, the contructor will connect to the X server specified by the DISPLAY environment variable. If specified, it should be something like "host:0.0". Look up X server and Xlib documentation to get the low-down on this.</p>
<p>The sync flag indicates whether we want Xlib requests to be synchronous or not. By default, it is false, i.e., Xlib requests are buffered. Turning synchronization on is useful for debugging. Note that the choice between synchronous and buffered mode of operation is decided at creation time. That is, it cannot be toggled after a display object has been instantiated.</p>
<p>In addition to establishing the connection to the display server, this constructor will also setup Xlib error handlers. When the X server flags errors by invoking the handlers, they will be reported to Python clients via appropriate <a class="el" href="group__grp__minxlib__exceptions.html">Python exceptions</a>.</p>
<p>In case a fatal error is reported, clients are expected to clean-up and then terminate the process. The display object will become unusable after a <a class="el" href="structminxlib_1_1fatal__error.html" title="An exception object to indicate a fatal X error.">fatal_error</a> exception is thrown. Any attempt to use it after a fatal error will result in continued <a class="el" href="structminxlib_1_1fatal__error.html" title="An exception object to indicate a fatal X error.">fatal_error</a> exceptions. </p>

</div>
</div>
<a class="anchor" id="a0047f94fe48bf363cbf1fdae8e750ec2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classminxlib_1_1display.html#a0047f94fe48bf363cbf1fdae8e750ec2">minxlib::display::~display</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Close the connection to the X server. </p>
<dl class="section return"><dt>Returns:</dt><dd>Nothing.</dd></dl>
<p>When a display object is destroyed, it will automatically sever its connection to the display server. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>




























































<a class="anchor" id="a802de60bfccd522260e7017375107383"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">boost::shared_ptr&lt;<a class="el" href="structminxlib_1_1event.html">event</a>&gt; <a class="el" href="classminxlib_1_1display.html#a802de60bfccd522260e7017375107383">minxlib::display::get_event</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>



















          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">


<p>Retrieve the next event from the X server. </p>
<dl class="section return"><dt>Returns:</dt><dd>A <a class="el" href="structminxlib_1_1event.html" title="A generic X event, i.e., XAnyEvent.">minxlib::event</a> object describing the X event.</dd></dl>
<p>This function removes the next event from the X event queue and returns it to its caller via an instance of a subclass of <a class="el" href="structminxlib_1_1event.html" title="A generic X event, i.e., XAnyEvent.">minxlib::event</a>. This function is meant to be used by <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm</a> in its event loop. </p>

</div>
</div>
<a class="anchor" id="a3f17b5a341887db1a1efe32484579434"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;std::string&gt; <a class="el" href="classminxlib_1_1display.html#a3f17b5a341887db1a1efe32484579434">minxlib::display::get_keyboard_mapping</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Retrieve currently supported keysyms in string form. </p>
<dl class="section return"><dt>Returns:</dt><dd>List of strings containing current keysyms.</dd></dl>
<p>The X server assigns unique integer codes to each physical key on the keyboard. However, since different keyboard models and brands can have different keycodes, applications usually deal with keysyms, which are the symbols on the key caps (this is an oversimplification, but good enough for explanatory purposes).</p>
<p>This function queries the X server for its mapping between keycodes and keysyms, converts the keysyms to strings, and returns the resulting list. </p>

</div>
</div>
<a class="anchor" id="abc56c11989510e79c5d0250691736037"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;<a class="el" href="classminxlib_1_1window.html">window</a>&gt; <a class="el" href="classminxlib_1_1display.html#abc56c11989510e79c5d0250691736037">minxlib::display::get_root_windows</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Retrieve the list of root windows. </p>
<dl class="section return"><dt>Returns:</dt><dd>List of root windows.</dd></dl>
<p>This function queries the X server for all its screens and their corresponding root windows. The returned list holds the root windows in the screen order, i.e., the first element of the list is the root window for the first screen, the second is the root window for the second screen, so on and so forth. </p>


</div>
</div>
<a class="anchor" id="a3ddcc8ecc83546b53e51cd5b71107759"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;<a class="el" href="classminxlib_1_1window.html">window</a>&gt; <a class="el" href="classminxlib_1_1display.html#a3ddcc8ecc83546b53e51cd5b71107759">minxlib::display::get_top_level_windows</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Retrieve top-level windows across all screens. </p>
<dl class="section return"><dt>Returns:</dt><dd>List of top-level windows.</dd></dl>
<p>This function queries the X server for all the top-level windows on all screens. Do not rely on the returned list being in any particular order.</p>
<p>This function is meant to be used by <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm</a> just before it enters its event loop so that Minx can manage any extant top-level windows that were created before Minx was started. </p>

</div>
</div>
<a class="anchor" id="ac8731d30891e0a85aafb9cfff9637f2d"></a>
<div class="memitem">
<div class="memproto">



      <table class="memname">
        <tr>
          <td class="memname">static void <a class="el" href="classminxlib_1_1display.html#ac8731d30891e0a85aafb9cfff9637f2d">minxlib::display::pythonize</a> </td>

          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static]</code></td>

        </tr>
      </table>
</div>
<div class="memdoc">

<p>Export the display class to minxlib Python module. </p>
<dl class="section return"><dt>Returns:</dt><dd>Nothing.</dd></dl>
<p>This function exposes the display class's interface so that it can be used by the Python parts of Minx. It is meant to be called by the Boost.Python initialization code in python.cc. </p>

</div>
</div>
<a class="anchor" id="ad4907e4c464734da00672b8b8eecc712"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Display* <a class="el" href="classminxlib_1_1display.html#ad4907e4c464734da00672b8b8eecc712">minxlib::display::xlib</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>"Convert" a display object to a Display*. </p>

<dl class="section return"><dt>Returns:</dt><dd>Display* corresponding to this display object.</dd></dl>
<p>Need this when we have to make Xlib calls from classes such as <a class="el" href="classminxlib_1_1window.html" title="Encapsulate the details of an X window.">minxlib::window</a>.</p>
<dl class="section note"><dt>Note:</dt><dd>This function is only used inside of minxlib, i.e., by the C++ side of Minx.</dd></dl>
<dl class="section user"><dt></b></dt><dd>We could make this a cast operator. But then we would have to pass references to <a class="el" href="classminxlib_1_1display.html" title="Encapsulate the details of the connection to the X server.">minxlib::display</a> objects to classes such as <a class="el" href="classminxlib_1_1window.html" title="Encapsulate the details of an X window.">minxlib::window</a>. And that would not really work if we need to use the assignment operator on window objects (e.g., storing in an std::vector) because C++ doesn't allow references to be assigned.</dd></dl>
<dl class="section user"><dt></b></dt><dd>Therefore, the only other alternative would be to dereference the <a class="el" href="classminxlib_1_1display.html" title="Encapsulate the details of the connection to the X server.">minxlib::display</a>* object in the <a class="el" href="classminxlib_1_1window.html" title="Encapsulate the details of an X window.">minxlib::window</a> methods to trigger the automatic cast from <a class="el" href="classminxlib_1_1display.html" title="Encapsulate the details of the connection to the X server.">minxlib::display</a>* to Xlib's Display*. But that is certainly not clearer than calling an explicit get method like this one and is no less aesthetic.</dd></dl>
<dl class="section note"><dt>Note:</dt><dd>Maybe we can avoid this entire hassle by simply passing Display* to the <a class="el" href="classminxlib_1_1window.html" title="Encapsulate the details of an X window.">minxlib::window</a> constructor? The only trouble with that would be in case <a class="el" href="classminxlib_1_1window.html" title="Encapsulate the details of an X window.">minxlib::window</a> ends up needing some API from this class. For now, leaving this getter in place... </dd></dl>


</div>
</div>
</div><!-- contents -->
</body>
</html>






<


<
<
<



<
<




<
<



<

<



<

<
<
<
<
<




<
|
|
|
<
|
<
|
|



|
>









<
<

<
>


|
<
<
>

|
>
>
>
>
|
|
>

|
>
>
>
>

|
>

|
>
>
|


|
>

|


|
|
|
|
|





|







 







<
|


|






|
|



|








|

|



<
|


|




|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>





|

|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>



<
|

>
|
|
|








|

|



<
|


|





|




|

|



<
|


|
|
>








|

|



<
|


|








>
>
>


<
>

|
<
>


|
|
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
|
|
<
|

<
>
|
<
<
<
<
<
>






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
...
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
133
134
135
136
137
138
139
140
141

142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240

241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260

261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280

281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300

301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317

318
319
320

321
322
323
324
325



326












327
328

329
330

331
332





333
334
335
336
337
338
339
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: minxlib::display Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">


  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>

   </div>

   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>

  </td>





 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.4 -->
<div id="nav-path" class="navpath">
  <ul>

<li class="navelem"><b>minxlib</b></li><li class="navelem"><a class="el" href="classminxlib_1_1display.html">display</a></li>  </ul>

</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="classminxlib_1_1display-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">minxlib::display Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Encapsulate the details of the connection to the X server.  
 <a href="classminxlib_1_1display.html#details">More...</a></p>

<p><code>#include &lt;display.hh&gt;</code></p>


<table class="memberdecls">

<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:abf98b9c3ed1be571ac67f4d81299ac80"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1display.html#abf98b9c3ed1be571ac67f4d81299ac80">display</a> (const std::string &amp;name=std::string(), bool sync=false)</td></tr>
<tr class="memdesc:abf98b9c3ed1be571ac67f4d81299ac80"><td class="mdescLeft">&#160;</td><td class="mdescRight">Open a connection to the X server.  <a href="#abf98b9c3ed1be571ac67f4d81299ac80">More...</a><br/></td></tr>


<tr class="separator:abf98b9c3ed1be571ac67f4d81299ac80"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0047f94fe48bf363cbf1fdae8e750ec2"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1display.html#a0047f94fe48bf363cbf1fdae8e750ec2">~display</a> ()</td></tr>
<tr class="memdesc:a0047f94fe48bf363cbf1fdae8e750ec2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Close the connection to the X server.  <a href="#a0047f94fe48bf363cbf1fdae8e750ec2">More...</a><br/></td></tr>
<tr class="separator:a0047f94fe48bf363cbf1fdae8e750ec2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11cefbd347e06c34e5231815a71aaa9e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classminxlib_1_1window.html">window</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1display.html#a11cefbd347e06c34e5231815a71aaa9e">create_window</a> (const <a class="el" href="classminxlib_1_1window.html">window</a> &amp;p, int x, int y, int w, int h)</td></tr>
<tr class="memdesc:a11cefbd347e06c34e5231815a71aaa9e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a window.  <a href="#a11cefbd347e06c34e5231815a71aaa9e">More...</a><br/></td></tr>
<tr class="separator:a11cefbd347e06c34e5231815a71aaa9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aacba3ed6a8a59419595c72d54afb347b"><td class="memItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="classminxlib_1_1root__window.html">root_window</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1display.html#aacba3ed6a8a59419595c72d54afb347b">get_root_windows</a> ()</td></tr>
<tr class="memdesc:aacba3ed6a8a59419595c72d54afb347b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the list of root windows.  <a href="#aacba3ed6a8a59419595c72d54afb347b">More...</a><br/></td></tr>
<tr class="separator:aacba3ed6a8a59419595c72d54afb347b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ddcc8ecc83546b53e51cd5b71107759"><td class="memItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="classminxlib_1_1window.html">window</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1display.html#a3ddcc8ecc83546b53e51cd5b71107759">get_top_level_windows</a> ()</td></tr>
<tr class="memdesc:a3ddcc8ecc83546b53e51cd5b71107759"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve top-level windows across all screens.  <a href="#a3ddcc8ecc83546b53e51cd5b71107759">More...</a><br/></td></tr>
<tr class="separator:a3ddcc8ecc83546b53e51cd5b71107759"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7bcefebb3bc9fb9e52912ad30aec73dc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classminxlib_1_1window.html">window</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1display.html#a7bcefebb3bc9fb9e52912ad30aec73dc">get_focused_window</a> ()</td></tr>
<tr class="memdesc:a7bcefebb3bc9fb9e52912ad30aec73dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the window with the input focus.  <a href="#a7bcefebb3bc9fb9e52912ad30aec73dc">More...</a><br/></td></tr>
<tr class="separator:a7bcefebb3bc9fb9e52912ad30aec73dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f17b5a341887db1a1efe32484579434"><td class="memItemLeft" align="right" valign="top">std::vector&lt; std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1display.html#a3f17b5a341887db1a1efe32484579434">get_keyboard_mapping</a> ()</td></tr>
<tr class="memdesc:a3f17b5a341887db1a1efe32484579434"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve currently supported keysyms in string form.  <a href="#a3f17b5a341887db1a1efe32484579434">More...</a><br/></td></tr>
<tr class="separator:a3f17b5a341887db1a1efe32484579434"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a802de60bfccd522260e7017375107383"><td class="memItemLeft" align="right" valign="top">boost::shared_ptr&lt; <a class="el" href="structminxlib_1_1event.html">event</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1display.html#a802de60bfccd522260e7017375107383">get_event</a> ()</td></tr>
<tr class="memdesc:a802de60bfccd522260e7017375107383"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the next event from the X server.  <a href="#a802de60bfccd522260e7017375107383">More...</a><br/></td></tr>
<tr class="separator:a802de60bfccd522260e7017375107383"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:ac8731d30891e0a85aafb9cfff9637f2d"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1display.html#ac8731d30891e0a85aafb9cfff9637f2d">pythonize</a> ()</td></tr>
<tr class="memdesc:ac8731d30891e0a85aafb9cfff9637f2d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Export the display class to minxlib Python module.  <a href="#ac8731d30891e0a85aafb9cfff9637f2d">More...</a><br/></td></tr>
<tr class="separator:ac8731d30891e0a85aafb9cfff9637f2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Encapsulate the details of the connection to the X server. </p>
<p>This class provides an API for the Python parts of Minx to be able to talk to the display server. It wraps around the relevant parts of Xlib and exposes its functionality to Python via <a href="http://www.boost.org/libs/python/doc/">Boost.Python</a>.</p>
<p>This class is meant to be used by the <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm</a> Python class. When end-user Minx configs start-up the window manager, they will instantiate <a class="el" href="namespaceminx_1_1core_1_1wm.html" title="Main interface object for Minx&#39;s end-users. ">minx.core.wm</a>, which, in turn, will create an instance of <a class="el" href="classminxlib_1_1display.html" title="Encapsulate the details of the connection to the X server. ">minxlib::display</a> to establish the connection to the X server.</p>
<dl class="section note"><dt>Note</dt><dd>This class should only be instantiated once and really should not be subclassed. However, there is nothing in its implementation to prevent you from creating multiple <a class="el" href="classminxlib_1_1display.html" title="Encapsulate the details of the connection to the X server. ">minxlib::display</a> objects or from subclassing it.</dd></dl>
<dl class="section user"><dt></dt><dd>Nonetheless, it is rare to ever want to have more than one instance of this class, to subclass it, or to want to access it from multiple thread contexts. If you need to do such things, you will have to take care of the details of tracking the multiple connections, accessing them from different threads, etc.</dd></dl>
<dl class="section user"><dt></dt><dd>In short, don't do these funky things; minxlib and the minx library are not designed for it and you really shouldn't need such functionality anyway (multithreaded window manager with multiple connections to the X server? really? why? don't you have enough problems in your life already?). </dd></dl>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="abf98b9c3ed1be571ac67f4d81299ac80"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">minxlib::display::display </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em> = <code>std::string()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Open a connection to the X server. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>Name of the X server. </td></tr>
    <tr><td class="paramname">sync</td><td>Flag for synchronizing Xlib requests. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A valid connection to the display server.</dd></dl>
<p>Instantiating a <a class="el" href="classminxlib_1_1display.html" title="Encapsulate the details of the connection to the X server. ">minxlib::display</a> object automatically sets up a connection to the X server. If the connection fails, a <a class="el" href="structminxlib_1_1connection__error.html" title="An exception object to indicate failure to connect to X server. ">connection_error</a> will be thrown.</p>
<p>The name parameter will usually be an empty string, in which case, the contructor will connect to the X server specified by the DISPLAY environment variable. If specified, it should be something like "host:0.0". Look up X server and Xlib documentation to get the low-down on this.</p>
<p>The sync flag indicates whether we want Xlib requests to be synchronous or not. By default, it is false, i.e., Xlib requests are buffered. Turning synchronization on is useful for debugging. Note that the choice between synchronous and buffered mode of operation is decided at creation time. That is, it cannot be toggled after a display object has been instantiated.</p>
<p>In addition to establishing the connection to the display server, this constructor will also setup Xlib error handlers. When the X server flags errors by invoking the handlers, they will be reported to Python clients via appropriate <a class="el" href="group__grp__minxlib__exceptions.html">Python exceptions</a>.</p>
<p>In case a fatal error is reported, clients are expected to clean-up and then terminate the process. The display object will become unusable after a <a class="el" href="structminxlib_1_1fatal__error.html" title="An exception object to indicate a fatal X error. ">fatal_error</a> exception is thrown. Any attempt to use it after a fatal error will result in continued <a class="el" href="structminxlib_1_1fatal__error.html" title="An exception object to indicate a fatal X error. ">fatal_error</a> exceptions. </p>

</div>
</div>
<a class="anchor" id="a0047f94fe48bf363cbf1fdae8e750ec2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">minxlib::display::~display </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Close the connection to the X server. </p>
<dl class="section return"><dt>Returns</dt><dd>Nothing.</dd></dl>
<p>When a display object is destroyed, it will automatically sever its connection to the display server. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a11cefbd347e06c34e5231815a71aaa9e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classminxlib_1_1window.html">window</a> minxlib::display::create_window </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classminxlib_1_1window.html">window</a> &amp;&#160;</td>
          <td class="paramname"><em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a window. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">p</td><td>The new window's parent window. </td></tr>
    <tr><td class="paramname">x</td><td>The x-coordinate of the new window's origin. </td></tr>
    <tr><td class="paramname">y</td><td>The y-coordinate of the new window's origin. </td></tr>
    <tr><td class="paramname">w</td><td>The new window's width. </td></tr>
    <tr><td class="paramname">h</td><td>The new window's height. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The newly created window.</dd></dl>
<p>This function creates a new window by calling XCreateSimpleWindow(), wraps the result in a <a class="el" href="classminxlib_1_1window.html" title="Encapsulate the details of an X window. ">minxlib::window</a> object and returns that.</p>
<p>The parameter p <b>must</b> be an existing window; x and y are relative to the parent's origin.</p>
<dl class="section note"><dt>Note</dt><dd>Although this function can churn out arbitrary windows parented by arbitrary other windows, end-user code should most definitely not abuse it in that manner. It is meant to be used only to create layouts. </dd></dl>

</div>
</div>
<a class="anchor" id="a802de60bfccd522260e7017375107383"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">boost::shared_ptr&lt;<a class="el" href="structminxlib_1_1event.html">event</a>&gt; minxlib::display::get_event </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Retrieve the next event from the X server. </p>
<dl class="section return"><dt>Returns</dt><dd>A <a class="el" href="structminxlib_1_1event.html" title="A generic X event, i.e., XAnyEvent. ">minxlib::event</a> object describing the X event.</dd></dl>
<p>This function removes the next event from the X event queue and returns it to its caller via an instance of a subclass of <a class="el" href="structminxlib_1_1event.html" title="A generic X event, i.e., XAnyEvent. ">minxlib::event</a>. This function is meant to be used by <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm</a> in its event loop. </p>

</div>
</div>
<a class="anchor" id="a7bcefebb3bc9fb9e52912ad30aec73dc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classminxlib_1_1window.html">window</a> minxlib::display::get_focused_window </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Get the window with the input focus. </p>
<dl class="section return"><dt>Returns</dt><dd>Currently focused window.</dd></dl>
<p>This function uses XGetInputFocus() to determine which X window currently has the input focus and returns that wrapped in a <a class="el" href="classminxlib_1_1window.html">minxlib::window</a> object.</p>
<p>If no window has the input focus, this function will return a window with the ID zero. </p>

</div>
</div>
<a class="anchor" id="a3f17b5a341887db1a1efe32484579434"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;std::string&gt; minxlib::display::get_keyboard_mapping </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Retrieve currently supported keysyms in string form. </p>
<dl class="section return"><dt>Returns</dt><dd>List of strings containing current keysyms.</dd></dl>
<p>The X server assigns unique integer codes to each physical key on the keyboard. However, since different keyboard models and brands can have different keycodes, applications usually deal with keysyms, which are the symbols on the key caps (this is an oversimplification, but good enough for explanatory purposes).</p>
<p>This function queries the X server for its mapping between keycodes and keysyms, converts the keysyms to strings, and returns the resulting list. </p>

</div>
</div>
<a class="anchor" id="aacba3ed6a8a59419595c72d54afb347b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;<a class="el" href="classminxlib_1_1root__window.html">root_window</a>&gt; minxlib::display::get_root_windows </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Retrieve the list of root windows. </p>
<dl class="section return"><dt>Returns</dt><dd>List of root windows.</dd></dl>
<p>This function queries the X server for all its screens and their corresponding root windows. The returned list holds the root windows in the screen order, i.e., the first element of the list is the root window for the first screen, the second is the root window for the second screen, so on and so forth.</p>
<dl class="section note"><dt>Note</dt><dd>On multi-head setups with Xinerama, there is only one screen, and, thus, only one root window as far as the X server is concerned. Nonetheless, this function will still return as many root windows as there are physical monitors; each of these root windows will have the same window ID, but their geometries will be different. </dd></dl>

</div>
</div>
<a class="anchor" id="a3ddcc8ecc83546b53e51cd5b71107759"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;<a class="el" href="classminxlib_1_1window.html">window</a>&gt; minxlib::display::get_top_level_windows </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Retrieve top-level windows across all screens. </p>
<dl class="section return"><dt>Returns</dt><dd>List of top-level windows.</dd></dl>
<p>This function queries the X server for all the top-level windows on all screens. Do not rely on the returned list being in any particular order.</p>
<p>This function is meant to be used by <a class="el" href="classminx_1_1core_1_1wm_1_1wm.html">minx.core.wm</a> just before it enters its event loop so that Minx can manage any extant top-level windows that were created before Minx was started. </p>

</div>
</div>
<a class="anchor" id="ac8731d30891e0a85aafb9cfff9637f2d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>

          <td class="memname">static void minxlib::display::pythonize </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>

          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">



<span class="mlabels"><span class="mlabel">static</span></span>  </td>












  </tr>
</table>

</div><div class="memdoc">


<p>Export the display class to minxlib Python module. </p>
<dl class="section return"><dt>Returns</dt><dd>Nothing.</dd></dl>





<p>This function exposes the display class's interface so that it can be used by the Python parts of Minx. It is meant to be called by the Boost.Python initialization code in python.cc. </p>

</div>
</div>
</div><!-- contents -->
</body>
</html>

Changes to api/classminxlib_1_1exception-members.html.

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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: Member List</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>
     
   </div>
   
   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>
   
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>minxlib</b>      </li>
      <li class="navelem"><a class="el" href="classminxlib_1_1exception.html">exception</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">minxlib::exception Member List</div>  </div>
</div><!--header-->
<div class="contents">

This is the complete list of members for <a class="el" href="classminxlib_1_1exception.html">minxlib::exception</a>, including all inherited members.<table>

  <tr class="memlist"><td><a class="el" href="classminxlib_1_1exception.html#aa76ca68d415e3bbeb1d423991bef9c97">exception</a>(const std::string &amp;msg)</td><td><a class="el" href="classminxlib_1_1exception.html">minxlib::exception</a></td><td><code> [protected]</code></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1exception.html#ad36ee2c4397ea2e303dd7ede93a23c88">get_py_exception</a>(type_info t)</td><td><a class="el" href="classminxlib_1_1exception.html">minxlib::exception</a></td><td><code> [protected, static]</code></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1exception.html#aa9a683a09c153fba37a4175795bd34ba">py_func</a> typedef</td><td><a class="el" href="classminxlib_1_1exception.html">minxlib::exception</a></td><td><code> [protected]</code></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1exception.html#ae46edf2b53b99f6b53285998a9fe43b3">pythonize</a>()</td><td><a class="el" href="classminxlib_1_1exception.html">minxlib::exception</a></td><td><code> [static]</code></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1exception.html#a62bc45a4fd6dea3e493f89f89636d099">register_pythonize</a>(type_info t, py_func f)</td><td><a class="el" href="classminxlib_1_1exception.html">minxlib::exception</a></td><td><code> [protected, static]</code></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1exception.html#a03985b0cfe4604adfa7ba762936787fe">register_translator</a>()</td><td><a class="el" href="classminxlib_1_1exception.html">minxlib::exception</a></td><td><code> [inline, protected, static]</code></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1exception.html#aecf78e2c91fcef663b598c32d18fdd2e">set_py_exception</a>(type_info t, PyObject *e)</td><td><a class="el" href="classminxlib_1_1exception.html">minxlib::exception</a></td><td><code> [protected, static]</code></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1exception.html#afe75d463bda0934668ae3ddad164d3fe">translate</a>(const T &amp;e)</td><td><a class="el" href="classminxlib_1_1exception.html">minxlib::exception</a></td><td><code> [protected, static]</code></td></tr>

  <tr class="memlist"><td><a class="el" href="classminxlib_1_1exception.html#a07ea942f6868e483d41588b5187f76cf">~exception</a>()</td><td><a class="el" href="classminxlib_1_1exception.html">minxlib::exception</a></td><td><code> [virtual]</code></td></tr>
</table></div><!-- contents -->
</body>
</html>






<


<
<
<



<
<




<
<



<

<



<

<
<
<
<
<




<
|
|
|
<
|
<
|
|





>
|
>
|
|
|
|
|
|
|
<
>
|



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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: Member List</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">


  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>

   </div>

   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>

  </td>





 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.4 -->
<div id="nav-path" class="navpath">
  <ul>

<li class="navelem"><b>minxlib</b></li><li class="navelem"><a class="el" href="classminxlib_1_1exception.html">exception</a></li>  </ul>

</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">minxlib::exception Member List</div>  </div>
</div><!--header-->
<div class="contents">

<p>This is the complete list of members for <a class="el" href="classminxlib_1_1exception.html">minxlib::exception</a>, including all inherited members.</p>
<table class="directory">
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1exception.html#aa76ca68d415e3bbeb1d423991bef9c97">exception</a>(const std::string &amp;msg)</td><td class="entry"><a class="el" href="classminxlib_1_1exception.html">minxlib::exception</a></td><td class="entry"><span class="mlabel">protected</span></td></tr>
  <tr><td class="entry"><a class="el" href="classminxlib_1_1exception.html#ad36ee2c4397ea2e303dd7ede93a23c88">get_py_exception</a>(type_info t)</td><td class="entry"><a class="el" href="classminxlib_1_1exception.html">minxlib::exception</a></td><td class="entry"><span class="mlabel">protected</span><span class="mlabel">static</span></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1exception.html#aa9a683a09c153fba37a4175795bd34ba">py_func</a> typedef</td><td class="entry"><a class="el" href="classminxlib_1_1exception.html">minxlib::exception</a></td><td class="entry"><span class="mlabel">protected</span></td></tr>
  <tr><td class="entry"><a class="el" href="classminxlib_1_1exception.html#ae46edf2b53b99f6b53285998a9fe43b3">pythonize</a>()</td><td class="entry"><a class="el" href="classminxlib_1_1exception.html">minxlib::exception</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1exception.html#a62bc45a4fd6dea3e493f89f89636d099">register_pythonize</a>(type_info t, py_func f)</td><td class="entry"><a class="el" href="classminxlib_1_1exception.html">minxlib::exception</a></td><td class="entry"><span class="mlabel">protected</span><span class="mlabel">static</span></td></tr>
  <tr><td class="entry"><a class="el" href="classminxlib_1_1exception.html#a03985b0cfe4604adfa7ba762936787fe">register_translator</a>()</td><td class="entry"><a class="el" href="classminxlib_1_1exception.html">minxlib::exception</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">protected</span><span class="mlabel">static</span></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1exception.html#aecf78e2c91fcef663b598c32d18fdd2e">set_py_exception</a>(type_info t, PyObject *e)</td><td class="entry"><a class="el" href="classminxlib_1_1exception.html">minxlib::exception</a></td><td class="entry"><span class="mlabel">protected</span><span class="mlabel">static</span></td></tr>

  <tr><td class="entry"><a class="el" href="classminxlib_1_1exception.html#a2928b4dc8c2350f3fb668422eaa208dd">translate</a>(const T &amp;e)</td><td class="entry"><a class="el" href="classminxlib_1_1exception.html">minxlib::exception</a></td><td class="entry"><span class="mlabel">protected</span><span class="mlabel">static</span></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1exception.html#a07ea942f6868e483d41588b5187f76cf">~exception</a>()</td><td class="entry"><a class="el" href="classminxlib_1_1exception.html">minxlib::exception</a></td><td class="entry"><span class="mlabel">virtual</span></td></tr>
</table></div><!-- contents -->
</body>
</html>

Changes to api/classminxlib_1_1exception.html.

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
133
134
135

136
137
138




139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155



156
157
158

159
160
161

162






163
164




165
166
167
168
169
170
171
172
173
174
175
176
177



178
179
180

181
182
183
184

185
186
187




188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205



206
207
208

209
210
211

212
213
214




215
216
217
218
219
220
221
222
223
224
225



226
227
228

229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245




246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267



268
269
270

271
272
273

274
275
276




277
278
279
280
281
282
283
284
285
286
287



288
289
290

291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307




308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328



329
330
331

332
333
334
335

336
337
338




339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: minxlib::exception Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>
     
   </div>
   
   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>
   
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>minxlib</b>      </li>
      <li class="navelem"><a class="el" href="classminxlib_1_1exception.html">exception</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pro-types">Protected Types</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-static-methods">Static Protected Member Functions</a>  </div>

  <div class="headertitle">
<div class="title">minxlib::exception Class Reference<div class="ingroups"><a class="el" href="group__grp__minxlib__exceptions.html">minxlib's Exception Classes</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Base class for minxlib exceptions.  
 <a href="classminxlib_1_1exception.html#details">More...</a></p>

<p><code>#include &lt;exception.hh&gt;</code></p>

<p><a href="classminxlib_1_1exception-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>

Public Member Functions</h2></td></tr>
<tr class="memitem:a07ea942f6868e483d41588b5187f76cf"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1exception.html#a07ea942f6868e483d41588b5187f76cf">~exception</a> ()  throw ()</td></tr>
<tr class="memdesc:a07ea942f6868e483d41588b5187f76cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Virtual destructor.  <a href="#a07ea942f6868e483d41588b5187f76cf"></a><br/></td></tr>


<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:ae46edf2b53b99f6b53285998a9fe43b3"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1exception.html#ae46edf2b53b99f6b53285998a9fe43b3">pythonize</a> ()</td></tr>
<tr class="memdesc:ae46edf2b53b99f6b53285998a9fe43b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Expose exception interface to Python.  <a href="#ae46edf2b53b99f6b53285998a9fe43b3"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-types"></a>


Protected Types</h2></td></tr>
<tr class="memitem:aa9a683a09c153fba37a4175795bd34ba"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1exception.html#aa9a683a09c153fba37a4175795bd34ba">py_func</a> )()</td></tr>
<tr class="memdesc:aa9a683a09c153fba37a4175795bd34ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Signature for Pythonize functions.  <a href="#aa9a683a09c153fba37a4175795bd34ba"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>



Protected Member Functions</h2></td></tr>
<tr class="memitem:aa76ca68d415e3bbeb1d423991bef9c97"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1exception.html#aa76ca68d415e3bbeb1d423991bef9c97">exception</a> (const std::string &amp;msg)</td></tr>
<tr class="memdesc:aa76ca68d415e3bbeb1d423991bef9c97"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct base exception object.  <a href="#aa76ca68d415e3bbeb1d423991bef9c97"></a><br/></td></tr>


<tr><td colspan="2"><h2><a name="pro-static-methods"></a>
Static Protected Member Functions</h2></td></tr>
<tr class="memitem:a62bc45a4fd6dea3e493f89f89636d099"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1exception.html#a62bc45a4fd6dea3e493f89f89636d099">register_pythonize</a> (<a class="el" href="classminxlib_1_1type__info.html">type_info</a> t, <a class="el" href="classminxlib_1_1exception.html#aa9a683a09c153fba37a4175795bd34ba">py_func</a> f)</td></tr>
<tr class="memdesc:a62bc45a4fd6dea3e493f89f89636d099"><td class="mdescLeft">&#160;</td><td class="mdescRight">Register subclass's pythonize function.  <a href="#a62bc45a4fd6dea3e493f89f89636d099"></a><br/></td></tr>

<tr class="memitem:aecf78e2c91fcef663b598c32d18fdd2e"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1exception.html#aecf78e2c91fcef663b598c32d18fdd2e">set_py_exception</a> (<a class="el" href="classminxlib_1_1type__info.html">type_info</a> t, PyObject *e)</td></tr>
<tr class="memdesc:aecf78e2c91fcef663b598c32d18fdd2e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Register Python exception class object for a subclass.  <a href="#aecf78e2c91fcef663b598c32d18fdd2e"></a><br/></td></tr>

<tr class="memitem:ad36ee2c4397ea2e303dd7ede93a23c88"><td class="memItemLeft" align="right" valign="top">static PyObject *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1exception.html#ad36ee2c4397ea2e303dd7ede93a23c88">get_py_exception</a> (<a class="el" href="classminxlib_1_1type__info.html">type_info</a> t)</td></tr>
<tr class="memdesc:ad36ee2c4397ea2e303dd7ede93a23c88"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve Python exception class for specified C++ type.  <a href="#ad36ee2c4397ea2e303dd7ede93a23c88"></a><br/></td></tr>

<tr class="memitem:afe75d463bda0934668ae3ddad164d3fe"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:afe75d463bda0934668ae3ddad164d3fe"><td class="memTemplItemLeft" align="right" valign="top">static void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classminxlib_1_1exception.html#afe75d463bda0934668ae3ddad164d3fe">translate</a> (const T &amp;e)</td></tr>
<tr class="memdesc:afe75d463bda0934668ae3ddad164d3fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generic Boost.Python exception translator.  <a href="#afe75d463bda0934668ae3ddad164d3fe"></a><br/></td></tr>

<tr class="memitem:a03985b0cfe4604adfa7ba762936787fe"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:a03985b0cfe4604adfa7ba762936787fe"><td class="memTemplItemLeft" align="right" valign="top">static void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classminxlib_1_1exception.html#a03985b0cfe4604adfa7ba762936787fe">register_translator</a> ()</td></tr>
<tr class="memdesc:a03985b0cfe4604adfa7ba762936787fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Register <a href="http://www.boost.org/libs/python/doc/">Boost.Python</a> exception translator for type T.  <a href="#a03985b0cfe4604adfa7ba762936787fe"></a><br/></td></tr>

</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Base class for minxlib exceptions. </p>
<p>This class acts as a base for the various exceptions thrown by minxlib. This class is exposed as a Python class that is derived from Python's standard Exception class. Thus, subclasses of this one inherit Python's Exception interface.</p>
<dl class="section note"><dt>Note:</dt><dd>This class cannot be instantiated directly by client code (neither inside minxlib nor in the Python side of Minx). It is meant to be a common base from which other, specific types of errors are derived. </dd></dl>
</div><hr/><h2>Member Typedef Documentation</h2>
<a class="anchor" id="aa9a683a09c153fba37a4175795bd34ba"></a>
<div class="memitem">
<div class="memproto">



      <table class="memname">
        <tr>
          <td class="memname">typedef void(* <a class="el" href="classminxlib_1_1exception.html#aa9a683a09c153fba37a4175795bd34ba">minxlib::exception::py_func</a>)()<code> [protected]</code></td>

        </tr>
      </table>
</div>




<div class="memdoc">

<p>Signature for Pythonize functions. </p>
<p>Each subclass has to define a static Pythonize function that will export its interface to minxlib's Python module using the appropriate <a href="http://www.boost.org/libs/python/doc/">Boost.Python</a> incantations. All the Pythonize functions of direct subclasses will be called by <a class="el" href="classminxlib_1_1exception.html#ae46edf2b53b99f6b53285998a9fe43b3" title="Expose exception interface to Python.">exception::pythonize()</a>, which is called by the main Python initialization module python.cc.</p>
<dl class="section note"><dt>Note:</dt><dd>The Pythonize functions of indirect subclasses, i.e., subclasses of subclasses of <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions.">minxlib::exception</a>, should be called by the Pythonize functions of their respective direct base classes. To clarify, if we have two classes foo and bar derived from some_error, which is derived from <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions.">minxlib::exception</a>, <a class="el" href="classminxlib_1_1exception.html#ae46edf2b53b99f6b53285998a9fe43b3" title="Expose exception interface to Python.">exception::pythonize()</a> will call some_error::pythonize(), which should, in turn, call foo::pythonize() and bar::pythonize(). </dd></dl>

</div>
</div>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aa76ca68d415e3bbeb1d423991bef9c97"></a>
<div class="memitem">
<div class="memproto">



      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classminxlib_1_1exception.html#aa76ca68d415e3bbeb1d423991bef9c97">minxlib::exception::exception</a> </td>

          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>msg</em></td><td>)</td>
          <td><code> [protected]</code></td>

        </tr>
      </table>
</div>




<div class="memdoc">

<p>Construct base exception object. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">msg</td><td>An error message describing the problem. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>A properly constructed <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions.">minxlib::exception</a> object.</dd></dl>
<p>A protected constructor to ensure that only subclasses can construct objects of this type. The msg parameter is simply passed as-is to the std::runtime_error constructor. </p>

</div>
</div>
<a class="anchor" id="a07ea942f6868e483d41588b5187f76cf"></a>
<div class="memitem">
<div class="memproto">



      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classminxlib_1_1exception.html#a07ea942f6868e483d41588b5187f76cf">minxlib::exception::~exception</a> </td>

          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td>  throw ()<code> [virtual]</code></td>

        </tr>






      </table>
</div>




<div class="memdoc">

<p>Virtual destructor. </p>
<dl class="section return"><dt>Returns:</dt><dd>Nothing.</dd></dl>
<p>Since this is a base class, it's good to have a virtual destructor in place.</p>
<dl class="section note"><dt>Note:</dt><dd>std::runtime_error already has a virtual destructor. However, if we skip this definition, the compiler complains about this class's auto-generated destructor having looser throw specifications than the base class. </dd></dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ad36ee2c4397ea2e303dd7ede93a23c88"></a>
<div class="memitem">
<div class="memproto">



      <table class="memname">
        <tr>
          <td class="memname">static PyObject* <a class="el" href="classminxlib_1_1exception.html#ad36ee2c4397ea2e303dd7ede93a23c88">minxlib::exception::get_py_exception</a> </td>

          <td>(</td>
          <td class="paramtype"><a class="el" href="classminxlib_1_1type__info.html">type_info</a>&#160;</td>
          <td class="paramname"><em>t</em></td><td>)</td>
          <td><code> [static, protected]</code></td>

        </tr>
      </table>
</div>




<div class="memdoc">

<p>Retrieve Python exception class for specified C++ type. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">t</td><td>C++ exception class/subclass typeid. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Python exception class object corresponding to t.</dd></dl>
<p>When we raise a minxlib exception to inform the Python side of Minx of some problem, we need the Python exception class corresponding to the C++ exception type. This function retrieves the desired Python exception class object from the registry maintained by the <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions.">minxlib::exception</a> base class.</p>
<p>If a (direct or indirect) subclass of <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions.">minxlib::exception</a> fails to register a Python exception class corresponding to its C++ type, this function will return the Python exception class corresponding to the <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions.">minxlib::exception</a> class. If this ever happens, it indicates a bug in the implementation of type t! </p>

</div>
</div>
<a class="anchor" id="ae46edf2b53b99f6b53285998a9fe43b3"></a>
<div class="memitem">
<div class="memproto">



      <table class="memname">
        <tr>
          <td class="memname">static void <a class="el" href="classminxlib_1_1exception.html#ae46edf2b53b99f6b53285998a9fe43b3">minxlib::exception::pythonize</a> </td>

          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static]</code></td>

        </tr>
      </table>
</div>




<div class="memdoc">

<p>Expose exception interface to Python. </p>
<dl class="section return"><dt>Returns:</dt><dd>Nothing.</dd></dl>
<p>This function is meant to be called as part of the <a href="http://www.boost.org/libs/python/doc/">Boost.Python</a> module initialization. It will call the Pythonize functions of all <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions.">minxlib::exception</a> subclasses in order to export the entire <a class="el" href="group__grp__minxlib__exceptions.html">minxlib exception hierarchy</a> to Python. </p>

</div>
</div>
<a class="anchor" id="a62bc45a4fd6dea3e493f89f89636d099"></a>
<div class="memitem">
<div class="memproto">



      <table class="memname">
        <tr>
          <td class="memname">static bool <a class="el" href="classminxlib_1_1exception.html#a62bc45a4fd6dea3e493f89f89636d099">minxlib::exception::register_pythonize</a> </td>

          <td>(</td>
          <td class="paramtype"><a class="el" href="classminxlib_1_1type__info.html">type_info</a>&#160;</td>
          <td class="paramname"><em>t</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classminxlib_1_1exception.html#aa9a683a09c153fba37a4175795bd34ba">py_func</a>&#160;</td>
          <td class="paramname"><em>f</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static, protected]</code></td>
        </tr>
      </table>
</div>




<div class="memdoc">

<p>Register subclass's pythonize function. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">t</td><td>Subclass typeid. </td></tr>
    <tr><td class="paramname">f</td><td>Pointer to subclass's pythonize function. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Nothing really.</dd></dl>
<p>The main Python initialization module, python.cc, calls <a class="el" href="classminxlib_1_1exception.html#ae46edf2b53b99f6b53285998a9fe43b3" title="Expose exception interface to Python.">exception::pythonize()</a> to export the entire <a class="el" href="group__grp__minxlib__exceptions.html">minxlib exception class hierarchy</a> to the Python parts of Minx. All subclasses of <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions.">minxlib::exception</a> are expected to implement a Pythonize function that takes care of exporting their respective Python interfaces. To ensure that <a class="el" href="classminxlib_1_1exception.html#ae46edf2b53b99f6b53285998a9fe43b3" title="Expose exception interface to Python.">minxlib::exception::pythonize()</a> can call the Pythonize functions of subclasses, all direct subclasses of <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions.">minxlib::exception</a> should call this function to let the base exception class know the address of the subclass's Pythonize function.</p>
<dl class="section note"><dt>Note:</dt><dd>Only direct subclasses of <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions.">minxlib::exception</a> should use this function. If a subclass of a subclass of <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions.">minxlib::exception</a> registers its Pythonize function using this routine, it could happen that the indirect subclass's Pythonize function gets called before its base class's Pythonize function, which can mess up the <a href="http://www.boost.org/libs/python/doc/">Boost.Python</a> interface initialization sequence. Base classes of subclasses of subclasses of <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions.">minxlib::exception</a> should provide their own mechanisms for registering the Pythonize functions of their subclasses.</dd></dl>
<p>To make the registration mechanism described above work, direct subclasses of <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions.">minxlib::exception</a> should declare a static bool variable and in its initializer, call this function. </p>

</div>
</div>
<a class="anchor" id="a03985b0cfe4604adfa7ba762936787fe"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>



      <table class="memname">
        <tr>
          <td class="memname">static void <a class="el" href="classminxlib_1_1exception.html#a03985b0cfe4604adfa7ba762936787fe">minxlib::exception::register_translator</a> </td>

          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, static, protected]</code></td>

        </tr>
      </table>
</div>




<div class="memdoc">

<p>Register <a href="http://www.boost.org/libs/python/doc/">Boost.Python</a> exception translator for type T. </p>
<dl class="section return"><dt>Returns:</dt><dd>Nothing.</dd></dl>
<p>This function is meant to be used in the Pythonize routines of <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions.">minxlib::exception</a> and its subclasses that need an exception translator for their type. It simply generates a translator for type T (which is the <a class="el" href="classminxlib_1_1exception.html#afe75d463bda0934668ae3ddad164d3fe" title="Generic Boost.Python exception translator.">exception::translate&lt;T&gt;()</a> function) and calls the appropriate <a href="http://www.boost.org/libs/python/doc/">Boost.Python</a> API to register <a class="el" href="classminxlib_1_1exception.html#afe75d463bda0934668ae3ddad164d3fe" title="Generic Boost.Python exception translator.">exception::translate&lt;T&gt;()</a> as the exception translator for type T. </p>

</div>
</div>
<a class="anchor" id="aecf78e2c91fcef663b598c32d18fdd2e"></a>
<div class="memitem">
<div class="memproto">



      <table class="memname">
        <tr>
          <td class="memname">static void <a class="el" href="classminxlib_1_1exception.html#aecf78e2c91fcef663b598c32d18fdd2e">minxlib::exception::set_py_exception</a> </td>

          <td>(</td>
          <td class="paramtype"><a class="el" href="classminxlib_1_1type__info.html">type_info</a>&#160;</td>
          <td class="paramname"><em>t</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">PyObject *&#160;</td>
          <td class="paramname"><em>e</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static, protected]</code></td>
        </tr>
      </table>
</div>




<div class="memdoc">

<p>Register Python exception class object for a subclass. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">t</td><td>Subclass typeid. </td></tr>
    <tr><td class="paramname">e</td><td>The subclass's Python exception class. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Nothing.</dd></dl>
<p>Each minxlib exception class must have a corresponding Python exception class object, which must be registered with the <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions.">minxlib::exception</a> base class. In their respective Pythonize functions, all subclasses of <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions.">minxlib::exception</a> have to create a Python exception class corresponding to their C++ types and then call this function to insert that Python class object into the base class's registry of exception classes.</p>
<dl class="section note"><dt>Note:</dt><dd>Unlike <a class="el" href="classminxlib_1_1exception.html#a62bc45a4fd6dea3e493f89f89636d099" title="Register subclass&#39;s pythonize function.">register_pythonize()</a>, which is meant only for direct subclasses of <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions.">minxlib::exception</a>, this function can and should be used by all subclasses (direct or indirect). </dd></dl>

</div>
</div>
<a class="anchor" id="afe75d463bda0934668ae3ddad164d3fe"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>



      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classminxlib_1_1exception.html#afe75d463bda0934668ae3ddad164d3fe">minxlib::exception::translate</a> </td>

          <td>(</td>
          <td class="paramtype">const T &amp;&#160;</td>
          <td class="paramname"><em>e</em></td><td>)</td>
          <td><code> [static, protected]</code></td>

        </tr>
      </table>
</div>




<div class="memdoc">

<p>Generic Boost.Python exception translator. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">e</td><td>C++ exception object that needs to be translated to Python. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Nothing.</dd></dl>
<p>This function sets up an exception translator for an exception of type T, which is expected to be either <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions.">minxlib::exception</a> or one of its subclasses.</p>
<p>All these translators follow the same pattern, viz., calling PyErr_SetString() using the Python exception class corresponding to type T as stored in exception::m_py_exception_map. Thus, we can use a generic function for this purpose. </p>

</div>
</div>
</div><!-- contents -->
</body>
</html>






<


<
<
<



<
<




<
<



<

<



<

<
<
<
<
<




<
|
|
|
<
|
<
|
|






|
>









<
<

<
>


|
>
>
|


|
|
>
>


|
<
>
>
>


|
>
>
|


|
>

|
>

|
>
|
|
|
>


|
>

|


|
|



>
>
>


<
>


|
>
>
>
>
|


|
|



|



>
>
>


<
>


|
<
>


|
>
>
>
>
|


|





|







>
>
>


<
>

|
<
>

>
>
>
>
>
>

|
>
>
>
>
|


|

|



|



>
>
>


<
>


|
<
>


|
>
>
>
>
|


|





|
|
|






>
>
>


<
>

|
<
>


|
>
>
>
>
|


|
|






>
>
>


<
>













|


|
>
>
>
>
|


|






|
|
|
|








>
>
>


<
>

|
<
>


|
>
>
>
>
|


|
|






>
>
>


<
>













|


|
>
>
>
>
|


|






|
|
|



|




>
>
>


<
>


|
<
>


|
>
>
>
>
|


|





|
|







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
133

134
135
136
137

138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167

168
169
170

171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202

203
204
205
206

207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237

238
239
240

241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264

265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313

314
315
316

317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340

341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388

389
390
391
392

393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: minxlib::exception Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">


  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>

   </div>

   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>

  </td>





 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.4 -->
<div id="nav-path" class="navpath">
  <ul>

<li class="navelem"><b>minxlib</b></li><li class="navelem"><a class="el" href="classminxlib_1_1exception.html">exception</a></li>  </ul>

</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pro-types">Protected Types</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-static-methods">Static Protected Member Functions</a> &#124;
<a href="classminxlib_1_1exception-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">minxlib::exception Class Reference<div class="ingroups"><a class="el" href="group__grp__minxlib__exceptions.html">minxlib's Exception Classes</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Base class for minxlib exceptions.  
 <a href="classminxlib_1_1exception.html#details">More...</a></p>

<p><code>#include &lt;exception.hh&gt;</code></p>


<table class="memberdecls">

<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a07ea942f6868e483d41588b5187f76cf"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1exception.html#a07ea942f6868e483d41588b5187f76cf">~exception</a> ()  throw ()</td></tr>
<tr class="memdesc:a07ea942f6868e483d41588b5187f76cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Virtual destructor.  <a href="#a07ea942f6868e483d41588b5187f76cf">More...</a><br/></td></tr>
<tr class="separator:a07ea942f6868e483d41588b5187f76cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:ae46edf2b53b99f6b53285998a9fe43b3"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1exception.html#ae46edf2b53b99f6b53285998a9fe43b3">pythonize</a> ()</td></tr>
<tr class="memdesc:ae46edf2b53b99f6b53285998a9fe43b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Expose exception interface to Python.  <a href="#ae46edf2b53b99f6b53285998a9fe43b3">More...</a><br/></td></tr>
<tr class="separator:ae46edf2b53b99f6b53285998a9fe43b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-types"></a>
Protected Types</h2></td></tr>
<tr class="memitem:aa9a683a09c153fba37a4175795bd34ba"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1exception.html#aa9a683a09c153fba37a4175795bd34ba">py_func</a> )()</td></tr>
<tr class="memdesc:aa9a683a09c153fba37a4175795bd34ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Signature for Pythonize functions.  <a href="#aa9a683a09c153fba37a4175795bd34ba">More...</a><br/></td></tr>

<tr class="separator:aa9a683a09c153fba37a4175795bd34ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:aa76ca68d415e3bbeb1d423991bef9c97"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1exception.html#aa76ca68d415e3bbeb1d423991bef9c97">exception</a> (const std::string &amp;msg)</td></tr>
<tr class="memdesc:aa76ca68d415e3bbeb1d423991bef9c97"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct base exception object.  <a href="#aa76ca68d415e3bbeb1d423991bef9c97">More...</a><br/></td></tr>
<tr class="separator:aa76ca68d415e3bbeb1d423991bef9c97"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-static-methods"></a>
Static Protected Member Functions</h2></td></tr>
<tr class="memitem:a62bc45a4fd6dea3e493f89f89636d099"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1exception.html#a62bc45a4fd6dea3e493f89f89636d099">register_pythonize</a> (<a class="el" href="classminxlib_1_1type__info.html">type_info</a> t, <a class="el" href="classminxlib_1_1exception.html#aa9a683a09c153fba37a4175795bd34ba">py_func</a> f)</td></tr>
<tr class="memdesc:a62bc45a4fd6dea3e493f89f89636d099"><td class="mdescLeft">&#160;</td><td class="mdescRight">Register subclass's pythonize function.  <a href="#a62bc45a4fd6dea3e493f89f89636d099">More...</a><br/></td></tr>
<tr class="separator:a62bc45a4fd6dea3e493f89f89636d099"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aecf78e2c91fcef663b598c32d18fdd2e"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1exception.html#aecf78e2c91fcef663b598c32d18fdd2e">set_py_exception</a> (<a class="el" href="classminxlib_1_1type__info.html">type_info</a> t, PyObject *e)</td></tr>
<tr class="memdesc:aecf78e2c91fcef663b598c32d18fdd2e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Register Python exception class object for a subclass.  <a href="#aecf78e2c91fcef663b598c32d18fdd2e">More...</a><br/></td></tr>
<tr class="separator:aecf78e2c91fcef663b598c32d18fdd2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad36ee2c4397ea2e303dd7ede93a23c88"><td class="memItemLeft" align="right" valign="top">static PyObject *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1exception.html#ad36ee2c4397ea2e303dd7ede93a23c88">get_py_exception</a> (<a class="el" href="classminxlib_1_1type__info.html">type_info</a> t)</td></tr>
<tr class="memdesc:ad36ee2c4397ea2e303dd7ede93a23c88"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve Python exception class for specified C++ type.  <a href="#ad36ee2c4397ea2e303dd7ede93a23c88">More...</a><br/></td></tr>
<tr class="separator:ad36ee2c4397ea2e303dd7ede93a23c88"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2928b4dc8c2350f3fb668422eaa208dd"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:a2928b4dc8c2350f3fb668422eaa208dd"><td class="memTemplItemLeft" align="right" valign="top">static void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classminxlib_1_1exception.html#a2928b4dc8c2350f3fb668422eaa208dd">translate</a> (const T &amp;e)</td></tr>
<tr class="memdesc:a2928b4dc8c2350f3fb668422eaa208dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generic Boost.Python exception translator.  <a href="#a2928b4dc8c2350f3fb668422eaa208dd">More...</a><br/></td></tr>
<tr class="separator:a2928b4dc8c2350f3fb668422eaa208dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a03985b0cfe4604adfa7ba762936787fe"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:a03985b0cfe4604adfa7ba762936787fe"><td class="memTemplItemLeft" align="right" valign="top">static void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classminxlib_1_1exception.html#a03985b0cfe4604adfa7ba762936787fe">register_translator</a> ()</td></tr>
<tr class="memdesc:a03985b0cfe4604adfa7ba762936787fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Register <a href="http://www.boost.org/libs/python/doc/">Boost.Python</a> exception translator for type T.  <a href="#a03985b0cfe4604adfa7ba762936787fe">More...</a><br/></td></tr>
<tr class="separator:a03985b0cfe4604adfa7ba762936787fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Base class for minxlib exceptions. </p>
<p>This class acts as a base for the various exceptions thrown by minxlib. This class is exposed as a Python class that is derived from Python's standard Exception class. Thus, subclasses of this one inherit Python's Exception interface.</p>
<dl class="section note"><dt>Note</dt><dd>This class cannot be instantiated directly by client code (neither inside minxlib nor in the Python side of Minx). It is meant to be a common base from which other, specific types of errors are derived. </dd></dl>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a class="anchor" id="aa9a683a09c153fba37a4175795bd34ba"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>

          <td class="memname">typedef void(* minxlib::exception::py_func)()</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Signature for Pythonize functions. </p>
<p>Each subclass has to define a static Pythonize function that will export its interface to minxlib's Python module using the appropriate <a href="http://www.boost.org/libs/python/doc/">Boost.Python</a> incantations. All the Pythonize functions of direct subclasses will be called by <a class="el" href="classminxlib_1_1exception.html#ae46edf2b53b99f6b53285998a9fe43b3" title="Expose exception interface to Python. ">exception::pythonize()</a>, which is called by the main Python initialization module python.cc.</p>
<dl class="section note"><dt>Note</dt><dd>The Pythonize functions of indirect subclasses, i.e., subclasses of subclasses of <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions. ">minxlib::exception</a>, should be called by the Pythonize functions of their respective direct base classes. To clarify, if we have two classes foo and bar derived from some_error, which is derived from <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions. ">minxlib::exception</a>, <a class="el" href="classminxlib_1_1exception.html#ae46edf2b53b99f6b53285998a9fe43b3" title="Expose exception interface to Python. ">exception::pythonize()</a> will call <a class="el" href="group__grp__minxlib__keymap.html#ga310dc14a58dd12ec04b13b8fc00ecc07" title="Setup keymap module&#39;s logger. ">some_error::pythonize()</a>, which should, in turn, call <a class="el" href="group__grp__minxlib__keymap.html#ga310dc14a58dd12ec04b13b8fc00ecc07" title="Setup keymap module&#39;s logger. ">foo::pythonize()</a> and <a class="el" href="group__grp__minxlib__keymap.html#ga310dc14a58dd12ec04b13b8fc00ecc07" title="Setup keymap module&#39;s logger. ">bar::pythonize()</a>. </dd></dl>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aa76ca68d415e3bbeb1d423991bef9c97"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>

          <td class="memname">minxlib::exception::exception </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>msg</em>)</td><td></td>

          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Construct base exception object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">msg</td><td>An error message describing the problem. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A properly constructed <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions. ">minxlib::exception</a> object.</dd></dl>
<p>A protected constructor to ensure that only subclasses can construct objects of this type. The msg parameter is simply passed as-is to the std::runtime_error constructor. </p>

</div>
</div>
<a class="anchor" id="a07ea942f6868e483d41588b5187f76cf"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>

          <td class="memname">virtual minxlib::exception::~exception </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>

          <td></td>
        </tr>
        <tr>
          <td align="right">throw </td><td>(</td><td colspan="2"></td>
        </tr>
        <tr>
          <td align="right"></td><td>)</td><td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Virtual destructor. </p>
<dl class="section return"><dt>Returns</dt><dd>Nothing.</dd></dl>
<p>Since this is a base class, it's good to have a virtual destructor in place.</p>
<dl class="section note"><dt>Note</dt><dd>std::runtime_error already has a virtual destructor. However, if we skip this definition, the compiler complains about this class's auto-generated destructor having looser throw specifications than the base class. </dd></dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ad36ee2c4397ea2e303dd7ede93a23c88"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>

          <td class="memname">static PyObject* minxlib::exception::get_py_exception </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classminxlib_1_1type__info.html">type_info</a>&#160;</td>
          <td class="paramname"><em>t</em>)</td><td></td>

          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Retrieve Python exception class for specified C++ type. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">t</td><td>C++ exception class/subclass typeid. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Python exception class object corresponding to t.</dd></dl>
<p>When we raise a minxlib exception to inform the Python side of Minx of some problem, we need the Python exception class corresponding to the C++ exception type. This function retrieves the desired Python exception class object from the registry maintained by the <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions. ">minxlib::exception</a> base class.</p>
<p>If a (direct or indirect) subclass of <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions. ">minxlib::exception</a> fails to register a Python exception class corresponding to its C++ type, this function will return the Python exception class corresponding to the <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions. ">minxlib::exception</a> class. If this ever happens, it indicates a bug in the implementation of type t! </p>

</div>
</div>
<a class="anchor" id="ae46edf2b53b99f6b53285998a9fe43b3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>

          <td class="memname">static void minxlib::exception::pythonize </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>

          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Expose exception interface to Python. </p>
<dl class="section return"><dt>Returns</dt><dd>Nothing.</dd></dl>
<p>This function is meant to be called as part of the <a href="http://www.boost.org/libs/python/doc/">Boost.Python</a> module initialization. It will call the Pythonize functions of all <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions. ">minxlib::exception</a> subclasses in order to export the entire <a class="el" href="group__grp__minxlib__exceptions.html">minxlib exception hierarchy</a> to Python. </p>

</div>
</div>
<a class="anchor" id="a62bc45a4fd6dea3e493f89f89636d099"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>

          <td class="memname">static bool minxlib::exception::register_pythonize </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classminxlib_1_1type__info.html">type_info</a>&#160;</td>
          <td class="paramname"><em>t</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classminxlib_1_1exception.html#aa9a683a09c153fba37a4175795bd34ba">py_func</a>&#160;</td>
          <td class="paramname"><em>f</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Register subclass's pythonize function. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">t</td><td>Subclass typeid. </td></tr>
    <tr><td class="paramname">f</td><td>Pointer to subclass's pythonize function. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Nothing really.</dd></dl>
<p>The main Python initialization module, python.cc, calls <a class="el" href="classminxlib_1_1exception.html#ae46edf2b53b99f6b53285998a9fe43b3" title="Expose exception interface to Python. ">exception::pythonize()</a> to export the entire <a class="el" href="group__grp__minxlib__exceptions.html">minxlib exception class hierarchy</a> to the Python parts of Minx. All subclasses of <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions. ">minxlib::exception</a> are expected to implement a Pythonize function that takes care of exporting their respective Python interfaces. To ensure that <a class="el" href="classminxlib_1_1exception.html#ae46edf2b53b99f6b53285998a9fe43b3" title="Expose exception interface to Python. ">minxlib::exception::pythonize()</a> can call the Pythonize functions of subclasses, all direct subclasses of <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions. ">minxlib::exception</a> should call this function to let the base exception class know the address of the subclass's Pythonize function.</p>
<dl class="section note"><dt>Note</dt><dd>Only direct subclasses of <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions. ">minxlib::exception</a> should use this function. If a subclass of a subclass of <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions. ">minxlib::exception</a> registers its Pythonize function using this routine, it could happen that the indirect subclass's Pythonize function gets called before its base class's Pythonize function, which can mess up the <a href="http://www.boost.org/libs/python/doc/">Boost.Python</a> interface initialization sequence. Base classes of subclasses of subclasses of <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions. ">minxlib::exception</a> should provide their own mechanisms for registering the Pythonize functions of their subclasses.</dd></dl>
<p>To make the registration mechanism described above work, direct subclasses of <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions. ">minxlib::exception</a> should declare a static bool variable and in its initializer, call this function. </p>

</div>
</div>
<a class="anchor" id="a03985b0cfe4604adfa7ba762936787fe"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>

          <td class="memname">static void minxlib::exception::register_translator </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>

          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Register <a href="http://www.boost.org/libs/python/doc/">Boost.Python</a> exception translator for type T. </p>
<dl class="section return"><dt>Returns</dt><dd>Nothing.</dd></dl>
<p>This function is meant to be used in the Pythonize routines of <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions. ">minxlib::exception</a> and its subclasses that need an exception translator for their type. It simply generates a translator for type T (which is the <a class="el" href="classminxlib_1_1exception.html#a2928b4dc8c2350f3fb668422eaa208dd" title="Generic Boost.Python exception translator. ">exception::translate&lt;T&gt;()</a> function) and calls the appropriate <a href="http://www.boost.org/libs/python/doc/">Boost.Python</a> API to register <a class="el" href="classminxlib_1_1exception.html#a2928b4dc8c2350f3fb668422eaa208dd" title="Generic Boost.Python exception translator. ">exception::translate&lt;T&gt;()</a> as the exception translator for type T. </p>

</div>
</div>
<a class="anchor" id="aecf78e2c91fcef663b598c32d18fdd2e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>

          <td class="memname">static void minxlib::exception::set_py_exception </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classminxlib_1_1type__info.html">type_info</a>&#160;</td>
          <td class="paramname"><em>t</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">PyObject *&#160;</td>
          <td class="paramname"><em>e</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Register Python exception class object for a subclass. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">t</td><td>Subclass typeid. </td></tr>
    <tr><td class="paramname">e</td><td>The subclass's Python exception class. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Nothing.</dd></dl>
<p>Each minxlib exception class must have a corresponding Python exception class object, which must be registered with the <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions. ">minxlib::exception</a> base class. In their respective Pythonize functions, all subclasses of <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions. ">minxlib::exception</a> have to create a Python exception class corresponding to their C++ types and then call this function to insert that Python class object into the base class's registry of exception classes.</p>
<dl class="section note"><dt>Note</dt><dd>Unlike <a class="el" href="classminxlib_1_1exception.html#a62bc45a4fd6dea3e493f89f89636d099" title="Register subclass&#39;s pythonize function. ">register_pythonize()</a>, which is meant only for direct subclasses of <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions. ">minxlib::exception</a>, this function can and should be used by all subclasses (direct or indirect). </dd></dl>

</div>
</div>
<a class="anchor" id="a2928b4dc8c2350f3fb668422eaa208dd"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>

          <td class="memname">static void minxlib::exception::translate </td>
          <td>(</td>
          <td class="paramtype">const T &amp;&#160;</td>
          <td class="paramname"><em>e</em>)</td><td></td>

          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Generic Boost.Python exception translator. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">e</td><td>C++ exception object that needs to be translated to Python. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Nothing.</dd></dl>
<p>This function sets up an exception translator for an exception of type T, which is expected to be either <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions. ">minxlib::exception</a> or one of its subclasses.</p>
<p>All these translators follow the same pattern, viz., calling PyErr_SetString() using the Python exception class corresponding to type T as stored in exception::m_py_exception_map. Thus, we can use a generic function for this purpose. </p>

</div>
</div>
</div><!-- contents -->
</body>
</html>

Changes to api/classminxlib_1_1factory-members.html.

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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: Member List</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>
     
   </div>
   
   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>
   
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>minxlib</b>      </li>
      <li class="navelem"><a class="el" href="classminxlib_1_1factory.html">factory</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">minxlib::factory&lt; T, K, F, M &gt; Member List</div>  </div>
</div><!--header-->
<div class="contents">
This is the complete list of members for <a class="el" href="classminxlib_1_1factory.html">minxlib::factory&lt; T, K, F, M &gt;</a>, including all inherited members.<table>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1factory.html#a060181887c43e1756ab05a323ef159cc">create</a>(K k)</td><td><a class="el" href="classminxlib_1_1factory.html">minxlib::factory&lt; T, K, F, M &gt;</a></td><td><code> [static]</code></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1factory.html#ab4ff74df685ad670c250be5151f51fd5">create</a>(K k, A a)</td><td><a class="el" href="classminxlib_1_1factory.html">minxlib::factory&lt; T, K, F, M &gt;</a></td><td><code> [static]</code></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1factory.html#aa53bab865d0746fda080443057ce1df9">create</a>(K k, A a, B b)</td><td><a class="el" href="classminxlib_1_1factory.html">minxlib::factory&lt; T, K, F, M &gt;</a></td><td><code> [static]</code></td></tr>


</table></div><!-- contents -->
</body>
</html>






<


<
<
<



<
<




<
<



<

<



<

<
<
<
<
<




<
|
|
|
<
|
<
|
|





|
|
|
|
>
>



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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: Member List</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">


  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>

   </div>

   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>

  </td>





 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.4 -->
<div id="nav-path" class="navpath">
  <ul>

<li class="navelem"><b>minxlib</b></li><li class="navelem"><a class="el" href="classminxlib_1_1factory.html">factory</a></li>  </ul>

</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">minxlib::factory&lt; T, K, F, M &gt; Member List</div>  </div>
</div><!--header-->
<div class="contents">

<p>This is the complete list of members for <a class="el" href="classminxlib_1_1factory.html">minxlib::factory&lt; T, K, F, M &gt;</a>, including all inherited members.</p>
<table class="directory">
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1factory.html#a060181887c43e1756ab05a323ef159cc">create</a>(K k)</td><td class="entry"><a class="el" href="classminxlib_1_1factory.html">minxlib::factory&lt; T, K, F, M &gt;</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
  <tr><td class="entry"><a class="el" href="classminxlib_1_1factory.html#a9dad0a2263633b1d10f63958593c4cff">create</a>(K k, A a)</td><td class="entry"><a class="el" href="classminxlib_1_1factory.html">minxlib::factory&lt; T, K, F, M &gt;</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1factory.html#a23478c0bf6a356dd1f6d37c78b33deef">create</a>(K k, A a, B b)</td><td class="entry"><a class="el" href="classminxlib_1_1factory.html">minxlib::factory&lt; T, K, F, M &gt;</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
</table></div><!-- contents -->
</body>
</html>

Changes to api/classminxlib_1_1factory.html.

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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151




152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175



176
177
178
179
180
181
182
183
184
185
...
191
192
193
194
195
196
197
198
199
200
201




202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: minxlib::factory&lt; T, K, F, M &gt; Class Template Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>
     
   </div>
   
   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>
   
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>minxlib</b>      </li>
      <li class="navelem"><a class="el" href="classminxlib_1_1factory.html">factory</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a>  </div>

  <div class="headertitle">
<div class="title">minxlib::factory&lt; T, K, F, M &gt; Class Template Reference<div class="ingroups"><a class="el" href="group__grp__factory.html">minxlib's Object Factory Framework</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Object factory for subclasses of type T.  
 <a href="classminxlib_1_1factory.html#details">More...</a></p>

<p><code>#include &lt;factory.hh&gt;</code></p>

<p><a href="classminxlib_1_1factory-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>

Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structminxlib_1_1factory_1_1unknown__type.html">unknown_type</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Exception to indicate an unregistered subclass.  <a href="structminxlib_1_1factory_1_1unknown__type.html#details">More...</a><br/></td></tr>


<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a060181887c43e1756ab05a323ef159cc"><td class="memItemLeft" align="right" valign="top">static T *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1factory.html#a060181887c43e1756ab05a323ef159cc">create</a> (K k)</td></tr>
<tr class="memdesc:a060181887c43e1756ab05a323ef159cc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an instance of a subclass of T.  <a href="#a060181887c43e1756ab05a323ef159cc"></a><br/></td></tr>

<tr class="memitem:ab4ff74df685ad670c250be5151f51fd5"><td class="memTemplParams" colspan="2">template&lt;typename A &gt; </td></tr>
<tr class="memitem:ab4ff74df685ad670c250be5151f51fd5"><td class="memTemplItemLeft" align="right" valign="top">static T *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classminxlib_1_1factory.html#ab4ff74df685ad670c250be5151f51fd5">create</a> (K k, A a)</td></tr>
<tr class="memdesc:ab4ff74df685ad670c250be5151f51fd5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an instance of a subclass of T.  <a href="#ab4ff74df685ad670c250be5151f51fd5"></a><br/></td></tr>

<tr class="memitem:aa53bab865d0746fda080443057ce1df9"><td class="memTemplParams" colspan="2">template&lt;typename A , typename B &gt; </td></tr>
<tr class="memitem:aa53bab865d0746fda080443057ce1df9"><td class="memTemplItemLeft" align="right" valign="top">static T *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classminxlib_1_1factory.html#aa53bab865d0746fda080443057ce1df9">create</a> (K k, A a, B b)</td></tr>
<tr class="memdesc:aa53bab865d0746fda080443057ce1df9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an instance of a subclass of T.  <a href="#aa53bab865d0746fda080443057ce1df9"></a><br/></td></tr>

</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename T, typename K, typename F, typename M = factory_map&lt;K,F&gt;&gt;<br/>
class minxlib::factory&lt; T, K, F, M &gt;</h3>

<p>Object factory for subclasses of type T. </p>
<p>This class defines an object factory for subclasses of some base type T. Each subclass is expected to be identified uniquely by a value of type K (usually, an integral type). A function matching the signature specified by type F (usually a function pointer) should be registered with the factory and it should use the new operator to create an instance of the subclass identifed by K and upcast that to a T*.</p>
<p>The type M is expected to be an associative container that maps subclass identifier keys of type K to their factory functions of type F. By default, this type is factory_map&lt;K,F&gt;, which stores keys and factory functions and no client data. In minxlib, however, we usually use a factory_map&lt;K,F,D&gt;, where D is usually a function pointer for the pythonize functions.</p>
<p>The <a class="el" href="classminxlib_1_1factory__map.html" title="A registry mapping keys to factory functions.">factory_map</a> class defined above is good enough for most purposes and there should be little need to implement a whole new type M. However, if such madness becomes necessary, then, at the very least, from the factory class's perspective, the type M has to define a static get_factory() method that will return an F given a K.</p>
<dl class="section note"><dt>Note:</dt><dd>There is an implicit assumption that the type M will be a singleton. </dd></dl>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a060181887c43e1756ab05a323ef159cc"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T , typename K , typename F , typename M &gt; </div>



      <table class="memname">
        <tr>
          <td class="memname">T * <a class="el" href="classminxlib_1_1factory.html">minxlib::factory</a>&lt; T, K, F, M &gt;::<a class="el" href="classminxlib_1_1factory.html#a060181887c43e1756ab05a323ef159cc">create</a> </td>
          <td>(</td>
          <td class="paramtype">K&#160;</td>
          <td class="paramname"><em>k</em></td><td>)</td>
          <td><code> [static]</code></td>

        </tr>
      </table>
</div>




<div class="memdoc">

<p>Create an instance of a subclass of T. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">k</td><td>Identifier for the desired subclass. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>An instance of the desired subclass or an exception.</dd></dl>
<p>This function is for creating objects of class identified by k using the default constructor for that class. The object will be upcast to the base class T.</p>
<p>This function will retrieve the factory function for the desired class from the factory map (type M of this template) and use that to create the object. The subclass identified by k should have registered its factory function with the factory map. The factory function should create an instance of the subclass using the new operator and upcast the result to the base class type T.</p>
<p>If this function fails to retrieve a factory function for the given key k, it will throw an <a class="el" href="structminxlib_1_1factory_1_1unknown__type.html" title="Exception to indicate an unregistered subclass.">unknown_type</a> exception. Clients should be prepared to handle this exception. </p>

</div>
</div>
<a class="anchor" id="ab4ff74df685ad670c250be5151f51fd5"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T , typename K , typename F , typename M &gt; </div>
<div class="memtemplate">
template&lt;typename A &gt; </div>



      <table class="memname">
        <tr>
          <td class="memname">T * <a class="el" href="classminxlib_1_1factory.html">minxlib::factory</a>&lt; T, K, F, M &gt;::<a class="el" href="classminxlib_1_1factory.html#a060181887c43e1756ab05a323ef159cc">create</a> </td>
          <td>(</td>
          <td class="paramtype">K&#160;</td>
          <td class="paramname"><em>k</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">A&#160;</td>
          <td class="paramname"><em>a</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>




<div class="memdoc">

<p>Create an instance of a subclass of T. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">k</td><td>Identifier for the desired subclass. </td></tr>
    <tr><td class="paramname">a</td><td>Argument for the subclass's constructor. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>An instance of the desired subclass or an exception.</dd></dl>
<p>This function is for creating objects of class identified by k using the one-argument constructor for that class. The object will be upcast to the base class T.</p>
<p>This function will retrieve the factory function for the desired class from the factory map (type M of this template) and use that to create the object. The subclass identified by k should have registered its factory function with the factory map. The factory function should create an instance of the subclass using the new operator, passing the constructor the argument a, and upcast the result to the base class type T.</p>
<p>If this function fails to retrieve a factory function for the given key k, it will throw an <a class="el" href="structminxlib_1_1factory_1_1unknown__type.html" title="Exception to indicate an unregistered subclass.">unknown_type</a> exception. Clients should be prepared to handle this exception. </p>

</div>
</div>
<a class="anchor" id="aa53bab865d0746fda080443057ce1df9"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T , typename K , typename F , typename M &gt; </div>
<div class="memtemplate">
template&lt;typename A , typename B &gt; </div>



      <table class="memname">
        <tr>
          <td class="memname">T * <a class="el" href="classminxlib_1_1factory.html">minxlib::factory</a>&lt; T, K, F, M &gt;::<a class="el" href="classminxlib_1_1factory.html#a060181887c43e1756ab05a323ef159cc">create</a> </td>
          <td>(</td>
          <td class="paramtype">K&#160;</td>
          <td class="paramname"><em>k</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
          <td></td>
          <td class="paramtype">B&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>




<div class="memdoc">

<p>Create an instance of a subclass of T. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">k</td><td>Identifier for the desired subclass. </td></tr>
    <tr><td class="paramname">a</td><td>First argument for the subclass's constructor. </td></tr>
    <tr><td class="paramname">b</td><td>Second argument for the subclass's constructor. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>An instance of the desired subclass or an exception.</dd></dl>
<p>This function is for creating objects of class identified by k using the two-argument constructor for that class. The object will be upcast to the base class T.</p>
<p>This function will retrieve the factory function for the desired class from the factory map (type M of this template) and use that to create the object. The subclass identified by k should have registered its factory function with the factory map. The factory function should create an instance of the subclass using the new operator, passing the constructor the arguments a and b, and upcast the result to the base class type T.</p>
<p>If this function fails to retrieve a factory function for the given key k, it will throw an <a class="el" href="structminxlib_1_1factory_1_1unknown__type.html" title="Exception to indicate an unregistered subclass.">unknown_type</a> exception. Clients should be prepared to handle this exception. </p>

</div>
</div>
</div><!-- contents -->
</body>
</html>






<


<
<
<



<
<




<
<



<

<



<

<
<
<
<
<




<
|
|
|
<
|
<
|
|



|
>









<
<

<
>



>
>
|


|
>
|
|
|
>
|
|
|
>

|






|
|
|





>
>
>


|


|
<
>


|
>
>
>
>
|


|





|


|



|



|


>
>
>


|













|


|
>
>
>
>
|


|






|


|



|



|


>
>
>


|







 







|


|
>
>
>
>
|


|







|


|






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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
...
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: minxlib::factory&lt; T, K, F, M &gt; Class Template Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">


  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>

   </div>

   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>

  </td>





 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.4 -->
<div id="nav-path" class="navpath">
  <ul>

<li class="navelem"><b>minxlib</b></li><li class="navelem"><a class="el" href="classminxlib_1_1factory.html">factory</a></li>  </ul>

</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="classminxlib_1_1factory-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">minxlib::factory&lt; T, K, F, M &gt; Class Template Reference<div class="ingroups"><a class="el" href="group__grp__factory.html">minxlib's Object Factory Framework</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Object factory for subclasses of type T.  
 <a href="classminxlib_1_1factory.html#details">More...</a></p>

<p><code>#include &lt;factory.hh&gt;</code></p>


<table class="memberdecls">

<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structminxlib_1_1factory_1_1unknown__type.html">unknown_type</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Exception to indicate an unregistered subclass.  <a href="structminxlib_1_1factory_1_1unknown__type.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a060181887c43e1756ab05a323ef159cc"><td class="memItemLeft" align="right" valign="top">static T *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1factory.html#a060181887c43e1756ab05a323ef159cc">create</a> (K k)</td></tr>
<tr class="memdesc:a060181887c43e1756ab05a323ef159cc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an instance of a subclass of T.  <a href="#a060181887c43e1756ab05a323ef159cc">More...</a><br/></td></tr>
<tr class="separator:a060181887c43e1756ab05a323ef159cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9dad0a2263633b1d10f63958593c4cff"><td class="memTemplParams" colspan="2">template&lt;typename A &gt; </td></tr>
<tr class="memitem:a9dad0a2263633b1d10f63958593c4cff"><td class="memTemplItemLeft" align="right" valign="top">static T *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classminxlib_1_1factory.html#a9dad0a2263633b1d10f63958593c4cff">create</a> (K k, A a)</td></tr>
<tr class="memdesc:a9dad0a2263633b1d10f63958593c4cff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an instance of a subclass of T.  <a href="#a9dad0a2263633b1d10f63958593c4cff">More...</a><br/></td></tr>
<tr class="separator:a9dad0a2263633b1d10f63958593c4cff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23478c0bf6a356dd1f6d37c78b33deef"><td class="memTemplParams" colspan="2">template&lt;typename A , typename B &gt; </td></tr>
<tr class="memitem:a23478c0bf6a356dd1f6d37c78b33deef"><td class="memTemplItemLeft" align="right" valign="top">static T *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classminxlib_1_1factory.html#a23478c0bf6a356dd1f6d37c78b33deef">create</a> (K k, A a, B b)</td></tr>
<tr class="memdesc:a23478c0bf6a356dd1f6d37c78b33deef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an instance of a subclass of T.  <a href="#a23478c0bf6a356dd1f6d37c78b33deef">More...</a><br/></td></tr>
<tr class="separator:a23478c0bf6a356dd1f6d37c78b33deef"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename T, typename K, typename F, typename M = factory_map&lt;K,F&gt;&gt;<br/>
class minxlib::factory&lt; T, K, F, M &gt;</h3>

<p>Object factory for subclasses of type T. </p>
<p>This class defines an object factory for subclasses of some base type T. Each subclass is expected to be identified uniquely by a value of type K (usually, an integral type). A function matching the signature specified by type F (usually a function pointer) should be registered with the factory and it should use the new operator to create an instance of the subclass identifed by K and upcast that to a T*.</p>
<p>The type M is expected to be an associative container that maps subclass identifier keys of type K to their factory functions of type F. By default, this type is factory_map&lt;K,F&gt;, which stores keys and factory functions and no client data. In minxlib, however, we usually use a factory_map&lt;K,F,D&gt;, where D is usually a function pointer for the pythonize functions.</p>
<p>The <a class="el" href="classminxlib_1_1factory__map.html" title="A registry mapping keys to factory functions. ">factory_map</a> class defined above is good enough for most purposes and there should be little need to implement a whole new type M. However, if such madness becomes necessary, then, at the very least, from the factory class's perspective, the type M has to define a static get_factory() method that will return an F given a K.</p>
<dl class="section note"><dt>Note</dt><dd>There is an implicit assumption that the type M will be a singleton. </dd></dl>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a060181887c43e1756ab05a323ef159cc"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T , typename K , typename F , typename M &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">T * <a class="el" href="classminxlib_1_1factory.html">minxlib::factory</a>&lt; T, K, F, M &gt;::create </td>
          <td>(</td>
          <td class="paramtype">K&#160;</td>
          <td class="paramname"><em>k</em>)</td><td></td>

          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create an instance of a subclass of T. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">k</td><td>Identifier for the desired subclass. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An instance of the desired subclass or an exception.</dd></dl>
<p>This function is for creating objects of class identified by k using the default constructor for that class. The object will be upcast to the base class T.</p>
<p>This function will retrieve the factory function for the desired class from the factory map (type M of this template) and use that to create the object. The subclass identified by k should have registered its factory function with the factory map. The factory function should create an instance of the subclass using the new operator and upcast the result to the base class type T.</p>
<p>If this function fails to retrieve a factory function for the given key k, it will throw an <a class="el" href="structminxlib_1_1factory_1_1unknown__type.html" title="Exception to indicate an unregistered subclass. ">unknown_type</a> exception. Clients should be prepared to handle this exception. </p>

</div>
</div>
<a class="anchor" id="a9dad0a2263633b1d10f63958593c4cff"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T , typename K , typename F , typename M  = factory_map&lt;K,F&gt;&gt; </div>
<div class="memtemplate">
template&lt;typename A &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static T* <a class="el" href="classminxlib_1_1factory.html">minxlib::factory</a>&lt; T, K, F, M &gt;::create </td>
          <td>(</td>
          <td class="paramtype">K&#160;</td>
          <td class="paramname"><em>k</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">A&#160;</td>
          <td class="paramname"><em>a</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create an instance of a subclass of T. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">k</td><td>Identifier for the desired subclass. </td></tr>
    <tr><td class="paramname">a</td><td>Argument for the subclass's constructor. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An instance of the desired subclass or an exception.</dd></dl>
<p>This function is for creating objects of class identified by k using the one-argument constructor for that class. The object will be upcast to the base class T.</p>
<p>This function will retrieve the factory function for the desired class from the factory map (type M of this template) and use that to create the object. The subclass identified by k should have registered its factory function with the factory map. The factory function should create an instance of the subclass using the new operator, passing the constructor the argument a, and upcast the result to the base class type T.</p>
<p>If this function fails to retrieve a factory function for the given key k, it will throw an <a class="el" href="structminxlib_1_1factory_1_1unknown__type.html" title="Exception to indicate an unregistered subclass. ">unknown_type</a> exception. Clients should be prepared to handle this exception. </p>

</div>
</div>
<a class="anchor" id="a23478c0bf6a356dd1f6d37c78b33deef"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T , typename K , typename F , typename M  = factory_map&lt;K,F&gt;&gt; </div>
<div class="memtemplate">
template&lt;typename A , typename B &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static T* <a class="el" href="classminxlib_1_1factory.html">minxlib::factory</a>&lt; T, K, F, M &gt;::create </td>
          <td>(</td>
          <td class="paramtype">K&#160;</td>
          <td class="paramname"><em>k</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
          <td></td>
          <td class="paramtype">B&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create an instance of a subclass of T. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">k</td><td>Identifier for the desired subclass. </td></tr>
    <tr><td class="paramname">a</td><td>First argument for the subclass's constructor. </td></tr>
    <tr><td class="paramname">b</td><td>Second argument for the subclass's constructor. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An instance of the desired subclass or an exception.</dd></dl>
<p>This function is for creating objects of class identified by k using the two-argument constructor for that class. The object will be upcast to the base class T.</p>
<p>This function will retrieve the factory function for the desired class from the factory map (type M of this template) and use that to create the object. The subclass identified by k should have registered its factory function with the factory map. The factory function should create an instance of the subclass using the new operator, passing the constructor the arguments a and b, and upcast the result to the base class type T.</p>
<p>If this function fails to retrieve a factory function for the given key k, it will throw an <a class="el" href="structminxlib_1_1factory_1_1unknown__type.html" title="Exception to indicate an unregistered subclass. ">unknown_type</a> exception. Clients should be prepared to handle this exception. </p>

</div>
</div>
</div><!-- contents -->
</body>
</html>

Changes to api/classminxlib_1_1factory__map-members.html.

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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: Member List</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>
     
   </div>
   
   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>
   
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>minxlib</b>      </li>
      <li class="navelem"><a class="el" href="classminxlib_1_1factory__map.html">factory_map</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">minxlib::factory_map&lt; K, F, D &gt; Member List</div>  </div>
</div><!--header-->
<div class="contents">

This is the complete list of members for <a class="el" href="classminxlib_1_1factory__map.html">minxlib::factory_map&lt; K, F, D &gt;</a>, including all inherited members.<table>

  <tr class="memlist"><td><a class="el" href="classminxlib_1_1factory__map.html#ab32e6d6be2db5b446983eebaa9fde7e6">add</a>(K k, F f, D d=null_type())</td><td><a class="el" href="classminxlib_1_1factory__map.html">minxlib::factory_map&lt; K, F, D &gt;</a></td><td><code> [inline, static]</code></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1factory__map.html#af8c36d140b7c2607e7b61e251c82f1ba">begin</a>()</td><td><a class="el" href="classminxlib_1_1factory__map.html">minxlib::factory_map&lt; K, F, D &gt;</a></td><td><code> [static]</code></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1factory__map.html#a33f75e69291815b0a1127c4b7bb26974">const_iterator</a> typedef</td><td><a class="el" href="classminxlib_1_1factory__map.html">minxlib::factory_map&lt; K, F, D &gt;</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1factory__map.html#ab2858cb489d0fc9616038afab607f8fa">end</a>()</td><td><a class="el" href="classminxlib_1_1factory__map.html">minxlib::factory_map&lt; K, F, D &gt;</a></td><td><code> [static]</code></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1factory__map.html#a1ff69a8fdc0ad4fd91489aac5795f01e">get_data</a>(K k)</td><td><a class="el" href="classminxlib_1_1factory__map.html">minxlib::factory_map&lt; K, F, D &gt;</a></td><td><code> [inline, static]</code></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1factory__map.html#a4df3d89318d08b1046fe5fa8086fd6a5">get_factory</a>(K k)</td><td><a class="el" href="classminxlib_1_1factory__map.html">minxlib::factory_map&lt; K, F, D &gt;</a></td><td><code> [inline, static]</code></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1factory__map.html#aa833515e633c229aa3f68da576b06d3e">range</a>()</td><td><a class="el" href="classminxlib_1_1factory__map.html">minxlib::factory_map&lt; K, F, D &gt;</a></td><td><code> [inline, static]</code></td></tr>
</table></div><!-- contents -->
</body>
</html>






<


<
<
<



<
<




<
<



<

<



<

<
<
<
<
<




<
|
|
|
<
|
<
|
|





>
|
>
|
|
|
|
|
|
|



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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: Member List</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">


  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>

   </div>

   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>

  </td>





 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.4 -->
<div id="nav-path" class="navpath">
  <ul>

<li class="navelem"><b>minxlib</b></li><li class="navelem"><a class="el" href="classminxlib_1_1factory__map.html">factory_map</a></li>  </ul>

</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">minxlib::factory_map&lt; K, F, D &gt; Member List</div>  </div>
</div><!--header-->
<div class="contents">

<p>This is the complete list of members for <a class="el" href="classminxlib_1_1factory__map.html">minxlib::factory_map&lt; K, F, D &gt;</a>, including all inherited members.</p>
<table class="directory">
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1factory__map.html#ab32e6d6be2db5b446983eebaa9fde7e6">add</a>(K k, F f, D d=null_type())</td><td class="entry"><a class="el" href="classminxlib_1_1factory__map.html">minxlib::factory_map&lt; K, F, D &gt;</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">static</span></td></tr>
  <tr><td class="entry"><a class="el" href="classminxlib_1_1factory__map.html#af8c36d140b7c2607e7b61e251c82f1ba">begin</a>()</td><td class="entry"><a class="el" href="classminxlib_1_1factory__map.html">minxlib::factory_map&lt; K, F, D &gt;</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1factory__map.html#a33f75e69291815b0a1127c4b7bb26974">const_iterator</a> typedef</td><td class="entry"><a class="el" href="classminxlib_1_1factory__map.html">minxlib::factory_map&lt; K, F, D &gt;</a></td><td class="entry"></td></tr>
  <tr><td class="entry"><a class="el" href="classminxlib_1_1factory__map.html#ab2858cb489d0fc9616038afab607f8fa">end</a>()</td><td class="entry"><a class="el" href="classminxlib_1_1factory__map.html">minxlib::factory_map&lt; K, F, D &gt;</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1factory__map.html#a1ff69a8fdc0ad4fd91489aac5795f01e">get_data</a>(K k)</td><td class="entry"><a class="el" href="classminxlib_1_1factory__map.html">minxlib::factory_map&lt; K, F, D &gt;</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">static</span></td></tr>
  <tr><td class="entry"><a class="el" href="classminxlib_1_1factory__map.html#a4df3d89318d08b1046fe5fa8086fd6a5">get_factory</a>(K k)</td><td class="entry"><a class="el" href="classminxlib_1_1factory__map.html">minxlib::factory_map&lt; K, F, D &gt;</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">static</span></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1factory__map.html#aa833515e633c229aa3f68da576b06d3e">range</a>()</td><td class="entry"><a class="el" href="classminxlib_1_1factory__map.html">minxlib::factory_map&lt; K, F, D &gt;</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">static</span></td></tr>
</table></div><!-- contents -->
</body>
</html>

Changes to api/classminxlib_1_1factory__map.html.

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
133
134
135
136
137
138
139
140
...
146
147
148
149
150
151
152
153
154
155
156




157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177



178
179
180
181
182
183

184
185
186




187
188
189
190
191
192
193
194
195
196
197
198
199
200



201
202
203
204
205
206

207
208
209




210
211
212
213
214
215
216
217
218
219
220
221
222
223



224
225
226
227
228
229
230

231
232
233




234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252



253
254
255
256
257
258
259

260
261
262




263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281



282
283
284
285
286
287

288
289
290




291
292
293
294
295
296
297
298
299
300

301
302
303

304
305

306
307
308
309


310
311
312
313
314
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: minxlib::factory_map&lt; K, F, D &gt; Class Template Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>
     
   </div>
   
   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>
   
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>minxlib</b>      </li>
      <li class="navelem"><a class="el" href="classminxlib_1_1factory__map.html">factory_map</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a>  </div>

  <div class="headertitle">
<div class="title">minxlib::factory_map&lt; K, F, D &gt; Class Template Reference<div class="ingroups"><a class="el" href="group__grp__factory.html">minxlib's Object Factory Framework</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>A registry mapping keys to factory functions.  
 <a href="classminxlib_1_1factory__map.html#details">More...</a></p>

<p><code>#include &lt;factory.hh&gt;</code></p>

<p><a href="classminxlib_1_1factory__map-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>

Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structminxlib_1_1factory__map_1_1bad__key.html">bad_key</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Exception to indicate nonexistent key.  <a href="structminxlib_1_1factory__map_1_1bad__key.html#details">More...</a><br/></td></tr>

<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1factory__map_1_1iterator.html">iterator</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Iterator for accessing client-supplied arbitrary data.  <a href="classminxlib_1_1factory__map_1_1iterator.html#details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-types"></a>



Public Types</h2></td></tr>
<tr class="memitem:a33f75e69291815b0a1127c4b7bb26974"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classminxlib_1_1factory__map_1_1iterator.html">iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1factory__map.html#a33f75e69291815b0a1127c4b7bb26974">const_iterator</a></td></tr>
<tr class="memdesc:a33f75e69291815b0a1127c4b7bb26974"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read-only iterators.  <a href="#a33f75e69291815b0a1127c4b7bb26974"></a><br/></td></tr>


<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:ab32e6d6be2db5b446983eebaa9fde7e6"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1factory__map.html#ab32e6d6be2db5b446983eebaa9fde7e6">add</a> (K k, F f, D d=null_type())</td></tr>
<tr class="memdesc:ab32e6d6be2db5b446983eebaa9fde7e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Register a factory and optional data.  <a href="#ab32e6d6be2db5b446983eebaa9fde7e6"></a><br/></td></tr>

<tr class="memitem:a4df3d89318d08b1046fe5fa8086fd6a5"><td class="memItemLeft" align="right" valign="top">static F&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1factory__map.html#a4df3d89318d08b1046fe5fa8086fd6a5">get_factory</a> (K k)</td></tr>
<tr class="memdesc:a4df3d89318d08b1046fe5fa8086fd6a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the factory function for a class.  <a href="#a4df3d89318d08b1046fe5fa8086fd6a5"></a><br/></td></tr>

<tr class="memitem:a1ff69a8fdc0ad4fd91489aac5795f01e"><td class="memItemLeft" align="right" valign="top">static D&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1factory__map.html#a1ff69a8fdc0ad4fd91489aac5795f01e">get_data</a> (K k)</td></tr>
<tr class="memdesc:a1ff69a8fdc0ad4fd91489aac5795f01e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the user-supplied arbitrary data for a class.  <a href="#a1ff69a8fdc0ad4fd91489aac5795f01e"></a><br/></td></tr>

<tr class="memitem:af8c36d140b7c2607e7b61e251c82f1ba"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classminxlib_1_1factory__map.html#a33f75e69291815b0a1127c4b7bb26974">const_iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1factory__map.html#af8c36d140b7c2607e7b61e251c82f1ba">begin</a> ()</td></tr>
<tr class="memdesc:af8c36d140b7c2607e7b61e251c82f1ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Obtain read-only iterator to first data item.  <a href="#af8c36d140b7c2607e7b61e251c82f1ba"></a><br/></td></tr>

<tr class="memitem:ab2858cb489d0fc9616038afab607f8fa"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classminxlib_1_1factory__map.html#a33f75e69291815b0a1127c4b7bb26974">const_iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1factory__map.html#ab2858cb489d0fc9616038afab607f8fa">end</a> ()</td></tr>
<tr class="memdesc:ab2858cb489d0fc9616038afab607f8fa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Obtain read-only iterator to one past last data item.  <a href="#ab2858cb489d0fc9616038afab607f8fa"></a><br/></td></tr>

<tr class="memitem:aa833515e633c229aa3f68da576b06d3e"><td class="memItemLeft" align="right" valign="top">static std::pair<br class="typebreak"/>
&lt; <a class="el" href="classminxlib_1_1factory__map.html#a33f75e69291815b0a1127c4b7bb26974">const_iterator</a>, <br class="typebreak"/>
<a class="el" href="classminxlib_1_1factory__map.html#a33f75e69291815b0a1127c4b7bb26974">const_iterator</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1factory__map.html#aa833515e633c229aa3f68da576b06d3e">range</a> ()</td></tr>
<tr class="memdesc:aa833515e633c229aa3f68da576b06d3e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pack begin and end iterators in an STL pair.  <a href="#aa833515e633c229aa3f68da576b06d3e"></a><br/></td></tr>

</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename K, typename F, typename D = null_type&gt;<br/>
class minxlib::factory_map&lt; K, F, D &gt;</h3>

<p>A registry mapping keys to factory functions. </p>
<p>This class implements a singleton map that holds the subclass factory functions (type F) for classes in a hierarchy identified by keys of type K. In addition to the factory functions, it can also hold arbitrary data of type D.</p>
<p>The factory functions are used by the factory class defined in this file. However, the optional arbitrary data is only held and can be used by client classes in whatever way they see fit. In minxlib, this is usually used for the pythonize functions; see event.hh (for example).</p>
<dl class="section note"><dt>Note:</dt><dd>To use more than a single item of arbitrary data, you can use a boost::tuple.</dd></dl>
<dl class="section user"><dt></b></dt><dd>As mentioned earlier, this object factory framework is designed specifically for minxlib and is not meant for wide reuse. One of the implications of this is that the types K, F, and D should be cheap to construct and copy. In minxlib, K is typically an integral type, F and D are function pointers. </dd></dl>
</div><hr/><h2>Member Typedef Documentation</h2>
<a class="anchor" id="a33f75e69291815b0a1127c4b7bb26974"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename K, typename F, typename D = null_type&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="classminxlib_1_1factory__map_1_1iterator.html">iterator</a> <a class="el" href="classminxlib_1_1factory__map.html">minxlib::factory_map</a>&lt; K, F, D &gt;::<a class="el" href="classminxlib_1_1factory__map.html#a33f75e69291815b0a1127c4b7bb26974">const_iterator</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Read-only iterators. </p>
<p>This class's iterators are already read-only. Therefore, the const_iterator type is the same as the iterator type. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ab32e6d6be2db5b446983eebaa9fde7e6"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename K, typename F, typename D = null_type&gt; </div>



      <table class="memname">
        <tr>
          <td class="memname">static bool <a class="el" href="classminxlib_1_1factory__map.html">minxlib::factory_map</a>&lt; K, F, D &gt;::<a class="el" href="classminxlib_1_1factory__map.html#ab32e6d6be2db5b446983eebaa9fde7e6">add</a> </td>
          <td>(</td>
          <td class="paramtype">K&#160;</td>
          <td class="paramname"><em>k</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
          <td></td>
          <td class="paramtype">D&#160;</td>
          <td class="paramname"><em>d</em> = <code>null_type()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>




<div class="memdoc">

<p>Register a factory and optional data. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">k</td><td>The key identifying a class in some hierarchy. </td></tr>
    <tr><td class="paramname">f</td><td>The factory function for the class identified by k. </td></tr>
    <tr><td class="paramname">d</td><td>Optional data to be stored along with the class's factory. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>True (i.e., useless return value).</dd></dl>
<p>This function is meant to be used by subclasses in a class hierarchy that is to be instantiated with an object factory. The typical usage pattern would be for each subclass in the hierarchy to define a static bool data member and call this function in that data member's initializer. </p>

</div>
</div>
<a class="anchor" id="af8c36d140b7c2607e7b61e251c82f1ba"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename K , typename F , typename D &gt; </div>



      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classminxlib_1_1factory__map.html">factory_map</a>&lt; K, F, D &gt;::<a class="el" href="classminxlib_1_1factory__map_1_1iterator.html">iterator</a> <a class="el" href="classminxlib_1_1factory__map.html">minxlib::factory_map</a>&lt; K, F, D &gt;::<a class="el" href="classminxlib_1_1factory__map.html#af8c36d140b7c2607e7b61e251c82f1ba">begin</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static]</code></td>

        </tr>
      </table>
</div>




<div class="memdoc">

<p>Obtain read-only iterator to first data item. </p>
<dl class="section return"><dt>Returns:</dt><dd>Iterator to first item.</dd></dl>
<p>When some function wants to iterate over all the arbitrary data items supplied during the registration of the various subclass factories, it can request an iterator to the first item of the underlying sequence using this function.</p>
<dl class="section note"><dt>Note:</dt><dd>Once data is stored in a <a class="el" href="classminxlib_1_1factory__map.html" title="A registry mapping keys to factory functions.">factory_map</a>, clients may only obtain read-only access to it. That is, the iterator returned by this function is a const_iterator. </dd></dl>

</div>
</div>
<a class="anchor" id="ab2858cb489d0fc9616038afab607f8fa"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename K , typename F , typename D &gt; </div>



      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classminxlib_1_1factory__map.html">factory_map</a>&lt; K, F, D &gt;::<a class="el" href="classminxlib_1_1factory__map_1_1iterator.html">iterator</a> <a class="el" href="classminxlib_1_1factory__map.html">minxlib::factory_map</a>&lt; K, F, D &gt;::<a class="el" href="classminxlib_1_1factory__map.html#ab2858cb489d0fc9616038afab607f8fa">end</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static]</code></td>

        </tr>
      </table>
</div>




<div class="memdoc">

<p>Obtain read-only iterator to one past last data item. </p>
<dl class="section return"><dt>Returns:</dt><dd>Iterator pointing to one-past last item.</dd></dl>
<p>When some function wants to iterate over all the arbitrary data items supplied during the registration of the various subclass factories, it can request an iterator to one-past the last item of the underlying sequence using this function.</p>
<dl class="section note"><dt>Note:</dt><dd>Once data is stored in a <a class="el" href="classminxlib_1_1factory__map.html" title="A registry mapping keys to factory functions.">factory_map</a>, clients may only obtain read-only access to it. That is, the iterator returned by this function is a const_iterator. </dd></dl>

</div>
</div>
<a class="anchor" id="a1ff69a8fdc0ad4fd91489aac5795f01e"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename K, typename F, typename D = null_type&gt; </div>



      <table class="memname">
        <tr>
          <td class="memname">static D <a class="el" href="classminxlib_1_1factory__map.html">minxlib::factory_map</a>&lt; K, F, D &gt;::<a class="el" href="classminxlib_1_1factory__map.html#a1ff69a8fdc0ad4fd91489aac5795f01e">get_data</a> </td>
          <td>(</td>
          <td class="paramtype">K&#160;</td>
          <td class="paramname"><em>k</em></td><td>)</td>
          <td><code> [inline, static]</code></td>

        </tr>
      </table>
</div>




<div class="memdoc">

<p>Retrieve the user-supplied arbitrary data for a class. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">k</td><td>They key identifying the class whose user data we want. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The user data for the specified class.</dd></dl>
<p>This function is meant to be called by clients so they can get the arbitrary data they supplied when registering their factories. Typically, however, clients will iterate over the map and use the data values through that process. </p>

</div>
</div>
<a class="anchor" id="a4df3d89318d08b1046fe5fa8086fd6a5"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename K, typename F, typename D = null_type&gt; </div>



      <table class="memname">
        <tr>
          <td class="memname">static F <a class="el" href="classminxlib_1_1factory__map.html">minxlib::factory_map</a>&lt; K, F, D &gt;::<a class="el" href="classminxlib_1_1factory__map.html#a4df3d89318d08b1046fe5fa8086fd6a5">get_factory</a> </td>
          <td>(</td>
          <td class="paramtype">K&#160;</td>
          <td class="paramname"><em>k</em></td><td>)</td>
          <td><code> [inline, static]</code></td>

        </tr>
      </table>
</div>




<div class="memdoc">

<p>Retrieve the factory function for a class. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">k</td><td>They key identifying the class whose factory we want. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The factory function for the specified class.</dd></dl>
<p>This function is meant to be called by the <a class="el" href="classminxlib_1_1factory.html" title="Object factory for subclasses of type T.">minxlib::factory</a> class. Other clients should have little use for it. </p>

</div>
</div>
<a class="anchor" id="aa833515e633c229aa3f68da576b06d3e"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename K, typename F, typename D = null_type&gt; </div>



      <table class="memname">
        <tr>
          <td class="memname">static std::pair&lt;<a class="el" href="classminxlib_1_1factory__map.html#a33f75e69291815b0a1127c4b7bb26974">const_iterator</a>, <a class="el" href="classminxlib_1_1factory__map.html#a33f75e69291815b0a1127c4b7bb26974">const_iterator</a>&gt; <a class="el" href="classminxlib_1_1factory__map.html">minxlib::factory_map</a>&lt; K, F, D &gt;::<a class="el" href="classminxlib_1_1factory__map.html#aa833515e633c229aa3f68da576b06d3e">range</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, static]</code></td>

        </tr>
      </table>
</div>




<div class="memdoc">

<p>Pack begin and end iterators in an STL pair. </p>
<dl class="section return"><dt>Returns:</dt><dd>STL pair containing begin and end iterators.</dd></dl>
<p>This function is meant to be used in conjunction with BOOST_FOREACH. Here is an illustrative (albeit non-buildable) example:</p>
<div class="fragment"><pre class="fragment">            <span class="keyword">class </span>foo { ... } ;
            <span class="keyword">class </span>bar { ... } ;
            <span class="keyword">typedef</span> foo* (*create_foo)() ;
            <span class="keyword">typedef</span> factory_map&lt;int, create_foo, bar&gt; registry ;


            <span class="comment">// code to register various factory functions and bar</span>
            <span class="comment">// objects in registry</span>


            <span class="keywordtype">void</span> f()
            {

                BOOST_FOREACH(<span class="keyword">const</span> bar&amp; b, registry::range())
                    b.do_something() ;
            }
</pre></div> 


</div>
</div>
</div><!-- contents -->
</body>
</html>






<


<
<
<



<
<




<
<



<

<



<

<
<
<
<
<




<
|
|
|
<
|
<
|
|




|
>









<
<

<
>



>


<
>
>
>


|
>
>
|


|
>

|
>

|
>

|
>

|
>



|
>

|






|
|
|










<
|






|





>
>
>


|







 







|


|
>
>
>
>
|


|







|









>
>
>


|

|
<
>


|
>
>
>
>
|


|

|








>
>
>


|

|
<
>


|
>
>
>
>
|


|

|








>
>
>


|


|
<
>


|
>
>
>
>
|


|





|









>
>
>


|


|
<
>


|
>
>
>
>
|


|





|
|








>
>
>


|

|
<
>


|
>
>
>
>
|


|

|
|
|
|
<
>
|
|
<
>
|
<
>
|
|
<
<
>
>





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
133
...
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182

183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212

213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243

244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279

280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314

315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331

332
333
334

335
336

337
338
339


340
341
342
343
344
345
346
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: minxlib::factory_map&lt; K, F, D &gt; Class Template Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">


  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>

   </div>

   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>

  </td>





 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.4 -->
<div id="nav-path" class="navpath">
  <ul>

<li class="navelem"><b>minxlib</b></li><li class="navelem"><a class="el" href="classminxlib_1_1factory__map.html">factory_map</a></li>  </ul>

</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="classminxlib_1_1factory__map-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">minxlib::factory_map&lt; K, F, D &gt; Class Template Reference<div class="ingroups"><a class="el" href="group__grp__factory.html">minxlib's Object Factory Framework</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>A registry mapping keys to factory functions.  
 <a href="classminxlib_1_1factory__map.html#details">More...</a></p>

<p><code>#include &lt;factory.hh&gt;</code></p>


<table class="memberdecls">

<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structminxlib_1_1factory__map_1_1bad__key.html">bad_key</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Exception to indicate nonexistent key.  <a href="structminxlib_1_1factory__map_1_1bad__key.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1factory__map_1_1iterator.html">iterator</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Iterator for accessing client-supplied arbitrary data.  <a href="classminxlib_1_1factory__map_1_1iterator.html#details">More...</a><br/></td></tr>

<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a33f75e69291815b0a1127c4b7bb26974"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classminxlib_1_1factory__map_1_1iterator.html">iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1factory__map.html#a33f75e69291815b0a1127c4b7bb26974">const_iterator</a></td></tr>
<tr class="memdesc:a33f75e69291815b0a1127c4b7bb26974"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read-only iterators.  <a href="#a33f75e69291815b0a1127c4b7bb26974">More...</a><br/></td></tr>
<tr class="separator:a33f75e69291815b0a1127c4b7bb26974"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:ab32e6d6be2db5b446983eebaa9fde7e6"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1factory__map.html#ab32e6d6be2db5b446983eebaa9fde7e6">add</a> (K k, F f, D d=null_type())</td></tr>
<tr class="memdesc:ab32e6d6be2db5b446983eebaa9fde7e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Register a factory and optional data.  <a href="#ab32e6d6be2db5b446983eebaa9fde7e6">More...</a><br/></td></tr>
<tr class="separator:ab32e6d6be2db5b446983eebaa9fde7e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4df3d89318d08b1046fe5fa8086fd6a5"><td class="memItemLeft" align="right" valign="top">static F&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1factory__map.html#a4df3d89318d08b1046fe5fa8086fd6a5">get_factory</a> (K k)</td></tr>
<tr class="memdesc:a4df3d89318d08b1046fe5fa8086fd6a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the factory function for a class.  <a href="#a4df3d89318d08b1046fe5fa8086fd6a5">More...</a><br/></td></tr>
<tr class="separator:a4df3d89318d08b1046fe5fa8086fd6a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1ff69a8fdc0ad4fd91489aac5795f01e"><td class="memItemLeft" align="right" valign="top">static D&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1factory__map.html#a1ff69a8fdc0ad4fd91489aac5795f01e">get_data</a> (K k)</td></tr>
<tr class="memdesc:a1ff69a8fdc0ad4fd91489aac5795f01e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the user-supplied arbitrary data for a class.  <a href="#a1ff69a8fdc0ad4fd91489aac5795f01e">More...</a><br/></td></tr>
<tr class="separator:a1ff69a8fdc0ad4fd91489aac5795f01e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af8c36d140b7c2607e7b61e251c82f1ba"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classminxlib_1_1factory__map.html#a33f75e69291815b0a1127c4b7bb26974">const_iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1factory__map.html#af8c36d140b7c2607e7b61e251c82f1ba">begin</a> ()</td></tr>
<tr class="memdesc:af8c36d140b7c2607e7b61e251c82f1ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Obtain read-only iterator to first data item.  <a href="#af8c36d140b7c2607e7b61e251c82f1ba">More...</a><br/></td></tr>
<tr class="separator:af8c36d140b7c2607e7b61e251c82f1ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab2858cb489d0fc9616038afab607f8fa"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classminxlib_1_1factory__map.html#a33f75e69291815b0a1127c4b7bb26974">const_iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1factory__map.html#ab2858cb489d0fc9616038afab607f8fa">end</a> ()</td></tr>
<tr class="memdesc:ab2858cb489d0fc9616038afab607f8fa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Obtain read-only iterator to one past last data item.  <a href="#ab2858cb489d0fc9616038afab607f8fa">More...</a><br/></td></tr>
<tr class="separator:ab2858cb489d0fc9616038afab607f8fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa833515e633c229aa3f68da576b06d3e"><td class="memItemLeft" align="right" valign="top">static std::pair<br class="typebreak"/>
&lt; <a class="el" href="classminxlib_1_1factory__map.html#a33f75e69291815b0a1127c4b7bb26974">const_iterator</a>, <br class="typebreak"/>
<a class="el" href="classminxlib_1_1factory__map.html#a33f75e69291815b0a1127c4b7bb26974">const_iterator</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1factory__map.html#aa833515e633c229aa3f68da576b06d3e">range</a> ()</td></tr>
<tr class="memdesc:aa833515e633c229aa3f68da576b06d3e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pack begin and end iterators in an STL pair.  <a href="#aa833515e633c229aa3f68da576b06d3e">More...</a><br/></td></tr>
<tr class="separator:aa833515e633c229aa3f68da576b06d3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename K, typename F, typename D = null_type&gt;<br/>
class minxlib::factory_map&lt; K, F, D &gt;</h3>

<p>A registry mapping keys to factory functions. </p>
<p>This class implements a singleton map that holds the subclass factory functions (type F) for classes in a hierarchy identified by keys of type K. In addition to the factory functions, it can also hold arbitrary data of type D.</p>
<p>The factory functions are used by the factory class defined in this file. However, the optional arbitrary data is only held and can be used by client classes in whatever way they see fit. In minxlib, this is usually used for the pythonize functions; see event.hh (for example).</p>
<dl class="section note"><dt>Note</dt><dd>To use more than a single item of arbitrary data, you can use a boost::tuple.</dd></dl>
<dl class="section user"><dt></dt><dd>As mentioned earlier, this object factory framework is designed specifically for minxlib and is not meant for wide reuse. One of the implications of this is that the types K, F, and D should be cheap to construct and copy. In minxlib, K is typically an integral type, F and D are function pointers. </dd></dl>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a class="anchor" id="a33f75e69291815b0a1127c4b7bb26974"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename K, typename F, typename D = null_type&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="classminxlib_1_1factory__map_1_1iterator.html">iterator</a> <a class="el" href="classminxlib_1_1factory__map.html">minxlib::factory_map</a>&lt; K, F, D &gt;::<a class="el" href="classminxlib_1_1factory__map.html#a33f75e69291815b0a1127c4b7bb26974">const_iterator</a></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Read-only iterators. </p>
<p>This class's iterators are already read-only. Therefore, the const_iterator type is the same as the iterator type. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ab32e6d6be2db5b446983eebaa9fde7e6"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename K, typename F, typename D = null_type&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static bool <a class="el" href="classminxlib_1_1factory__map.html">minxlib::factory_map</a>&lt; K, F, D &gt;::add </td>
          <td>(</td>
          <td class="paramtype">K&#160;</td>
          <td class="paramname"><em>k</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
          <td></td>
          <td class="paramtype">D&#160;</td>
          <td class="paramname"><em>d</em> = <code>null_type()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Register a factory and optional data. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">k</td><td>The key identifying a class in some hierarchy. </td></tr>
    <tr><td class="paramname">f</td><td>The factory function for the class identified by k. </td></tr>
    <tr><td class="paramname">d</td><td>Optional data to be stored along with the class's factory. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True (i.e., useless return value).</dd></dl>
<p>This function is meant to be used by subclasses in a class hierarchy that is to be instantiated with an object factory. The typical usage pattern would be for each subclass in the hierarchy to define a static bool data member and call this function in that data member's initializer. </p>

</div>
</div>
<a class="anchor" id="af8c36d140b7c2607e7b61e251c82f1ba"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename K , typename F , typename D &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classminxlib_1_1factory__map.html">factory_map</a>&lt; K, F, D &gt;::<a class="el" href="classminxlib_1_1factory__map_1_1iterator.html">iterator</a> <a class="el" href="classminxlib_1_1factory__map.html">minxlib::factory_map</a>&lt; K, F, D &gt;::begin </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>

          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Obtain read-only iterator to first data item. </p>
<dl class="section return"><dt>Returns</dt><dd>Iterator to first item.</dd></dl>
<p>When some function wants to iterate over all the arbitrary data items supplied during the registration of the various subclass factories, it can request an iterator to the first item of the underlying sequence using this function.</p>
<dl class="section note"><dt>Note</dt><dd>Once data is stored in a <a class="el" href="classminxlib_1_1factory__map.html" title="A registry mapping keys to factory functions. ">factory_map</a>, clients may only obtain read-only access to it. That is, the iterator returned by this function is a const_iterator. </dd></dl>

</div>
</div>
<a class="anchor" id="ab2858cb489d0fc9616038afab607f8fa"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename K , typename F , typename D &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classminxlib_1_1factory__map.html">factory_map</a>&lt; K, F, D &gt;::<a class="el" href="classminxlib_1_1factory__map_1_1iterator.html">iterator</a> <a class="el" href="classminxlib_1_1factory__map.html">minxlib::factory_map</a>&lt; K, F, D &gt;::end </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>

          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Obtain read-only iterator to one past last data item. </p>
<dl class="section return"><dt>Returns</dt><dd>Iterator pointing to one-past last item.</dd></dl>
<p>When some function wants to iterate over all the arbitrary data items supplied during the registration of the various subclass factories, it can request an iterator to one-past the last item of the underlying sequence using this function.</p>
<dl class="section note"><dt>Note</dt><dd>Once data is stored in a <a class="el" href="classminxlib_1_1factory__map.html" title="A registry mapping keys to factory functions. ">factory_map</a>, clients may only obtain read-only access to it. That is, the iterator returned by this function is a const_iterator. </dd></dl>

</div>
</div>
<a class="anchor" id="a1ff69a8fdc0ad4fd91489aac5795f01e"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename K, typename F, typename D = null_type&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static D <a class="el" href="classminxlib_1_1factory__map.html">minxlib::factory_map</a>&lt; K, F, D &gt;::get_data </td>
          <td>(</td>
          <td class="paramtype">K&#160;</td>
          <td class="paramname"><em>k</em>)</td><td></td>

          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Retrieve the user-supplied arbitrary data for a class. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">k</td><td>They key identifying the class whose user data we want. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The user data for the specified class.</dd></dl>
<p>This function is meant to be called by clients so they can get the arbitrary data they supplied when registering their factories. Typically, however, clients will iterate over the map and use the data values through that process. </p>

</div>
</div>
<a class="anchor" id="a4df3d89318d08b1046fe5fa8086fd6a5"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename K, typename F, typename D = null_type&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static F <a class="el" href="classminxlib_1_1factory__map.html">minxlib::factory_map</a>&lt; K, F, D &gt;::get_factory </td>
          <td>(</td>
          <td class="paramtype">K&#160;</td>
          <td class="paramname"><em>k</em>)</td><td></td>

          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Retrieve the factory function for a class. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">k</td><td>They key identifying the class whose factory we want. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The factory function for the specified class.</dd></dl>
<p>This function is meant to be called by the <a class="el" href="classminxlib_1_1factory.html" title="Object factory for subclasses of type T. ">minxlib::factory</a> class. Other clients should have little use for it. </p>

</div>
</div>
<a class="anchor" id="aa833515e633c229aa3f68da576b06d3e"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename K, typename F, typename D = null_type&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static std::pair&lt;<a class="el" href="classminxlib_1_1factory__map.html#a33f75e69291815b0a1127c4b7bb26974">const_iterator</a>, <a class="el" href="classminxlib_1_1factory__map.html#a33f75e69291815b0a1127c4b7bb26974">const_iterator</a>&gt; <a class="el" href="classminxlib_1_1factory__map.html">minxlib::factory_map</a>&lt; K, F, D &gt;::range </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>

          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Pack begin and end iterators in an STL pair. </p>
<dl class="section return"><dt>Returns</dt><dd>STL pair containing begin and end iterators.</dd></dl>
<p>This function is meant to be used in conjunction with BOOST_FOREACH. Here is an illustrative (albeit non-buildable) example:</p>
<div class="fragment"><div class="line"><span class="keyword">class </span>foo { ... } ;</div>
<div class="line"><span class="keyword">class </span>bar { ... } ;</div>
<div class="line"><span class="keyword">typedef</span> foo* (*create_foo)() ;</div>
<div class="line"><span class="keyword">typedef</span> factory_map&lt;int, create_foo, bar&gt; registry ;</div>

<div class="line"></div>
<div class="line"><span class="comment">// code to register various factory functions and bar</span></div>
<div class="line"><span class="comment">// objects in registry</span></div>

<div class="line"></div>
<div class="line"><span class="keywordtype">void</span> f()</div>

<div class="line">{</div>
<div class="line">    BOOST_FOREACH(<span class="keyword">const</span> bar&amp; b, registry::range())</div>
<div class="line">        b.do_something() ;</div>


<div class="line">}</div>
</div><!-- fragment --> 
</div>
</div>
</div><!-- contents -->
</body>
</html>

Changes to api/classminxlib_1_1factory__map_1_1iterator-members.html.

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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: Member List</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>
     
   </div>
   
   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>
   
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>minxlib</b>      </li>
      <li class="navelem"><a class="el" href="classminxlib_1_1factory__map.html">factory_map</a>      </li>
      <li class="navelem"><a class="el" href="classminxlib_1_1factory__map_1_1iterator.html">iterator</a>      </li>
    </ul>

  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">minxlib::factory_map&lt; K, F, D &gt;::iterator Member List</div>  </div>
</div><!--header-->
<div class="contents">

This is the complete list of members for <a class="el" href="classminxlib_1_1factory__map_1_1iterator.html">minxlib::factory_map&lt; K, F, D &gt;::iterator</a>, including all inherited members.<table>

</table></div><!-- contents -->
</body>
</html>






<


<
<
<



<
<




<
<



<

<



<

<
<
<
<
<




<
|
|
|
<
<
<
<
>
|
|





>
|
>



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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: Member List</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">


  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>

   </div>

   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>

  </td>





 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.4 -->
<div id="nav-path" class="navpath">
  <ul>




<li class="navelem"><b>minxlib</b></li><li class="navelem"><a class="el" href="classminxlib_1_1factory__map.html">factory_map</a></li><li class="navelem"><a class="el" href="classminxlib_1_1factory__map_1_1iterator.html">iterator</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">minxlib::factory_map&lt; K, F, D &gt;::iterator Member List</div>  </div>
</div><!--header-->
<div class="contents">

<p>This is the complete list of members for <a class="el" href="classminxlib_1_1factory__map_1_1iterator.html">minxlib::factory_map&lt; K, F, D &gt;::iterator</a>, including all inherited members.</p>
<table class="directory">
</table></div><!-- contents -->
</body>
</html>

Changes to api/classminxlib_1_1factory__map_1_1iterator.html.

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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: minxlib::factory_map&lt; K, F, D &gt;::iterator Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>
     
   </div>
   
   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>
   
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>minxlib</b>      </li>
      <li class="navelem"><a class="el" href="classminxlib_1_1factory__map.html">factory_map</a>      </li>
      <li class="navelem"><a class="el" href="classminxlib_1_1factory__map_1_1iterator.html">iterator</a>      </li>
    </ul>

  </div>
</div>
<div class="header">


  <div class="headertitle">
<div class="title">minxlib::factory_map&lt; K, F, D &gt;::iterator Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Iterator for accessing client-supplied arbitrary data.  
 <a href="classminxlib_1_1factory__map_1_1iterator.html#details">More...</a></p>

<p><code>#include &lt;factory.hh&gt;</code></p>

<p><a href="classminxlib_1_1factory__map_1_1iterator-members.html">List of all members.</a></p>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename K, typename F, typename D = null_type&gt;<br/>
class minxlib::factory_map&lt; K, F, D &gt;::iterator</h3>

<p>Iterator for accessing client-supplied arbitrary data. </p>
<p>Although clients may retrieve the arbitrary data they supply by passing the desired key to the <a class="el" href="classminxlib_1_1factory__map.html#a1ff69a8fdc0ad4fd91489aac5795f01e" title="Retrieve the user-supplied arbitrary data for a class.">factory_map::get_data()</a> function, it may be more convenient to iterate over the underlying map. This inner class provides the necessary interface for iteration.</p>
<dl class="section note"><dt>Note:</dt><dd>This iterator class is built on the const_iterator provided by the underlying STL map. Thus, it only supports read access to the client-supplied data.</dd></dl>
<dl class="section user"><dt></b></dt><dd>This class implements its functionality using Boost.Iterator, whose magic obviates the need for any public methods. </dd></dl>
</div></div><!-- contents -->
</body>
</html>






<


<
<
<



<
<




<
<



<

<



<

<
<
<
<
<




<
|
|
|
<
<
<
<
>
|
|

>
>









<
<
|




|
|
|



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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: minxlib::factory_map&lt; K, F, D &gt;::iterator Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">


  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>

   </div>

   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>

  </td>





 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.4 -->
<div id="nav-path" class="navpath">
  <ul>




<li class="navelem"><b>minxlib</b></li><li class="navelem"><a class="el" href="classminxlib_1_1factory__map.html">factory_map</a></li><li class="navelem"><a class="el" href="classminxlib_1_1factory__map_1_1iterator.html">iterator</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="classminxlib_1_1factory__map_1_1iterator-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">minxlib::factory_map&lt; K, F, D &gt;::iterator Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Iterator for accessing client-supplied arbitrary data.  
 <a href="classminxlib_1_1factory__map_1_1iterator.html#details">More...</a></p>

<p><code>#include &lt;factory.hh&gt;</code></p>


<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename K, typename F, typename D = null_type&gt;<br/>
class minxlib::factory_map&lt; K, F, D &gt;::iterator</h3>

<p>Iterator for accessing client-supplied arbitrary data. </p>
<p>Although clients may retrieve the arbitrary data they supply by passing the desired key to the <a class="el" href="classminxlib_1_1factory__map.html#a1ff69a8fdc0ad4fd91489aac5795f01e" title="Retrieve the user-supplied arbitrary data for a class. ">factory_map::get_data()</a> function, it may be more convenient to iterate over the underlying map. This inner class provides the necessary interface for iteration.</p>
<dl class="section note"><dt>Note</dt><dd>This iterator class is built on the const_iterator provided by the underlying STL map. Thus, it only supports read access to the client-supplied data.</dd></dl>
<dl class="section user"><dt></dt><dd>This class implements its functionality using Boost.Iterator, whose magic obviates the need for any public methods. </dd></dl>
</div></div><!-- contents -->
</body>
</html>

Changes to api/classminxlib_1_1logging-members.html.

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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: Member List</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>
     
   </div>
   
   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>
   
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>minxlib</b>      </li>
      <li class="navelem"><a class="el" href="classminxlib_1_1logging.html">logging</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">minxlib::logging Member List</div>  </div>
</div><!--header-->
<div class="contents">

This is the complete list of members for <a class="el" href="classminxlib_1_1logging.html">minxlib::logging</a>, including all inherited members.<table>

  <tr class="memlist"><td><a class="el" href="classminxlib_1_1logging.html#a37f8fd2296d44d20055b8f39735f9137">critical</a>()</td><td><a class="el" href="classminxlib_1_1logging.html">minxlib::logging</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1logging.html#a93c172cbb3da197fb7cbd187056b2631">debug</a>()</td><td><a class="el" href="classminxlib_1_1logging.html">minxlib::logging</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1logging.html#a80656f6b58913cbdd6d225e904b1e4ce">error</a>()</td><td><a class="el" href="classminxlib_1_1logging.html">minxlib::logging</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1logging.html#a9a8a9a6022013ee9f9b79a5ec112561d">get_logger</a>(const std::string &amp;name)</td><td><a class="el" href="classminxlib_1_1logging.html">minxlib::logging</a></td><td><code> [static]</code></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1logging.html#a4f376175515a5f06adf0cfd74a43a447">info</a>()</td><td><a class="el" href="classminxlib_1_1logging.html">minxlib::logging</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1logging.html#a408b2838a2ad027e14e938848a8eb899">logging</a>()</td><td><a class="el" href="classminxlib_1_1logging.html">minxlib::logging</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1logging.html#a523fe315d0329b55b264ee0e63c12c46">warning</a>()</td><td><a class="el" href="classminxlib_1_1logging.html">minxlib::logging</a></td><td></td></tr>
</table></div><!-- contents -->
</body>
</html>






<


<
<
<



<
<




<
<



<

<



<

<
<
<
<
<




<
|
|
|
<
|
<
|
|





>
|
>
|
|
|
|
|
|
|



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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: Member List</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">


  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>

   </div>

   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>

  </td>





 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.4 -->
<div id="nav-path" class="navpath">
  <ul>

<li class="navelem"><b>minxlib</b></li><li class="navelem"><a class="el" href="classminxlib_1_1logging.html">logging</a></li>  </ul>

</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">minxlib::logging Member List</div>  </div>
</div><!--header-->
<div class="contents">

<p>This is the complete list of members for <a class="el" href="classminxlib_1_1logging.html">minxlib::logging</a>, including all inherited members.</p>
<table class="directory">
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1logging.html#a37f8fd2296d44d20055b8f39735f9137">critical</a>()</td><td class="entry"><a class="el" href="classminxlib_1_1logging.html">minxlib::logging</a></td><td class="entry"></td></tr>
  <tr><td class="entry"><a class="el" href="classminxlib_1_1logging.html#a93c172cbb3da197fb7cbd187056b2631">debug</a>()</td><td class="entry"><a class="el" href="classminxlib_1_1logging.html">minxlib::logging</a></td><td class="entry"></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1logging.html#a80656f6b58913cbdd6d225e904b1e4ce">error</a>()</td><td class="entry"><a class="el" href="classminxlib_1_1logging.html">minxlib::logging</a></td><td class="entry"></td></tr>
  <tr><td class="entry"><a class="el" href="classminxlib_1_1logging.html#a9a8a9a6022013ee9f9b79a5ec112561d">get_logger</a>(const std::string &amp;name)</td><td class="entry"><a class="el" href="classminxlib_1_1logging.html">minxlib::logging</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1logging.html#a4f376175515a5f06adf0cfd74a43a447">info</a>()</td><td class="entry"><a class="el" href="classminxlib_1_1logging.html">minxlib::logging</a></td><td class="entry"></td></tr>
  <tr><td class="entry"><a class="el" href="classminxlib_1_1logging.html#a408b2838a2ad027e14e938848a8eb899">logging</a>()</td><td class="entry"><a class="el" href="classminxlib_1_1logging.html">minxlib::logging</a></td><td class="entry"></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1logging.html#a523fe315d0329b55b264ee0e63c12c46">warning</a>()</td><td class="entry"><a class="el" href="classminxlib_1_1logging.html">minxlib::logging</a></td><td class="entry"></td></tr>
</table></div><!-- contents -->
</body>
</html>

Changes to api/classminxlib_1_1logging.html.

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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202



203
204
205
206
207
208
209

210
211
212




213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: minxlib::logging Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>
     
   </div>
   
   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>
   
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>minxlib</b>      </li>
      <li class="navelem"><a class="el" href="classminxlib_1_1logging.html">logging</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a>  </div>

  <div class="headertitle">
<div class="title">minxlib::logging Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Interface for logging via Python.  
 <a href="classminxlib_1_1logging.html#details">More...</a></p>

<p><code>#include &lt;logging.hh&gt;</code></p>

<p><a href="classminxlib_1_1logging-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>

Public Member Functions</h2></td></tr>
<tr class="memitem:a408b2838a2ad027e14e938848a8eb899"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1logging.html#a408b2838a2ad027e14e938848a8eb899">logging</a> ()</td></tr>
<tr class="memdesc:a408b2838a2ad027e14e938848a8eb899"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <a href="#a408b2838a2ad027e14e938848a8eb899"></a><br/></td></tr>

<tr class="memitem:a93c172cbb3da197fb7cbd187056b2631"><td class="memItemLeft" align="right" valign="top">log&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1logging.html#a93c172cbb3da197fb7cbd187056b2631">debug</a> ()</td></tr>
<tr class="memdesc:a93c172cbb3da197fb7cbd187056b2631"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write debug messages to Minx log.  <a href="#a93c172cbb3da197fb7cbd187056b2631"></a><br/></td></tr>

<tr class="memitem:a4f376175515a5f06adf0cfd74a43a447"><td class="memItemLeft" align="right" valign="top">log&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1logging.html#a4f376175515a5f06adf0cfd74a43a447">info</a> ()</td></tr>
<tr class="memdesc:a4f376175515a5f06adf0cfd74a43a447"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write informational messages to Minx log.  <a href="#a4f376175515a5f06adf0cfd74a43a447"></a><br/></td></tr>

<tr class="memitem:a523fe315d0329b55b264ee0e63c12c46"><td class="memItemLeft" align="right" valign="top">log&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1logging.html#a523fe315d0329b55b264ee0e63c12c46">warning</a> ()</td></tr>
<tr class="memdesc:a523fe315d0329b55b264ee0e63c12c46"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write warnings to Minx log.  <a href="#a523fe315d0329b55b264ee0e63c12c46"></a><br/></td></tr>

<tr class="memitem:a80656f6b58913cbdd6d225e904b1e4ce"><td class="memItemLeft" align="right" valign="top">log&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1logging.html#a80656f6b58913cbdd6d225e904b1e4ce">error</a> ()</td></tr>
<tr class="memdesc:a80656f6b58913cbdd6d225e904b1e4ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write errors to Minx log.  <a href="#a80656f6b58913cbdd6d225e904b1e4ce"></a><br/></td></tr>

<tr class="memitem:a37f8fd2296d44d20055b8f39735f9137"><td class="memItemLeft" align="right" valign="top">log&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1logging.html#a37f8fd2296d44d20055b8f39735f9137">critical</a> ()</td></tr>
<tr class="memdesc:a37f8fd2296d44d20055b8f39735f9137"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write critical errors to Minx log.  <a href="#a37f8fd2296d44d20055b8f39735f9137"></a><br/></td></tr>


<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a9a8a9a6022013ee9f9b79a5ec112561d"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classminxlib_1_1logging.html">logging</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1logging.html#a9a8a9a6022013ee9f9b79a5ec112561d">get_logger</a> (const std::string &amp;name)</td></tr>
<tr class="memdesc:a9a8a9a6022013ee9f9b79a5ec112561d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a logger object for the specified class.  <a href="#a9a8a9a6022013ee9f9b79a5ec112561d"></a><br/></td></tr>

</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Interface for logging via Python. </p>
<p>This class provides an API for the remaining minxlib classes to emit log messages via Python's standard logging module. This stratgey allows minxlib's log messages to be integrated with the log messages output by the rest of Minx and avoid implementing a custom logging facility within minxlib.</p>
<p>Additionally, leveraging Python's existing logging functionality ensures that end-users can configure Minx's logging support in a uniform way. That is, end-users don't have to be aware of the fact that minxlib is actually written in C++; to them, all of Minx is a collection of Python modules and classes whose logging support works the same.</p>
<p>This class does not have a Python interface. It is meant to be used only within minxlib. The following snippet of code illustrates the typical and intended usage pattern:</p>
<div class="fragment"><pre class="fragment">        <span class="keyword">namespace </span>minxlib {


        <span class="comment">// Global logger object for some minxlib class</span>
        <span class="keyword">static</span> <a class="code" href="classminxlib_1_1logging.html#a408b2838a2ad027e14e938848a8eb899" title="Default constructor.">logging</a> logger ;

        <span class="keywordtype">void</span> some_class::pythonize()
        {



            <span class="comment">// After exporting some_class to Python via Boost.Python:</span>
            logger = <a class="code" href="classminxlib_1_1logging.html#a9a8a9a6022013ee9f9b79a5ec112561d" title="Create a logger object for the specified class.">logging::get_logger</a>(<span class="stringliteral">&quot;some_class&quot;</span>) ;
        }



        <span class="keywordtype">void</span> some_class::some_func()
        {

            <span class="keywordtype">int</span> i = 5 ;
            logger.debug() &lt;&lt; <span class="stringliteral">&quot;the value of i is &quot;</span> &lt;&lt; i ;
            logger.info () &lt;&lt; <span class="stringliteral">&quot;this is an informational message&quot;</span> ;
            <span class="keywordflow">if</span> (something_horrible_has_happened)
                logger.critical() &lt;&lt; <span class="stringliteral">&quot;all hell just broke loose!&quot;</span> ;
        }



        } <span class="comment">// namespace minxlib</span>
</pre></div> </div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a408b2838a2ad027e14e938848a8eb899"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classminxlib_1_1logging.html#a408b2838a2ad027e14e938848a8eb899">minxlib::logging::logging</a> </td>

          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Default constructor. </p>
<dl class="section return"><dt>Returns:</dt><dd>Nothing really.</dd></dl>
<p>This logging API is meant to be used in the following manner: each minxlib class that needs to emit log messages should define a static global <code>logger</code> object in its <em>.cc</em> file and initialize the object in its Pythonize function by calling this class's <a class="el" href="classminxlib_1_1logging.html#a9a8a9a6022013ee9f9b79a5ec112561d" title="Create a logger object for the specified class.">get_logger()</a> method. The client class can then use the <code>logger</code> object to emit log messages at different levels.</p>
<p>The default constructor allows "empty" logger objects to be created at global scope within a <em>.cc</em> file. It has no other purpose. Therefore, this constructor is not (and should not be) used in any other situation. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a37f8fd2296d44d20055b8f39735f9137"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">log <a class="el" href="classminxlib_1_1logging.html#a37f8fd2296d44d20055b8f39735f9137">minxlib::logging::critical</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Write critical errors to Minx log. </p>
<dl class="section return"><dt>Returns:</dt><dd>A log object whose stream operator will emit a log message.</dd></dl>
<p>This function returns an object that you can use to emit messages about critical errors with the stream output operator. The usage pattern is the same as described for the <a class="el" href="classminxlib_1_1logging.html#a93c172cbb3da197fb7cbd187056b2631" title="Write debug messages to Minx log.">debug()</a> function. </p>

</div>
</div>
<a class="anchor" id="a93c172cbb3da197fb7cbd187056b2631"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">log <a class="el" href="classminxlib_1_1logging.html#a93c172cbb3da197fb7cbd187056b2631">minxlib::logging::debug</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Write debug messages to Minx log. </p>
<dl class="section return"><dt>Returns:</dt><dd>A log object whose stream operator will emit a log message.</dd></dl>
<p>This function returns an object that you can use to emit debug messages with the stream output operator. Here is some sample code that shows how the object returned by this function is meant to be used:</p>
<div class="fragment"><pre class="fragment">            logger.debug() &lt;&lt; <span class="stringliteral">&quot;value of x = &quot;</span> &lt;&lt; x ;
</pre></div><p>In the above snippet, <code>logger</code> will usually be a static global variable within the client class's <em>.cc</em> file and it would have been initialized in the client class's Pythonize function. The sample code in the class description shows more details.</p>
<dl class="section note"><dt>Note:</dt><dd>The object returned by this function is an instance of a private inner class defined inside the logging class. Therefore, you cannot store the returned object in a local variable. The only thing you can do with it is use the stream output operator as shown above. This ensures that the inner class that takes care of the details of logging can only be used as a temporary so that, when it goes out of scope, its destructor can write the debug message to the Minx log via Python's logging module. </dd></dl>

</div>
</div>
<a class="anchor" id="a80656f6b58913cbdd6d225e904b1e4ce"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">log <a class="el" href="classminxlib_1_1logging.html#a80656f6b58913cbdd6d225e904b1e4ce">minxlib::logging::error</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Write errors to Minx log. </p>
<dl class="section return"><dt>Returns:</dt><dd>A log object whose stream operator will emit a log message.</dd></dl>
<p>This function returns an object that you can use to emit errors with the stream output operator. The usage pattern is the same as described for the <a class="el" href="classminxlib_1_1logging.html#a93c172cbb3da197fb7cbd187056b2631" title="Write debug messages to Minx log.">debug()</a> function. </p>

</div>
</div>
<a class="anchor" id="a9a8a9a6022013ee9f9b79a5ec112561d"></a>
<div class="memitem">
<div class="memproto">



      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classminxlib_1_1logging.html">logging</a> <a class="el" href="classminxlib_1_1logging.html#a9a8a9a6022013ee9f9b79a5ec112561d">minxlib::logging::get_logger</a> </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td><code> [static]</code></td>

        </tr>
      </table>
</div>




<div class="memdoc">

<p>Create a logger object for the specified class. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>minxlib class for which we want a logger. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>A logger object for the specified class.</dd></dl>
<p>This function returns a logger object that can be used by the named class to send log messages to the Minx log. It is meant to be called by the Pythonize functions of the <a class="el" href="classminxlib_1_1display.html" title="Encapsulate the details of the connection to the X server.">minxlib::display</a>, <a class="el" href="classminxlib_1_1window.html" title="Encapsulate the details of an X window.">minxlib::window</a>, <a class="el" href="structminxlib_1_1event.html" title="A generic X event, i.e., XAnyEvent.">minxlib::event</a>, and <a class="el" href="classminxlib_1_1exception.html" title="Base class for minxlib exceptions.">minxlib::exception</a> classes. The <em>.cc</em> files for these classes should define a static global <code>logger</code> object that is initialized by calling this function in the Pythonize function of the above-mentioned classes.</p>
<p>See the sample code in the class description for intended usage pattern. </p>

</div>
</div>
<a class="anchor" id="a4f376175515a5f06adf0cfd74a43a447"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">log <a class="el" href="classminxlib_1_1logging.html#a4f376175515a5f06adf0cfd74a43a447">minxlib::logging::info</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Write informational messages to Minx log. </p>
<dl class="section return"><dt>Returns:</dt><dd>A log object whose stream operator will emit a log message.</dd></dl>
<p>This function returns an object that you can use to emit informational messages with the stream output operator. The usage pattern is the same as described for the <a class="el" href="classminxlib_1_1logging.html#a93c172cbb3da197fb7cbd187056b2631" title="Write debug messages to Minx log.">debug()</a> function. </p>

</div>
</div>
<a class="anchor" id="a523fe315d0329b55b264ee0e63c12c46"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">log <a class="el" href="classminxlib_1_1logging.html#a523fe315d0329b55b264ee0e63c12c46">minxlib::logging::warning</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Write warnings to Minx log. </p>
<dl class="section return"><dt>Returns:</dt><dd>A log object whose stream operator will emit a log message.</dd></dl>
<p>This function returns an object that you can use to emit warnings with the stream output operator. The usage pattern is the same as described for the <a class="el" href="classminxlib_1_1logging.html#a93c172cbb3da197fb7cbd187056b2631" title="Write debug messages to Minx log.">debug()</a> function. </p>

</div>
</div>
</div><!-- contents -->
</body>
</html>






<


<
<
<



<
<




<
<



<

<



<

<
<
<
<
<




<
|
|
|
<
|
<
|
|



|
>









<
<

<
>


|
>

|
>

|
>

|
>

|
>

|
>
>
|


|
>

|




|
<
>
|
|
<
<
<
>
>
>
|
|
<
<
>
>
|
<
>
|
|
|
|
|
<
<
>
>
|
|





<
>

|



<
|


|
|




|





|

|



<
|


|
|








|

|



<
|


|

|
|
|








|

|



<
|


|
|






>
>
>


|


|
<
>


|
>
>
>
>
|


|





|
|









|

|



<
|


|
|








|

|



<
|


|
|






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
133
134

135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153

154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175

176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195

196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229

230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248

249
250
251
252
253
254
255
256
257
258
259
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: minxlib::logging Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">


  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>

   </div>

   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>

  </td>





 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.4 -->
<div id="nav-path" class="navpath">
  <ul>

<li class="navelem"><b>minxlib</b></li><li class="navelem"><a class="el" href="classminxlib_1_1logging.html">logging</a></li>  </ul>

</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="classminxlib_1_1logging-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">minxlib::logging Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Interface for logging via Python.  
 <a href="classminxlib_1_1logging.html#details">More...</a></p>

<p><code>#include &lt;logging.hh&gt;</code></p>


<table class="memberdecls">

<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a408b2838a2ad027e14e938848a8eb899"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1logging.html#a408b2838a2ad027e14e938848a8eb899">logging</a> ()</td></tr>
<tr class="memdesc:a408b2838a2ad027e14e938848a8eb899"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <a href="#a408b2838a2ad027e14e938848a8eb899">More...</a><br/></td></tr>
<tr class="separator:a408b2838a2ad027e14e938848a8eb899"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93c172cbb3da197fb7cbd187056b2631"><td class="memItemLeft" align="right" valign="top">log&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1logging.html#a93c172cbb3da197fb7cbd187056b2631">debug</a> ()</td></tr>
<tr class="memdesc:a93c172cbb3da197fb7cbd187056b2631"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write debug messages to Minx log.  <a href="#a93c172cbb3da197fb7cbd187056b2631">More...</a><br/></td></tr>
<tr class="separator:a93c172cbb3da197fb7cbd187056b2631"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4f376175515a5f06adf0cfd74a43a447"><td class="memItemLeft" align="right" valign="top">log&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1logging.html#a4f376175515a5f06adf0cfd74a43a447">info</a> ()</td></tr>
<tr class="memdesc:a4f376175515a5f06adf0cfd74a43a447"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write informational messages to Minx log.  <a href="#a4f376175515a5f06adf0cfd74a43a447">More...</a><br/></td></tr>
<tr class="separator:a4f376175515a5f06adf0cfd74a43a447"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a523fe315d0329b55b264ee0e63c12c46"><td class="memItemLeft" align="right" valign="top">log&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1logging.html#a523fe315d0329b55b264ee0e63c12c46">warning</a> ()</td></tr>
<tr class="memdesc:a523fe315d0329b55b264ee0e63c12c46"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write warnings to Minx log.  <a href="#a523fe315d0329b55b264ee0e63c12c46">More...</a><br/></td></tr>
<tr class="separator:a523fe315d0329b55b264ee0e63c12c46"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a80656f6b58913cbdd6d225e904b1e4ce"><td class="memItemLeft" align="right" valign="top">log&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1logging.html#a80656f6b58913cbdd6d225e904b1e4ce">error</a> ()</td></tr>
<tr class="memdesc:a80656f6b58913cbdd6d225e904b1e4ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write errors to Minx log.  <a href="#a80656f6b58913cbdd6d225e904b1e4ce">More...</a><br/></td></tr>
<tr class="separator:a80656f6b58913cbdd6d225e904b1e4ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a37f8fd2296d44d20055b8f39735f9137"><td class="memItemLeft" align="right" valign="top">log&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1logging.html#a37f8fd2296d44d20055b8f39735f9137">critical</a> ()</td></tr>
<tr class="memdesc:a37f8fd2296d44d20055b8f39735f9137"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write critical errors to Minx log.  <a href="#a37f8fd2296d44d20055b8f39735f9137">More...</a><br/></td></tr>
<tr class="separator:a37f8fd2296d44d20055b8f39735f9137"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a9a8a9a6022013ee9f9b79a5ec112561d"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classminxlib_1_1logging.html">logging</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1logging.html#a9a8a9a6022013ee9f9b79a5ec112561d">get_logger</a> (const std::string &amp;name)</td></tr>
<tr class="memdesc:a9a8a9a6022013ee9f9b79a5ec112561d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a logger object for the specified class.  <a href="#a9a8a9a6022013ee9f9b79a5ec112561d">More...</a><br/></td></tr>
<tr class="separator:a9a8a9a6022013ee9f9b79a5ec112561d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Interface for logging via Python. </p>
<p>This class provides an API for the remaining minxlib classes to emit log messages via Python's standard logging module. This stratgey allows minxlib's log messages to be integrated with the log messages output by the rest of Minx and avoid implementing a custom logging facility within minxlib.</p>
<p>Additionally, leveraging Python's existing logging functionality ensures that end-users can configure Minx's logging support in a uniform way. That is, end-users don't have to be aware of the fact that minxlib is actually written in C++; to them, all of Minx is a collection of Python modules and classes whose logging support works the same.</p>
<p>This class does not have a Python interface. It is meant to be used only within minxlib. The following snippet of code illustrates the typical and intended usage pattern:</p>
<div class="fragment"><div class="line"><span class="keyword">namespace </span>minxlib {</div>

<div class="line"></div>
<div class="line"><span class="comment">// Global logger object for some minxlib class</span></div>
<div class="line"><span class="keyword">static</span> <a class="code" href="classminxlib_1_1logging.html#a408b2838a2ad027e14e938848a8eb899" title="Default constructor. ">logging</a> logger ;</div>



<div class="line"></div>
<div class="line"><span class="keywordtype">void</span> <a class="code" href="group__grp__minxlib__keymap.html#ga310dc14a58dd12ec04b13b8fc00ecc07" title="Setup keymap module&#39;s logger. ">some_class::pythonize</a>()</div>
<div class="line">{</div>
<div class="line">    <span class="comment">// After exporting some_class to Python via Boost.Python:</span></div>
<div class="line">    logger = <a class="code" href="classminxlib_1_1logging.html#a9a8a9a6022013ee9f9b79a5ec112561d" title="Create a logger object for the specified class. ">logging::get_logger</a>(<span class="stringliteral">&quot;some_class&quot;</span>) ;</div>


<div class="line">}</div>
<div class="line"></div>
<div class="line"><span class="keywordtype">void</span> some_class::some_func()</div>

<div class="line">{</div>
<div class="line">    <span class="keywordtype">int</span> i = 5 ;</div>
<div class="line">    logger.debug() &lt;&lt; <span class="stringliteral">&quot;the value of i is &quot;</span> &lt;&lt; i ;</div>
<div class="line">    logger.info () &lt;&lt; <span class="stringliteral">&quot;this is an informational message&quot;</span> ;</div>
<div class="line">    <span class="keywordflow">if</span> (something_horrible_has_happened)</div>
<div class="line">        logger.critical() &lt;&lt; <span class="stringliteral">&quot;all hell just broke loose!&quot;</span> ;</div>


<div class="line">}</div>
<div class="line"></div>
<div class="line">} <span class="comment">// namespace minxlib</span></div>
</div><!-- fragment --> </div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a408b2838a2ad027e14e938848a8eb899"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>

          <td class="memname">minxlib::logging::logging </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Default constructor. </p>
<dl class="section return"><dt>Returns</dt><dd>Nothing really.</dd></dl>
<p>This logging API is meant to be used in the following manner: each minxlib class that needs to emit log messages should define a static global <code>logger</code> object in its <em>.cc</em> file and initialize the object in its Pythonize function by calling this class's <a class="el" href="classminxlib_1_1logging.html#a9a8a9a6022013ee9f9b79a5ec112561d" title="Create a logger object for the specified class. ">get_logger()</a> method. The client class can then use the <code>logger</code> object to emit log messages at different levels.</p>
<p>The default constructor allows "empty" logger objects to be created at global scope within a <em>.cc</em> file. It has no other purpose. Therefore, this constructor is not (and should not be) used in any other situation. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a37f8fd2296d44d20055b8f39735f9137"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">log minxlib::logging::critical </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Write critical errors to Minx log. </p>
<dl class="section return"><dt>Returns</dt><dd>A log object whose stream operator will emit a log message.</dd></dl>
<p>This function returns an object that you can use to emit messages about critical errors with the stream output operator. The usage pattern is the same as described for the <a class="el" href="classminxlib_1_1logging.html#a93c172cbb3da197fb7cbd187056b2631" title="Write debug messages to Minx log. ">debug()</a> function. </p>

</div>
</div>
<a class="anchor" id="a93c172cbb3da197fb7cbd187056b2631"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">log minxlib::logging::debug </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Write debug messages to Minx log. </p>
<dl class="section return"><dt>Returns</dt><dd>A log object whose stream operator will emit a log message.</dd></dl>
<p>This function returns an object that you can use to emit debug messages with the stream output operator. Here is some sample code that shows how the object returned by this function is meant to be used:</p>
<div class="fragment"><div class="line">logger.debug() &lt;&lt; <span class="stringliteral">&quot;value of x = &quot;</span> &lt;&lt; x ;</div>
</div><!-- fragment --><p>In the above snippet, <code>logger</code> will usually be a static global variable within the client class's <em>.cc</em> file and it would have been initialized in the client class's Pythonize function. The sample code in the class description shows more details.</p>
<dl class="section note"><dt>Note</dt><dd>The object returned by this function is an instance of a private inner class defined inside the logging class. Therefore, you cannot store the returned object in a local variable. The only thing you can do with it is use the stream output operator as shown above. This ensures that the inner class that takes care of the details of logging can only be used as a temporary so that, when it goes out of scope, its destructor can write the debug message to the Minx log via Python's logging module. </dd></dl>

</div>
</div>
<a class="anchor" id="a80656f6b58913cbdd6d225e904b1e4ce"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">log minxlib::logging::error </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Write errors to Minx log. </p>
<dl class="section return"><dt>Returns</dt><dd>A log object whose stream operator will emit a log message.</dd></dl>
<p>This function returns an object that you can use to emit errors with the stream output operator. The usage pattern is the same as described for the <a class="el" href="classminxlib_1_1logging.html#a93c172cbb3da197fb7cbd187056b2631" title="Write debug messages to Minx log. ">debug()</a> function. </p>

</div>
</div>
<a class="anchor" id="a9a8a9a6022013ee9f9b79a5ec112561d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classminxlib_1_1logging.html">logging</a> minxlib::logging::get_logger </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em>)</td><td></td>

          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create a logger object for the specified class. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>minxlib class for which we want a logger. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A logger object for the specified class.</dd></dl>
<p>This function returns a logger object that can be used by the named class to send log messages to the Minx log. It is meant to be called by the Pythonize functions of the various minxlib modules that send log messages to the Minx log. The <em>.cc</em> files for these modules should define a static global <code>logger</code> object that is initialized by calling this function in the Pythonize function of the above-mentioned classes.</p>
<p>See the sample code in the class description for intended usage pattern. </p>

</div>
</div>
<a class="anchor" id="a4f376175515a5f06adf0cfd74a43a447"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">log minxlib::logging::info </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Write informational messages to Minx log. </p>
<dl class="section return"><dt>Returns</dt><dd>A log object whose stream operator will emit a log message.</dd></dl>
<p>This function returns an object that you can use to emit informational messages with the stream output operator. The usage pattern is the same as described for the <a class="el" href="classminxlib_1_1logging.html#a93c172cbb3da197fb7cbd187056b2631" title="Write debug messages to Minx log. ">debug()</a> function. </p>

</div>
</div>
<a class="anchor" id="a523fe315d0329b55b264ee0e63c12c46"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">log minxlib::logging::warning </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Write warnings to Minx log. </p>
<dl class="section return"><dt>Returns</dt><dd>A log object whose stream operator will emit a log message.</dd></dl>
<p>This function returns an object that you can use to emit warnings with the stream output operator. The usage pattern is the same as described for the <a class="el" href="classminxlib_1_1logging.html#a93c172cbb3da197fb7cbd187056b2631" title="Write debug messages to Minx log. ">debug()</a> function. </p>

</div>
</div>
</div><!-- contents -->
</body>
</html>

Changes to api/classminxlib_1_1type__info-members.html.

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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: Member List</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>
     
   </div>
   
   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>
   
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>minxlib</b>      </li>
      <li class="navelem"><a class="el" href="classminxlib_1_1type__info.html">type_info</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">minxlib::type_info Member List</div>  </div>
</div><!--header-->
<div class="contents">

This is the complete list of members for <a class="el" href="classminxlib_1_1type__info.html">minxlib::type_info</a>, including all inherited members.<table>

  <tr class="memlist"><td><a class="el" href="classminxlib_1_1type__info.html#a0090edbcda261161c3444e57c83b36a5">operator&lt;</a>(const type_info &amp;, const type_info &amp;)</td><td><a class="el" href="classminxlib_1_1type__info.html">minxlib::type_info</a></td><td><code> [friend]</code></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1type__info.html#aecfe4d6ff47d7cc6b9af935810348a8d">operator==</a>(const type_info &amp;, const type_info &amp;)</td><td><a class="el" href="classminxlib_1_1type__info.html">minxlib::type_info</a></td><td><code> [friend]</code></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1type__info.html#a85690d6891dfe8756a166357b393284d">type_info</a>()</td><td><a class="el" href="classminxlib_1_1type__info.html">minxlib::type_info</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1type__info.html#a1a4abccf8f9a98f06029b0c417cfca0b">type_info</a>(const std::type_info &amp;t)</td><td><a class="el" href="classminxlib_1_1type__info.html">minxlib::type_info</a></td><td></td></tr>
</table></div><!-- contents -->
</body>
</html>






<


<
<
<



<
<




<
<



<

<



<

<
<
<
<
<




<
|
|
|
<
|
<
|
|





>
|
>
|
|
|
|



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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: Member List</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">


  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>

   </div>

   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>

  </td>





 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.4 -->
<div id="nav-path" class="navpath">
  <ul>

<li class="navelem"><b>minxlib</b></li><li class="navelem"><a class="el" href="classminxlib_1_1type__info.html">type_info</a></li>  </ul>

</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">minxlib::type_info Member List</div>  </div>
</div><!--header-->
<div class="contents">

<p>This is the complete list of members for <a class="el" href="classminxlib_1_1type__info.html">minxlib::type_info</a>, including all inherited members.</p>
<table class="directory">
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1type__info.html#a0090edbcda261161c3444e57c83b36a5">operator&lt;</a>(const type_info &amp;, const type_info &amp;)</td><td class="entry"><a class="el" href="classminxlib_1_1type__info.html">minxlib::type_info</a></td><td class="entry"><span class="mlabel">friend</span></td></tr>
  <tr><td class="entry"><a class="el" href="classminxlib_1_1type__info.html#aecfe4d6ff47d7cc6b9af935810348a8d">operator==</a>(const type_info &amp;, const type_info &amp;)</td><td class="entry"><a class="el" href="classminxlib_1_1type__info.html">minxlib::type_info</a></td><td class="entry"><span class="mlabel">friend</span></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1type__info.html#a85690d6891dfe8756a166357b393284d">type_info</a>()</td><td class="entry"><a class="el" href="classminxlib_1_1type__info.html">minxlib::type_info</a></td><td class="entry"></td></tr>
  <tr><td class="entry"><a class="el" href="classminxlib_1_1type__info.html#a1a4abccf8f9a98f06029b0c417cfca0b">type_info</a>(const std::type_info &amp;t)</td><td class="entry"><a class="el" href="classminxlib_1_1type__info.html">minxlib::type_info</a></td><td class="entry"></td></tr>
</table></div><!-- contents -->
</body>
</html>

Changes to api/classminxlib_1_1type__info.html.

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
133
134
135
136



137
138
139
140
141
142
143
...
146
147
148
149
150
151
152
153
154
155
156




157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173



174
175
176
177
178
179
180
...
183
184
185
186
187
188
189
190
191
192
193




194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: minxlib::type_info Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>
     
   </div>
   
   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>
   
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>minxlib</b>      </li>
      <li class="navelem"><a class="el" href="classminxlib_1_1type__info.html">type_info</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#friends">Friends</a>  </div>

  <div class="headertitle">
<div class="title">minxlib::type_info Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Wrapper around std::type_info.  
 <a href="classminxlib_1_1type__info.html#details">More...</a></p>

<p><code>#include &lt;type_info.hh&gt;</code></p>

<p><a href="classminxlib_1_1type__info-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>

Public Member Functions</h2></td></tr>
<tr class="memitem:a85690d6891dfe8756a166357b393284d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1type__info.html#a85690d6891dfe8756a166357b393284d">type_info</a> ()</td></tr>
<tr class="memdesc:a85690d6891dfe8756a166357b393284d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor for std::type_info wrapper.  <a href="#a85690d6891dfe8756a166357b393284d"></a><br/></td></tr>

<tr class="memitem:a1a4abccf8f9a98f06029b0c417cfca0b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1type__info.html#a1a4abccf8f9a98f06029b0c417cfca0b">type_info</a> (const std::type_info &amp;t)</td></tr>
<tr class="memdesc:a1a4abccf8f9a98f06029b0c417cfca0b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct <a class="el" href="classminxlib_1_1type__info.html" title="Wrapper around std::type_info.">type_info</a> wrapper given std::type_info.  <a href="#a1a4abccf8f9a98f06029b0c417cfca0b"></a><br/></td></tr>

<tr><td colspan="2"><h2><a name="friends"></a>

Friends</h2></td></tr>
<tr class="memitem:aecfe4d6ff47d7cc6b9af935810348a8d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1type__info.html#aecfe4d6ff47d7cc6b9af935810348a8d">operator==</a> (const <a class="el" href="classminxlib_1_1type__info.html">type_info</a> &amp;, const <a class="el" href="classminxlib_1_1type__info.html">type_info</a> &amp;)</td></tr>
<tr class="memdesc:aecfe4d6ff47d7cc6b9af935810348a8d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if two <a class="el" href="classminxlib_1_1type__info.html" title="Wrapper around std::type_info.">type_info</a> objects are equal.  <a href="#aecfe4d6ff47d7cc6b9af935810348a8d"></a><br/></td></tr>

<tr class="memitem:a0090edbcda261161c3444e57c83b36a5"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1type__info.html#a0090edbcda261161c3444e57c83b36a5">operator&lt;</a> (const <a class="el" href="classminxlib_1_1type__info.html">type_info</a> &amp;, const <a class="el" href="classminxlib_1_1type__info.html">type_info</a> &amp;)</td></tr>
<tr class="memdesc:a0090edbcda261161c3444e57c83b36a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if one <a class="el" href="classminxlib_1_1type__info.html" title="Wrapper around std::type_info.">type_info</a> object less than another.  <a href="#a0090edbcda261161c3444e57c83b36a5"></a><br/></td></tr>

</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Wrapper around std::type_info. </p>
<p>Because std::type_info::name() is unreliable, we can use this wrapper class when we want to identify different classes in a unique way so as to be able to use class typeid's in conjunction with object factories and other such constructions.</p>
<p>The only thing you can do with <a class="el" href="classminxlib_1_1type__info.html" title="Wrapper around std::type_info.">minxlib::type_info</a> objects are create them and compare them using the relational operators (i.e., ==, !=, &lt;, &gt;, &lt;=, and &gt;=). </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a85690d6891dfe8756a166357b393284d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classminxlib_1_1type__info.html#a85690d6891dfe8756a166357b393284d">minxlib::type_info::type_info</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Default constructor for std::type_info wrapper. </p>
<dl class="section return"><dt>Returns:</dt><dd>std::type_info wrapper object.</dd></dl>
<p>A default constructor so we can store <a class="el" href="classminxlib_1_1type__info.html" title="Wrapper around std::type_info.">type_info</a> wrapper objects in STL containers. </p>

</div>
</div>
<a class="anchor" id="a1a4abccf8f9a98f06029b0c417cfca0b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classminxlib_1_1type__info.html#a85690d6891dfe8756a166357b393284d">minxlib::type_info::type_info</a> </td>
          <td>(</td>
          <td class="paramtype">const std::type_info &amp;&#160;</td>
          <td class="paramname"><em>t</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Construct <a class="el" href="classminxlib_1_1type__info.html" title="Wrapper around std::type_info.">type_info</a> wrapper given std::type_info. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">t</td><td>Result of typeid operator on some object or type. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>std::type_info wrapper object. </dd></dl>

</div>
</div>
<hr/><h2>Friends And Related Function Documentation</h2>
<a class="anchor" id="a0090edbcda261161c3444e57c83b36a5"></a>
<div class="memitem">
<div class="memproto">



      <table class="memname">
        <tr>
          <td class="memname">bool operator&lt; </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classminxlib_1_1type__info.html">type_info</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
................................................................................
          <td></td>
          <td class="paramtype">const <a class="el" href="classminxlib_1_1type__info.html">type_info</a> &amp;&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [friend]</code></td>
        </tr>
      </table>
</div>




<div class="memdoc">

<p>Check if one <a class="el" href="classminxlib_1_1type__info.html" title="Wrapper around std::type_info.">type_info</a> object less than another. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>LHS of &lt; operator. </td></tr>
    <tr><td class="paramname">b</td><td>RHS of &lt; operator. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>True if a &lt; b, false if a &gt;= b. </dd></dl>

</div>
</div>
<a class="anchor" id="aecfe4d6ff47d7cc6b9af935810348a8d"></a>
<div class="memitem">
<div class="memproto">



      <table class="memname">
        <tr>
          <td class="memname">bool operator== </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classminxlib_1_1type__info.html">type_info</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
................................................................................
          <td></td>
          <td class="paramtype">const <a class="el" href="classminxlib_1_1type__info.html">type_info</a> &amp;&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [friend]</code></td>
        </tr>
      </table>
</div>




<div class="memdoc">

<p>Check if two <a class="el" href="classminxlib_1_1type__info.html" title="Wrapper around std::type_info.">type_info</a> objects are equal. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>LHS of equality operator. </td></tr>
    <tr><td class="paramname">b</td><td>RHS of equality operator. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>True if a == b, false otherwise. </dd></dl>

</div>
</div>
</div><!-- contents -->
</body>
</html>






<


<
<
<



<
<




<
<



<

<



<

<
<
<
<
<




<
|
|
|
<
|
<
|
|



|
>









<
<

<
>


|
>

|
>
|
>


|
>

|
>

|


|
|





|

|



<
|


|
|








|


|



<
|

|
|





|



|



>
>
>







 







|


|
>
>
>
>
|

|
|






|






>
>
>







 







|


|
>
>
>
>
|

|
|






|






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
...
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
...
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: minxlib::type_info Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">


  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>

   </div>

   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>

  </td>





 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.4 -->
<div id="nav-path" class="navpath">
  <ul>

<li class="navelem"><b>minxlib</b></li><li class="navelem"><a class="el" href="classminxlib_1_1type__info.html">type_info</a></li>  </ul>

</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classminxlib_1_1type__info-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">minxlib::type_info Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Wrapper around std::type_info.  
 <a href="classminxlib_1_1type__info.html#details">More...</a></p>

<p><code>#include &lt;type_info.hh&gt;</code></p>


<table class="memberdecls">

<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a85690d6891dfe8756a166357b393284d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1type__info.html#a85690d6891dfe8756a166357b393284d">type_info</a> ()</td></tr>
<tr class="memdesc:a85690d6891dfe8756a166357b393284d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor for std::type_info wrapper.  <a href="#a85690d6891dfe8756a166357b393284d">More...</a><br/></td></tr>
<tr class="separator:a85690d6891dfe8756a166357b393284d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a4abccf8f9a98f06029b0c417cfca0b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1type__info.html#a1a4abccf8f9a98f06029b0c417cfca0b">type_info</a> (const std::type_info &amp;t)</td></tr>
<tr class="memdesc:a1a4abccf8f9a98f06029b0c417cfca0b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct <a class="el" href="classminxlib_1_1type__info.html" title="Wrapper around std::type_info. ">type_info</a> wrapper given std::type_info.  <a href="#a1a4abccf8f9a98f06029b0c417cfca0b">More...</a><br/></td></tr>
<tr class="separator:a1a4abccf8f9a98f06029b0c417cfca0b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:aecfe4d6ff47d7cc6b9af935810348a8d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1type__info.html#aecfe4d6ff47d7cc6b9af935810348a8d">operator==</a> (const <a class="el" href="classminxlib_1_1type__info.html">type_info</a> &amp;, const <a class="el" href="classminxlib_1_1type__info.html">type_info</a> &amp;)</td></tr>
<tr class="memdesc:aecfe4d6ff47d7cc6b9af935810348a8d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if two <a class="el" href="classminxlib_1_1type__info.html" title="Wrapper around std::type_info. ">type_info</a> objects are equal.  <a href="#aecfe4d6ff47d7cc6b9af935810348a8d">More...</a><br/></td></tr>
<tr class="separator:aecfe4d6ff47d7cc6b9af935810348a8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0090edbcda261161c3444e57c83b36a5"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1type__info.html#a0090edbcda261161c3444e57c83b36a5">operator&lt;</a> (const <a class="el" href="classminxlib_1_1type__info.html">type_info</a> &amp;, const <a class="el" href="classminxlib_1_1type__info.html">type_info</a> &amp;)</td></tr>
<tr class="memdesc:a0090edbcda261161c3444e57c83b36a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if one <a class="el" href="classminxlib_1_1type__info.html" title="Wrapper around std::type_info. ">type_info</a> object less than another.  <a href="#a0090edbcda261161c3444e57c83b36a5">More...</a><br/></td></tr>
<tr class="separator:a0090edbcda261161c3444e57c83b36a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Wrapper around std::type_info. </p>
<p>Because std::type_info::name() is unreliable, we can use this wrapper class when we want to identify different classes in a unique way so as to be able to use class typeid's in conjunction with object factories and other such constructions.</p>
<p>The only thing you can do with <a class="el" href="classminxlib_1_1type__info.html" title="Wrapper around std::type_info. ">minxlib::type_info</a> objects are create them and compare them using the relational operators (i.e., ==, !=, &lt;, &gt;, &lt;=, and &gt;=). </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a85690d6891dfe8756a166357b393284d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">minxlib::type_info::type_info </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Default constructor for std::type_info wrapper. </p>
<dl class="section return"><dt>Returns</dt><dd>std::type_info wrapper object.</dd></dl>
<p>A default constructor so we can store <a class="el" href="classminxlib_1_1type__info.html" title="Wrapper around std::type_info. ">type_info</a> wrapper objects in STL containers. </p>

</div>
</div>
<a class="anchor" id="a1a4abccf8f9a98f06029b0c417cfca0b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">minxlib::type_info::type_info </td>
          <td>(</td>
          <td class="paramtype">const std::type_info &amp;&#160;</td>
          <td class="paramname"><em>t</em>)</td><td></td>
          <td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Construct <a class="el" href="classminxlib_1_1type__info.html" title="Wrapper around std::type_info. ">type_info</a> wrapper given std::type_info. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">t</td><td>Result of typeid operator on some object or type. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>std::type_info wrapper object. </dd></dl>

</div>
</div>
<h2 class="groupheader">Friends And Related Function Documentation</h2>
<a class="anchor" id="a0090edbcda261161c3444e57c83b36a5"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool operator&lt; </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classminxlib_1_1type__info.html">type_info</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
................................................................................
          <td></td>
          <td class="paramtype">const <a class="el" href="classminxlib_1_1type__info.html">type_info</a> &amp;&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Check if one <a class="el" href="classminxlib_1_1type__info.html" title="Wrapper around std::type_info. ">type_info</a> object less than another. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>LHS of &lt; operator. </td></tr>
    <tr><td class="paramname">b</td><td>RHS of &lt; operator. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if a &lt; b, false if a &gt;= b. </dd></dl>

</div>
</div>
<a class="anchor" id="aecfe4d6ff47d7cc6b9af935810348a8d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool operator== </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classminxlib_1_1type__info.html">type_info</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
................................................................................
          <td></td>
          <td class="paramtype">const <a class="el" href="classminxlib_1_1type__info.html">type_info</a> &amp;&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Check if two <a class="el" href="classminxlib_1_1type__info.html" title="Wrapper around std::type_info. ">type_info</a> objects are equal. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>LHS of equality operator. </td></tr>
    <tr><td class="paramname">b</td><td>RHS of equality operator. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if a == b, false otherwise. </dd></dl>

</div>
</div>
</div><!-- contents -->
</body>
</html>

Changes to api/classminxlib_1_1window-members.html.

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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: Member List</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>
     
   </div>
   
   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>
   
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>minxlib</b>      </li>
      <li class="navelem"><a class="el" href="classminxlib_1_1window.html">window</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">minxlib::window Member List</div>  </div>
</div><!--header-->
<div class="contents">

This is the complete list of members for <a class="el" href="classminxlib_1_1window.html">minxlib::window</a>, including all inherited members.<table>


  <tr class="memlist"><td><a class="el" href="classminxlib_1_1window.html#a757c73c3ef978e2d977a5375a00a00cc">configure</a>(int x, int y, int w, int h, int b, const window *s, int t, unsigned int v)</td><td><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1window.html#a877dfcd851499f9bd1b911ca0e1926bb">configure_mask</a> enum name</td><td><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1window.html#ac709e7dc27cd9730e44e10ced19100e7">event_mask</a> enum name</td><td><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1window.html#a18d3443bc59f49e1ac6dec93f0476322">focus</a>()</td><td><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1window.html#ab267b0d98eafc061bc93028bf797c420">geometry</a>()</td><td><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1window.html#a9d737f7d5b08801c7b31e7da0ff52ec2">grab_key</a>(const std::string &amp;s)</td><td><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1window.html#a55384884627066aaedde492a83de620c">is_mapped</a>()</td><td><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1window.html#a9b6b56ed329f5c99df5849094abbf5a1">kill</a>()</td><td><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1window.html#a657b61cc5953e3e01c2a675c331b4fcd">move_resize</a>(int x, int y, int w, int h)</td><td><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1window.html#acf5d104ae1603f89d51ff9722cd16e07">nuke</a>()</td><td><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td></td></tr>


  <tr class="memlist"><td><a class="el" href="classminxlib_1_1window.html#a271a44a98150a488ce15cac394a26303">operator!=</a>(const window &amp;w) const </td><td><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td><code> [inline]</code></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1window.html#a944205f04bf56740215c16a509a8e3e8">operator!=</a>(Window w) const </td><td><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td><code> [inline]</code></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1window.html#a0370149131dd0e7aca524f3b41f7ee43">operator==</a>(const window &amp;w) const </td><td><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td><code> [inline]</code></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1window.html#aae19eb369562bea8ac41a01361bb5fcf">operator==</a>(Window w) const </td><td><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td><code> [inline]</code></td></tr>

  <tr class="memlist"><td><a class="el" href="classminxlib_1_1window.html#abf06eedd640849559d8cfedf241df14f">properties</a>()</td><td><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1window.html#a658aa509a4ba86b2b927ed324e19c1b2">pythonize</a>()</td><td><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td><code> [static]</code></td></tr>


  <tr class="memlist"><td><a class="el" href="classminxlib_1_1window.html#a63a88dba883db23adaf25434129a33d3">select_events</a>(long mask)</td><td><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1window.html#ae9f94cf94a75ff9aad796d1e6e024d3b">set_border_attr</a>(unsigned long c, unsigned int s)</td><td><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1window.html#aecf5a9e7f528895a0a47adb4df71f09c">show</a>()</td><td><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td></td></tr>
  <tr class="memlist"><td><a class="el" href="classminxlib_1_1window.html#a5de4d048895f53038dfbd17531c16730">window</a>(display *d, Window w)</td><td><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td></td></tr>





</table></div><!-- contents -->
</body>
</html>






<


<
<
<



<
<




<
<



<

<



<

<
<
<
<
<




<
|
|
|
<
|
<
|
|





>
|
>
>
|
|
|
|
|
|
|
|
|
|
>
>
|
|
|
|
>
|
|
>
>
|
<
<
<
>
>
>
>
>



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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: Member List</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">


  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>

   </div>

   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>

  </td>





 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.4 -->
<div id="nav-path" class="navpath">
  <ul>

<li class="navelem"><b>minxlib</b></li><li class="navelem"><a class="el" href="classminxlib_1_1window.html">window</a></li>  </ul>

</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">minxlib::window Member List</div>  </div>
</div><!--header-->
<div class="contents">

<p>This is the complete list of members for <a class="el" href="classminxlib_1_1window.html">minxlib::window</a>, including all inherited members.</p>
<table class="directory">
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1window.html#a90e9ea1fa14a13ca4376e8b44c2d57f8">children</a>()</td><td class="entry"><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td class="entry"></td></tr>
  <tr><td class="entry"><a class="el" href="classminxlib_1_1window.html#a7905a61b4dadd154757081435ebde3f7">configure</a>(int x, int y, int w, int h, int b, const window *s, int t, unsigned int v)</td><td class="entry"><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td class="entry"><span class="mlabel">virtual</span></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1window.html#a877dfcd851499f9bd1b911ca0e1926bb">configure_mask</a> enum name</td><td class="entry"><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td class="entry"></td></tr>
  <tr><td class="entry"><a class="el" href="classminxlib_1_1window.html#ac709e7dc27cd9730e44e10ced19100e7">event_mask</a> enum name</td><td class="entry"><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td class="entry"></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1window.html#ab657201c5d7ffddcb0f8f448bb9d4309">focus</a>()</td><td class="entry"><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td class="entry"><span class="mlabel">virtual</span></td></tr>
  <tr><td class="entry"><a class="el" href="classminxlib_1_1window.html#a64031783fa5bdb3f36476be3a1f52239">geometry</a>()</td><td class="entry"><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td class="entry"><span class="mlabel">virtual</span></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1window.html#a9d737f7d5b08801c7b31e7da0ff52ec2">grab_key</a>(const std::string &amp;s)</td><td class="entry"><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td class="entry"></td></tr>
  <tr><td class="entry"><a class="el" href="classminxlib_1_1window.html#a3ceb1e616b1fe6ab32dd2b086ed3265e">hide</a>()</td><td class="entry"><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td class="entry"><span class="mlabel">virtual</span></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1window.html#ab4ecab7966af723758afa69824f169e4">is_mapped</a>()</td><td class="entry"><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td class="entry"><span class="mlabel">virtual</span></td></tr>
  <tr><td class="entry"><a class="el" href="classminxlib_1_1window.html#a42ae7cfc2279b41c89ae77125ad68e82">kill</a>()</td><td class="entry"><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td class="entry"><span class="mlabel">virtual</span></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1window.html#adadfff9fa6b13767ade590eebaa310ca">move_resize</a>(int x, int y, int w, int h)</td><td class="entry"><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td class="entry"><span class="mlabel">virtual</span></td></tr>
  <tr><td class="entry"><a class="el" href="classminxlib_1_1window.html#ad75e1509c45ea694638313ed42ccfad0">nuke</a>()</td><td class="entry"><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td class="entry"><span class="mlabel">virtual</span></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1window.html#ad00dd8b5dfbc8801ec481a6158a97093">operator Window</a>() const </td><td class="entry"><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
  <tr><td class="entry"><a class="el" href="classminxlib_1_1window.html#a271a44a98150a488ce15cac394a26303">operator!=</a>(const window &amp;w) const </td><td class="entry"><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1window.html#a944205f04bf56740215c16a509a8e3e8">operator!=</a>(Window w) const </td><td class="entry"><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
  <tr><td class="entry"><a class="el" href="classminxlib_1_1window.html#a0370149131dd0e7aca524f3b41f7ee43">operator==</a>(const window &amp;w) const </td><td class="entry"><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1window.html#aae19eb369562bea8ac41a01361bb5fcf">operator==</a>(Window w) const </td><td class="entry"><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
  <tr><td class="entry"><a class="el" href="classminxlib_1_1window.html#afc347a1488cd17e03e081f287691051a">parent</a>()</td><td class="entry"><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td class="entry"><span class="mlabel">virtual</span></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1window.html#abf06eedd640849559d8cfedf241df14f">properties</a>()</td><td class="entry"><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td class="entry"></td></tr>
  <tr><td class="entry"><a class="el" href="classminxlib_1_1window.html#a658aa509a4ba86b2b927ed324e19c1b2">pythonize</a>()</td><td class="entry"><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1window.html#aa15dd0844f5ccd96a2d175b0ee78b8e7">reparent</a>(const window &amp;p)</td><td class="entry"><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td class="entry"><span class="mlabel">virtual</span></td></tr>
  <tr><td class="entry"><a class="el" href="classminxlib_1_1window.html#a05e47f5047fb09089b0ee46d41d166fe">screen</a>()</td><td class="entry"><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td class="entry"><span class="mlabel">virtual</span></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1window.html#a63a88dba883db23adaf25434129a33d3">select_events</a>(long mask)</td><td class="entry"><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td class="entry"></td></tr>



  <tr><td class="entry"><a class="el" href="classminxlib_1_1window.html#a1ff05255132df5330329b2aa048d92e0">set_border_attr</a>(unsigned long c, unsigned int s)</td><td class="entry"><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td class="entry"><span class="mlabel">virtual</span></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1window.html#a0b16b97dd24ea1424b651332c33a8b69">set_properties</a>(const std::map&lt; std::string, std::string &gt; &amp;prop)</td><td class="entry"><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td class="entry"><span class="mlabel">virtual</span></td></tr>
  <tr><td class="entry"><a class="el" href="classminxlib_1_1window.html#a9edfea4e5e8671dac8c8b7dbd07f62d5">show</a>()</td><td class="entry"><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td class="entry"><span class="mlabel">virtual</span></td></tr>
  <tr class="even"><td class="entry"><a class="el" href="classminxlib_1_1window.html#ac5db5d29d610a8bdcdb687b71ce180fe">window</a>(Display *d, Window w)</td><td class="entry"><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td class="entry"></td></tr>
  <tr><td class="entry"><a class="el" href="classminxlib_1_1window.html#ae47e1c5ef9f774d73c4bbeb8a22e952c">~window</a>()</td><td class="entry"><a class="el" href="classminxlib_1_1window.html">minxlib::window</a></td><td class="entry"><span class="mlabel">virtual</span></td></tr>
</table></div><!-- contents -->
</body>
</html>

Changes to api/classminxlib_1_1window.html.

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
133
134
135
136
137
138
...
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
...
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
...
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264

265





















266




267
268
269



















270
271
272



273
274
275

276
277
278
279
280
281
282
...
321
322
323
324
325
326
327
328




329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349


350
351
352
353
354



355
356
357

358
359
360
361
362
363




364
365
366
367
368


369
370
371
372
373



374
375
376

377
378
379
380
381
382




383
384
385
386
387

388
389
390
391
392

393
394

395


396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422

423
424
425
426
427
428
429
430
...
437
438
439
440
441
442
443
444
445
446



447
448
449

450
451
452
453
454












455




















456
457
458
459
460
461
462


463
464
465
466
467



468
469
470

471
472
473
474
475
476




477
478
479
480
481
482


483
484
485
486
487



488
489
490

491
492
493
494
495
496
497
...
512
513
514
515
516
517
518
519




520
521
522
523
524
525
526
527
528
529
530
531
532
533
534


535
536
537
538
539



540
541
542

543
544
545
546
547
548




549
550
551
552
553
554





























555
556
557
558
559



560
561
562
563
564
565
566
567
568
569




570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586



587
588
589
590
591
592
593
594
595
596




597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613



614
615
616
617
618
619
620
621
622
623




624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640



641
642
643
644
645
646
647
648
649
650




651
652
653
654
655
656
657
658
659
660
661
662





























663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
...
689
690
691
692
693
694
695
696
697
698
699
700
701
702



703
704
705

706
707
708

709
710
711




712
713
714
715
716
717
718
719

































































720
721
722
723
724
725

726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749



750
751
752

753
754
755
756
757
758
759
...
762
763
764
765
766
767
768
769




770
771
772
773
774
775
776
777
778
779
780
781
782


783
784
785
786
787



788
789
790

791






















































792
793
794
795
796




797
798
799
800


801
802
803
804
805
806
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: minxlib::window Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>
     
   </div>
   
   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>
   
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>minxlib</b>      </li>
      <li class="navelem"><a class="el" href="classminxlib_1_1window.html">window</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a>  </div>

  <div class="headertitle">
<div class="title">minxlib::window Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Encapsulate the details of an X window.  
 <a href="classminxlib_1_1window.html#details">More...</a></p>

<p><code>#include &lt;window.hh&gt;</code></p>

<p><a href="classminxlib_1_1window-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-types"></a>

Public Types</h2></td></tr>
<tr class="memitem:ac709e7dc27cd9730e44e10ced19100e7"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#ac709e7dc27cd9730e44e10ced19100e7">event_mask</a> </td></tr>
<tr class="memdesc:ac709e7dc27cd9730e44e10ced19100e7"><td class="mdescLeft">&#160;</td><td class="mdescRight">An enumeration for the different event masks.  <a href="classminxlib_1_1window.html#ac709e7dc27cd9730e44e10ced19100e7">More...</a><br/></td></tr>

<tr class="memitem:a877dfcd851499f9bd1b911ca0e1926bb"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#a877dfcd851499f9bd1b911ca0e1926bb">configure_mask</a> </td></tr>
<tr class="memdesc:a877dfcd851499f9bd1b911ca0e1926bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">An enumeration for the different configure values.  <a href="classminxlib_1_1window.html#a877dfcd851499f9bd1b911ca0e1926bb">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>



Public Member Functions</h2></td></tr>
<tr class="memitem:a5de4d048895f53038dfbd17531c16730"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#a5de4d048895f53038dfbd17531c16730">window</a> (<a class="el" href="classminxlib_1_1display.html">display</a> *d, Window w)</td></tr>
<tr class="memdesc:a5de4d048895f53038dfbd17531c16730"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a wrapper object for an existing Xlib window.  <a href="#a5de4d048895f53038dfbd17531c16730"></a><br/></td></tr>

<tr class="memitem:a0370149131dd0e7aca524f3b41f7ee43"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#a0370149131dd0e7aca524f3b41f7ee43">operator==</a> (const <a class="el" href="classminxlib_1_1window.html">window</a> &amp;w) const </td></tr>
<tr class="memdesc:a0370149131dd0e7aca524f3b41f7ee43"><td class="mdescLeft">&#160;</td><td class="mdescRight">Window equality operator.  <a href="#a0370149131dd0e7aca524f3b41f7ee43"></a><br/></td></tr>

<tr class="memitem:a271a44a98150a488ce15cac394a26303"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#a271a44a98150a488ce15cac394a26303">operator!=</a> (const <a class="el" href="classminxlib_1_1window.html">window</a> &amp;w) const </td></tr>
<tr class="memdesc:a271a44a98150a488ce15cac394a26303"><td class="mdescLeft">&#160;</td><td class="mdescRight">Window inequality operator.  <a href="#a271a44a98150a488ce15cac394a26303"></a><br/></td></tr>

<tr class="memitem:aae19eb369562bea8ac41a01361bb5fcf"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#aae19eb369562bea8ac41a01361bb5fcf">operator==</a> (Window w) const </td></tr>
<tr class="memdesc:aae19eb369562bea8ac41a01361bb5fcf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Window equality operator.  <a href="#aae19eb369562bea8ac41a01361bb5fcf"></a><br/></td></tr>

<tr class="memitem:a944205f04bf56740215c16a509a8e3e8"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#a944205f04bf56740215c16a509a8e3e8">operator!=</a> (Window w) const </td></tr>
<tr class="memdesc:a944205f04bf56740215c16a509a8e3e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Window inequality operator.  <a href="#a944205f04bf56740215c16a509a8e3e8"></a><br/></td></tr>




<tr class="memitem:abf06eedd640849559d8cfedf241df14f"><td class="memItemLeft" align="right" valign="top">std::map&lt; std::string, <br class="typebreak"/>
std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#abf06eedd640849559d8cfedf241df14f">properties</a> ()</td></tr>
<tr class="memdesc:abf06eedd640849559d8cfedf241df14f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve window properties from X server.  <a href="#abf06eedd640849559d8cfedf241df14f"></a><br/></td></tr>
















<tr class="memitem:a63a88dba883db23adaf25434129a33d3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#a63a88dba883db23adaf25434129a33d3">select_events</a> (long mask)</td></tr>
<tr class="memdesc:a63a88dba883db23adaf25434129a33d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the X event mask for this window.  <a href="#a63a88dba883db23adaf25434129a33d3"></a><br/></td></tr>

<tr class="memitem:a9d737f7d5b08801c7b31e7da0ff52ec2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#a9d737f7d5b08801c7b31e7da0ff52ec2">grab_key</a> (const std::string &amp;s)</td></tr>
<tr class="memdesc:a9d737f7d5b08801c7b31e7da0ff52ec2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Setup a passive keyboard grab.  <a href="#a9d737f7d5b08801c7b31e7da0ff52ec2"></a><br/></td></tr>

<tr class="memitem:aecf5a9e7f528895a0a47adb4df71f09c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#aecf5a9e7f528895a0a47adb4df71f09c">show</a> ()</td></tr>
<tr class="memdesc:aecf5a9e7f528895a0a47adb4df71f09c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Show the window, i.e., map it.  <a href="#aecf5a9e7f528895a0a47adb4df71f09c"></a><br/></td></tr>

<tr class="memitem:a55384884627066aaedde492a83de620c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#a55384884627066aaedde492a83de620c">is_mapped</a> ()</td></tr>



<tr class="memdesc:a55384884627066aaedde492a83de620c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if window is currently mapped or not.  <a href="#a55384884627066aaedde492a83de620c"></a><br/></td></tr>

<tr class="memitem:a657b61cc5953e3e01c2a675c331b4fcd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#a657b61cc5953e3e01c2a675c331b4fcd">move_resize</a> (int x, int y, int w, int h)</td></tr>
<tr class="memdesc:a657b61cc5953e3e01c2a675c331b4fcd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move and resize the window.  <a href="#a657b61cc5953e3e01c2a675c331b4fcd"></a><br/></td></tr>

<tr class="memitem:a757c73c3ef978e2d977a5375a00a00cc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#a757c73c3ef978e2d977a5375a00a00cc">configure</a> (int x, int y, int w, int h, int b, const <a class="el" href="classminxlib_1_1window.html">window</a> *s, int t, unsigned int v)</td></tr>
<tr class="memdesc:a757c73c3ef978e2d977a5375a00a00cc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configure the window.  <a href="#a757c73c3ef978e2d977a5375a00a00cc"></a><br/></td></tr>

<tr class="memitem:ae9f94cf94a75ff9aad796d1e6e024d3b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#ae9f94cf94a75ff9aad796d1e6e024d3b">set_border_attr</a> (unsigned long c, unsigned int s)</td></tr>
<tr class="memdesc:ae9f94cf94a75ff9aad796d1e6e024d3b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set window's border color and size.  <a href="#ae9f94cf94a75ff9aad796d1e6e024d3b"></a><br/></td></tr>

<tr class="memitem:ab267b0d98eafc061bc93028bf797c420"><td class="memItemLeft" align="right" valign="top">boost::tuple&lt; int, int, int, int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#ab267b0d98eafc061bc93028bf797c420">geometry</a> ()</td></tr>
<tr class="memdesc:ab267b0d98eafc061bc93028bf797c420"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve window's size and position.  <a href="#ab267b0d98eafc061bc93028bf797c420"></a><br/></td></tr>


<tr class="memitem:a18d3443bc59f49e1ac6dec93f0476322"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#a18d3443bc59f49e1ac6dec93f0476322">focus</a> ()</td></tr>
<tr class="memdesc:a18d3443bc59f49e1ac6dec93f0476322"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set input focus on this window and raise it.  <a href="#a18d3443bc59f49e1ac6dec93f0476322"></a><br/></td></tr>

<tr class="memitem:a9b6b56ed329f5c99df5849094abbf5a1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#a9b6b56ed329f5c99df5849094abbf5a1">kill</a> ()</td></tr>
<tr class="memdesc:a9b6b56ed329f5c99df5849094abbf5a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Kill this window.  <a href="#a9b6b56ed329f5c99df5849094abbf5a1"></a><br/></td></tr>

<tr class="memitem:acf5d104ae1603f89d51ff9722cd16e07"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#acf5d104ae1603f89d51ff9722cd16e07">nuke</a> ()</td></tr>
<tr class="memdesc:acf5d104ae1603f89d51ff9722cd16e07"><td class="mdescLeft">&#160;</td><td class="mdescRight">Kill this window using brute force.  <a href="#acf5d104ae1603f89d51ff9722cd16e07"></a><br/></td></tr>





<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a658aa509a4ba86b2b927ed324e19c1b2"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#a658aa509a4ba86b2b927ed324e19c1b2">pythonize</a> ()</td></tr>
<tr class="memdesc:a658aa509a4ba86b2b927ed324e19c1b2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Export the window class to minxlib Python module.  <a href="#a658aa509a4ba86b2b927ed324e19c1b2"></a><br/></td></tr>

</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Encapsulate the details of an X window. </p>
<p>This class provides an API for the Python parts of Minx to be able to deal with X windows. It wraps around the relevant parts of Xlib and exposes its functionality to Python via <a href="http://www.boost.org/libs/python/doc/">Boost.Python</a>. </p>
</div><hr/><h2>Member Enumeration Documentation</h2>
<a class="anchor" id="a877dfcd851499f9bd1b911ca0e1926bb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classminxlib_1_1window.html#a877dfcd851499f9bd1b911ca0e1926bb">minxlib::window::configure_mask</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>An enumeration for the different configure values. </p>
<p>This enumeration simply provides C++ names for the Xlib value mask for configure requests. These names are exported to Python via <a href="http://www.boost.org/libs/python/doc/">Boost.Python</a>'s enum exporting facility.</p>
<p>The minxlib and corresponding Xlib names for these enums are shown below:</p>
<table class="doxtable">
<tr>
<th><b>minxlib</b>  </th><th><b>Xlib</b>  </th></tr>
................................................................................
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classminxlib_1_1window.html#ac709e7dc27cd9730e44e10ced19100e7">minxlib::window::event_mask</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>An enumeration for the different event masks. </p>
<p>This enumeration simply provides C++ names for the Xlib event masks that are exported to Python via <a href="http://www.boost.org/libs/python/doc/">Boost.Python</a>'s enum exporting facility.</p>
<p>minxlib's names for the event masks and their corresponding Xlib names are shown below:</p>
<table class="doxtable">
<tr>
<th><b>minxlib</b> </th><th><b>Xlib</b> </th></tr>
................................................................................
<td>colormap_change_mask </td><td>ColormapChangeMask </td></tr>
<tr>
<td>owner_grab_button_mask </td><td>OwnerGrabButtonMask </td></tr>
</table>

</div>
</div>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a5de4d048895f53038dfbd17531c16730"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classminxlib_1_1window.html#a5de4d048895f53038dfbd17531c16730">minxlib::window::window</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classminxlib_1_1display.html">display</a> *&#160;</td>
          <td class="paramname"><em>d</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Window&#160;</td>
          <td class="paramname"><em>w</em>&#160;</td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Create a wrapper object for an existing Xlib window. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">d</td><td>The display object to which the window is "linked." </td></tr>
    <tr><td class="paramname">w</td><td>The Xlib Window ID. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>A valid window wrapper for the given Xlib window.</dd></dl>

<p>Minx does not create any X windows of its own. It only manages existing (top-level) windows. That's why we need the Xlib Window ID when instantiating this class. </p>


























</div>
</div>
<hr/><h2>Member Function Documentation</h2>



















<a class="anchor" id="a757c73c3ef978e2d977a5375a00a00cc"></a>
<div class="memitem">
<div class="memproto">



      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classminxlib_1_1window.html#a757c73c3ef978e2d977a5375a00a00cc">minxlib::window::configure</a> </td>

          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>




<div class="memdoc">

<p>Configure the window. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>Window's x coordinate relative to parent's origin. </td></tr>
    <tr><td class="paramname">y</td><td>Window's y coordinate relative to parent's origin. </td></tr>
    <tr><td class="paramname">w</td><td>Window's width (not counting its border). </td></tr>
    <tr><td class="paramname">h</td><td>Window's height (not counting its border). </td></tr>
    <tr><td class="paramname">b</td><td>Window's border width. </td></tr>
    <tr><td class="paramname">s</td><td>Window's sibling for stacking operations. </td></tr>
    <tr><td class="paramname">t</td><td>Window's stacking mode. </td></tr>
    <tr><td class="paramname">v</td><td>Value mask to determine what to configure. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Nothing.</dd></dl>
<p>This function calls XConfigureWindow() using v as the value_mask parameter to the Xlib function and using the other parameters to fill out the XWindowChanges structure. The value_mask is a bitwise OR of the configure_mask enums.</p>
<p>Please consult Xlib documentation for further details. For example, the following page may be instructive:</p>
<p><a href="http://tronche.com/gui/x/xlib/window/configure.html">http://tronche.com/gui/x/xlib/window/configure.html</a> </p>



</div>
</div>
<a class="anchor" id="a18d3443bc59f49e1ac6dec93f0476322"></a>
<div class="memitem">
<div class="memproto">



      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classminxlib_1_1window.html#a18d3443bc59f49e1ac6dec93f0476322">minxlib::window::focus</a> </td>

          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>




<div class="memdoc">

<p>Set input focus on this window and raise it. </p>
<dl class="section return"><dt>Returns:</dt><dd>Nothing. </dd></dl>



</div>
</div>
<a class="anchor" id="ab267b0d98eafc061bc93028bf797c420"></a>
<div class="memitem">
<div class="memproto">



      <table class="memname">
        <tr>
          <td class="memname">boost::tuple&lt;int, int, int, int&gt; <a class="el" href="classminxlib_1_1window.html#ab267b0d98eafc061bc93028bf797c420">minxlib::window::geometry</a> </td>

          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>




<div class="memdoc">

<p>Retrieve window's size and position. </p>
<dl class="section return"><dt>Returns:</dt><dd>Tuple containing window geometry.</dd></dl>
<p>This function uses XGetWindowAttributes() to determine the window's size and position. It returns a 4-tuple containing the position and size as shown below:</p>

<ul>
<li>Element 0: x-coordinate of window's top-left corner </li>
<li>Element 1: y-coordinate of window's top-left corner </li>
<li>Element 2: window width </li>
<li>Element 3: window height</li>

</ul>
<p>If the call to XGetWindowAttributes() fails, all the elements of the tuple will be -1.</p>

<dl class="section note"><dt>Note:</dt><dd>On the Python size, the Boost tuple returned by this function will be converted into a Python tuple. Also, since we would expect a <a class="el" href="structminxlib_1_1protocol__error.html" title="A base class to indicate X protocol errors.">minxlib::protocol_error</a> to be raised soon after a failed XGetWindowAttributes(), we return -1's instead of throwing an exception in case the call to XGetWindowAttributes() bombs. </dd></dl>



</div>
</div>
<a class="anchor" id="a9d737f7d5b08801c7b31e7da0ff52ec2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classminxlib_1_1window.html#a9d737f7d5b08801c7b31e7da0ff52ec2">minxlib::window::grab_key</a> </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Setup a passive keyboard grab. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">s</td><td>String describing key sequence for activating grab. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Nothing.</dd></dl>
<p>The string s is expected to name a key binding and should be of the form:</p>

<div class="fragment"><pre class="fragment">            (([CAS]|M[1-5]?)-)*key</pre></div><p>The parenthesized part plus the asterisk in the above expression are a regular expression while <code>"key"</code> stands for the string form of a valid X keysym. Here are some examples of key binding specifications:</p>
<table class="doxtable">
<tr>
<td>C-A-T  </td><td>CTRL + ALT + T  </td></tr>
<tr>
<td>S-F1  </td><td>SHIFT + F1  </td></tr>
<tr>
<td>A-Tab  </td><td>ALT + Tab  </td></tr>
................................................................................
</table>
<p>Minx's key bindings specification is designed to be similar to the way key bindings are specified in Emacs.</p>
<p>This function interprets its parameter s in the manner described above and infers the appropriate keycode and corresponding modifier mask for the specified key binding. It then sets up a passive grab for that keycode and modifier mask and also records the name of the key binding (viz., s) in a key map that is indexed using the keycode and modifier mask.</p>
<p>Later, when the X server sends Minx keyboard events, we will use the event's keycode and modifier mask to look-up the key binding in the above-mentioned key map and return that name as part of the event to Minx's Python core. </p>

</div>
</div>
<a class="anchor" id="a55384884627066aaedde492a83de620c"></a>
<div class="memitem">
<div class="memproto">



      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classminxlib_1_1window.html#a55384884627066aaedde492a83de620c">minxlib::window::is_mapped</a> </td>

          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>












</div>




















<div class="memdoc">

<p>Check if window is currently mapped or not. </p>
<dl class="section return"><dt>Returns:</dt><dd>True if window is mapped, false otherwise.</dd></dl>
<p>This function uses XGetWindowAttributes() and checks the value of the XWindowAttributes's map_state field to see if the window is mapped or not. It'll return true if map_state equals IsViewable or IsUnviewable and false if either map_state is IsUnmapped or if the call to XGetWindowAttributes() fails.</p>
<dl class="section note"><dt>Note:</dt><dd>If XGetWindowAttributes() fails, we would expect a <a class="el" href="structminxlib_1_1protocol__error.html" title="A base class to indicate X protocol errors.">minxlib::protocol_error</a> to be raised soon after. That's why this function returns false instead of throwing an exception. </dd></dl>



</div>
</div>
<a class="anchor" id="a9b6b56ed329f5c99df5849094abbf5a1"></a>
<div class="memitem">
<div class="memproto">



      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classminxlib_1_1window.html#a9b6b56ed329f5c99df5849094abbf5a1">minxlib::window::kill</a> </td>

          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>




<div class="memdoc">

<p>Kill this window. </p>
<dl class="section return"><dt>Returns:</dt><dd>Nothing.</dd></dl>
<p>This method destroys the X window encapsulated by this object by killing the X client application that created the window. If the window supports the WM_DELETE_WINDOW protocol, this method will use that to kill the window and its client application. Otherwise, it will simply use the XKillClient() function to destroy the window and its client by brute force. </p>



</div>
</div>
<a class="anchor" id="a657b61cc5953e3e01c2a675c331b4fcd"></a>
<div class="memitem">
<div class="memproto">



      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classminxlib_1_1window.html#a657b61cc5953e3e01c2a675c331b4fcd">minxlib::window::move_resize</a> </td>

          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>




<div class="memdoc">

<p>Move and resize the window. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>Window's x coordinate relative to parent's origin. </td></tr>
    <tr><td class="paramname">y</td><td>Window's y coordinate relative to parent's origin. </td></tr>
    <tr><td class="paramname">w</td><td>Window's width (not counting its border). </td></tr>
    <tr><td class="paramname">h</td><td>Window's height (not counting its border). </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Nothing.</dd></dl>
<p>This function sets the window geometry by calling XMoveResizeWindow(). Please consult Xlib documentation for further details. </p>



</div>
</div>
<a class="anchor" id="acf5d104ae1603f89d51ff9722cd16e07"></a>
<div class="memitem">
<div class="memproto">



      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classminxlib_1_1window.html#acf5d104ae1603f89d51ff9722cd16e07">minxlib::window::nuke</a> </td>

          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>




<div class="memdoc">

<p>Kill this window using brute force. </p>
<dl class="section return"><dt>Returns:</dt><dd>Nothing.</dd></dl>
<p>This method destroys the X window encapsulated by this object without trying a graceful shutdown via WM_DELETE_WINDOW. It is meant to be used on those clients whose windows advertise support for WM_DELETE_WINDOW but don't implement the delete protocol properly and stay alive without good cause despite a user-initiated kill request. </p>






























</div>
</div>
<a class="anchor" id="a271a44a98150a488ce15cac394a26303"></a>
<div class="memitem">
<div class="memproto">



      <table class="memname">
        <tr>
          <td class="memname">bool minxlib::window::operator!= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classminxlib_1_1window.html">window</a> &amp;&#160;</td>
          <td class="paramname"><em>w</em></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>




<div class="memdoc">

<p>Window inequality operator. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">w</td><td>The <a class="el" href="classminxlib_1_1window.html" title="Encapsulate the details of an X window.">minxlib::window</a> against which this should be checked. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>True if this window does not equal w; false if it does.</dd></dl>
<p>Two window objects are considered equal if they have the same ID and belong to the same display. </p>

</div>
</div>
<a class="anchor" id="a944205f04bf56740215c16a509a8e3e8"></a>
<div class="memitem">
<div class="memproto">



      <table class="memname">
        <tr>
          <td class="memname">bool minxlib::window::operator!= </td>
          <td>(</td>
          <td class="paramtype">Window&#160;</td>
          <td class="paramname"><em>w</em></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>




<div class="memdoc">

<p>Window inequality operator. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">w</td><td>The Xlib window ID against which this should be checked. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>True if this window's ID does not equal w; false otherwise.</dd></dl>
<p>This version of the inequality operator only checks this object's window ID against w. </p>

</div>
</div>
<a class="anchor" id="a0370149131dd0e7aca524f3b41f7ee43"></a>
<div class="memitem">
<div class="memproto">



      <table class="memname">
        <tr>
          <td class="memname">bool minxlib::window::operator== </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classminxlib_1_1window.html">window</a> &amp;&#160;</td>
          <td class="paramname"><em>w</em></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>




<div class="memdoc">

<p>Window equality operator. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">w</td><td>The <a class="el" href="classminxlib_1_1window.html" title="Encapsulate the details of an X window.">minxlib::window</a> against which this should be checked. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>True if this window equals w; false otherwise.</dd></dl>
<p>Two window objects are considered equal if they have the same ID and belong to the same display. </p>

</div>
</div>
<a class="anchor" id="aae19eb369562bea8ac41a01361bb5fcf"></a>
<div class="memitem">
<div class="memproto">



      <table class="memname">
        <tr>
          <td class="memname">bool minxlib::window::operator== </td>
          <td>(</td>
          <td class="paramtype">Window&#160;</td>
          <td class="paramname"><em>w</em></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>




<div class="memdoc">

<p>Window equality operator. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">w</td><td>The Xlib window ID against which this should be checked. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>True if this window's ID equals w; false otherwise.</dd></dl>
<p>This version of the equality operator only checks this object's window ID against w. </p>






























</div>
</div>
<a class="anchor" id="abf06eedd640849559d8cfedf241df14f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::map&lt;std::string, std::string&gt; <a class="el" href="classminxlib_1_1window.html#abf06eedd640849559d8cfedf241df14f">minxlib::window::properties</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Retrieve window properties from X server. </p>
<dl class="section return"><dt>Returns:</dt><dd>An STL map of strings to strings.</dd></dl>
<p>This function gets the WM_NAME, WM_ICON_NAME, and WM_CLASS properties for this window and returns them in an STL map of strings to strings as shown below:</p>
<table class="doxtable">
<tr>
<th><b>Key</b> </th><th><b>Value</b>  </th></tr>
<tr>
<td>name  </td><td>WM_NAME  </td></tr>
<tr>
................................................................................
<tr>
<td>class  </td><td>WM_CLASS.res_class </td></tr>
<tr>
<td>res_name  </td><td>WM_CLASS.res_name  </td></tr>
</table>
<p>If we are unable to retrieve a particular property, that key's value will be an empty string. For example, if some window doesn't have a WM_CLASS property, the "class" and "res_name" keys for that window will be empty.</p>
<p>On the Python side of Minx, the above STL map will be returned as a Python dict.</p>
<dl class="section note"><dt>Note:</dt><dd>Although rare, the WM_NAME and WM_ICON_NAME X properties may contain more than one string as values. If that is the case, these multiple values in the returned map/dict will be represented as semicolon separated strings. For example, if some window's WM_NAME property has values "foo" and "bar", the value of the "name" key in the returned map will be "foo;bar". </dd></dl>

</div>
</div>
<a class="anchor" id="a658aa509a4ba86b2b927ed324e19c1b2"></a>
<div class="memitem">
<div class="memproto">



      <table class="memname">
        <tr>
          <td class="memname">static void <a class="el" href="classminxlib_1_1window.html#a658aa509a4ba86b2b927ed324e19c1b2">minxlib::window::pythonize</a> </td>

          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static]</code></td>

        </tr>
      </table>
</div>




<div class="memdoc">

<p>Export the window class to minxlib Python module. </p>
<dl class="section return"><dt>Returns:</dt><dd>Nothing.</dd></dl>
<p>This function exposes the window class's interface so that it can be used by the Python parts of Minx. It is meant to be called by the Boost.Python initialization code in python.cc. </p>

</div>
</div>

































































<a class="anchor" id="a63a88dba883db23adaf25434129a33d3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classminxlib_1_1window.html#a63a88dba883db23adaf25434129a33d3">minxlib::window::select_events</a> </td>

          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>mask</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the X event mask for this window. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">mask</td><td>The X event mask. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Nothing.</dd></dl>
<p>This method allows clients to specify the events they are interested in receiving for this window. The mask parameter should be a bitwise OR of the event_mask enum and is passed as-is to XSelectInput(). See the relevant Xlib documentation for the details about the event mask. </p>

</div>
</div>
<a class="anchor" id="ae9f94cf94a75ff9aad796d1e6e024d3b"></a>
<div class="memitem">
<div class="memproto">



      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classminxlib_1_1window.html#ae9f94cf94a75ff9aad796d1e6e024d3b">minxlib::window::set_border_attr</a> </td>

          <td>(</td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>




<div class="memdoc">

<p>Set window's border color and size. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td>Three-byte RGB spec. </td></tr>
    <tr><td class="paramname">s</td><td>Border size (in pixels). </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Nothing.</dd></dl>
<p>This function calls XSetWindowBorderWidth() and XSetWindowBorder() to specify the window's border color and size to the desired values. </p>



</div>
</div>
<a class="anchor" id="aecf5a9e7f528895a0a47adb4df71f09c"></a>
<div class="memitem">
<div class="memproto">



      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classminxlib_1_1window.html#aecf5a9e7f528895a0a47adb4df71f09c">minxlib::window::show</a> </td>

          <td>(</td>






















































          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>




<div class="memdoc">

<p>Show the window, i.e., map it. </p>
<dl class="section return"><dt>Returns:</dt><dd>Nothing. </dd></dl>



</div>
</div>
</div><!-- contents -->
</body>
</html>






<


<
<
<



<
<




<
<



<

<



<

<
<
<
<
<




<
|
|
|
<
|
<
|
|




|
>









<
<

<
>



>


<
>
>
>

|
|
>

|
>

|
>

|
>

|
>
>
>
>


|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

|
>

|
>
|
|
>
|
>
>
>
|
>
|
|
>
|
|
>
|
|
>
|
<
>
>
|
|
>
|
|
>
|
|
>
>
>
>
>
|


|
>

|


|








<
|







 







<
|







 







|
|




|

|







 







<
|


|






|
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

>
>
>
>


|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|


>
>
>


<
>







 







|
>
>
>
>
|


|












|




>
>


|


>
>
>


<
>

|



|
>
>
>
>
|


|

>
>


|


>
>
>


<
>

|



|
>
>
>
>
|

|
|
<
>




|
>

<
>
|
>
>








|


|



<
|


|





|

>
|







 







|


>
>
>


<
>

|



>
>
>
>
>
>
>
>
>
>
>
>

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|


|

|

>
>


|


>
>
>


<
>

|



|
>
>
>
>
|


|


>
>


|


>
>
>


<
>







 







|
>
>
>
>
|


|








|


>
>


|


>
>
>


<
>

|



|
>
>
>
>
|


|


>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>





>
>
>





|
|


|
>
>
>
>
|


|

|



|







>
>
>





|
|


|
>
>
>
>
|


|





|







>
>
>





|
|


|
>
>
>
>
|


|

|



|







>
>
>





|
|


|
>
>
>
>
|


|





|


>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







|

|



<
|


|







 







|






>
>
>


<
>

|
<
>


|
>
>
>
>
|


|




>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>





<
>


|



<
|


|





|




|


>
>
>


<
>







 







|
>
>
>
>
|


|






|


>
>


|


>
>
>


<
>

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|



|
>
>
>
>
|


|
>
>






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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155

156
157
158
159
160
161
162
163
...
183
184
185
186
187
188
189

190
191
192
193
194
195
196
197
...
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
...
270
271
272
273
274
275
276

277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345

346
347
348
349
350
351
352
353
...
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436

437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464

465
466
467
468
469
470
471
472
473
474
475
476
477
478
479

480
481
482
483
484
485
486
487

488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506

507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
...
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547

548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605

606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634

635
636
637
638
639
640
641
642
...
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695

696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919

920
921
922
923
924
925
926
927
928
929
930
...
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950

951
952
953

954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039

1040
1041
1042
1043
1044
1045
1046

1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068

1069
1070
1071
1072
1073
1074
1075
1076
....
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115

1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Minx: minxlib::window Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="dox.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">


  <td style="padding-left: 0.5em;">
   <div id="projectname">
     <a href="../wiki/home.wiki">Minx</a>

   </div>

   <div id="projectbrief">
     <a href="index.html">API Docs</a>
   </div>

  </td>





 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.4 -->
<div id="nav-path" class="navpath">
  <ul>

<li class="navelem"><b>minxlib</b></li><li class="navelem"><a class="el" href="classminxlib_1_1window.html">window</a></li>  </ul>

</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="classminxlib_1_1window-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">minxlib::window Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Encapsulate the details of an X window.  
 <a href="classminxlib_1_1window.html#details">More...</a></p>

<p><code>#include &lt;window.hh&gt;</code></p>


<table class="memberdecls">

<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:ac709e7dc27cd9730e44e10ced19100e7"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#ac709e7dc27cd9730e44e10ced19100e7">event_mask</a> </td></tr>
<tr class="memdesc:ac709e7dc27cd9730e44e10ced19100e7"><td class="mdescLeft">&#160;</td><td class="mdescRight">An enumeration for the different event masks.  <a href="classminxlib_1_1window.html#ac709e7dc27cd9730e44e10ced19100e7">More...</a><br/></td></tr>
<tr class="separator:ac709e7dc27cd9730e44e10ced19100e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a877dfcd851499f9bd1b911ca0e1926bb"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#a877dfcd851499f9bd1b911ca0e1926bb">configure_mask</a> </td></tr>
<tr class="memdesc:a877dfcd851499f9bd1b911ca0e1926bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">An enumeration for the different configure values.  <a href="classminxlib_1_1window.html#a877dfcd851499f9bd1b911ca0e1926bb">More...</a><br/></td></tr>

<tr class="separator:a877dfcd851499f9bd1b911ca0e1926bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ac5db5d29d610a8bdcdb687b71ce180fe"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#ac5db5d29d610a8bdcdb687b71ce180fe">window</a> (Display *d, Window w)</td></tr>
<tr class="memdesc:ac5db5d29d610a8bdcdb687b71ce180fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a wrapper object for an existing Xlib window.  <a href="#ac5db5d29d610a8bdcdb687b71ce180fe">More...</a><br/></td></tr>
<tr class="separator:ac5db5d29d610a8bdcdb687b71ce180fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0370149131dd0e7aca524f3b41f7ee43"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#a0370149131dd0e7aca524f3b41f7ee43">operator==</a> (const <a class="el" href="classminxlib_1_1window.html">window</a> &amp;w) const </td></tr>
<tr class="memdesc:a0370149131dd0e7aca524f3b41f7ee43"><td class="mdescLeft">&#160;</td><td class="mdescRight">Window equality operator.  <a href="#a0370149131dd0e7aca524f3b41f7ee43">More...</a><br/></td></tr>
<tr class="separator:a0370149131dd0e7aca524f3b41f7ee43"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a271a44a98150a488ce15cac394a26303"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#a271a44a98150a488ce15cac394a26303">operator!=</a> (const <a class="el" href="classminxlib_1_1window.html">window</a> &amp;w) const </td></tr>
<tr class="memdesc:a271a44a98150a488ce15cac394a26303"><td class="mdescLeft">&#160;</td><td class="mdescRight">Window inequality operator.  <a href="#a271a44a98150a488ce15cac394a26303">More...</a><br/></td></tr>
<tr class="separator:a271a44a98150a488ce15cac394a26303"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aae19eb369562bea8ac41a01361bb5fcf"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#aae19eb369562bea8ac41a01361bb5fcf">operator==</a> (Window w) const </td></tr>
<tr class="memdesc:aae19eb369562bea8ac41a01361bb5fcf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Window equality operator.  <a href="#aae19eb369562bea8ac41a01361bb5fcf">More...</a><br/></td></tr>
<tr class="separator:aae19eb369562bea8ac41a01361bb5fcf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a944205f04bf56740215c16a509a8e3e8"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#a944205f04bf56740215c16a509a8e3e8">operator!=</a> (Window w) const </td></tr>
<tr class="memdesc:a944205f04bf56740215c16a509a8e3e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Window inequality operator.  <a href="#a944205f04bf56740215c16a509a8e3e8">More...</a><br/></td></tr>
<tr class="separator:a944205f04bf56740215c16a509a8e3e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad00dd8b5dfbc8801ec481a6158a97093"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#ad00dd8b5dfbc8801ec481a6158a97093">operator Window</a> () const </td></tr>
<tr class="memdesc:ad00dd8b5dfbc8801ec481a6158a97093"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert to an Xlib Window.  <a href="#ad00dd8b5dfbc8801ec481a6158a97093">More...</a><br/></td></tr>
<tr class="separator:ad00dd8b5dfbc8801ec481a6158a97093"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf06eedd640849559d8cfedf241df14f"><td class="memItemLeft" align="right" valign="top">std::map&lt; std::string, <br class="typebreak"/>
std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#abf06eedd640849559d8cfedf241df14f">properties</a> ()</td></tr>
<tr class="memdesc:abf06eedd640849559d8cfedf241df14f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve window properties from X server.  <a href="#abf06eedd640849559d8cfedf241df14f">More...</a><br/></td></tr>
<tr class="separator:abf06eedd640849559d8cfedf241df14f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b16b97dd24ea1424b651332c33a8b69"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#a0b16b97dd24ea1424b651332c33a8b69">set_properties</a> (const std::map&lt; std::string, std::string &gt; &amp;prop)</td></tr>
<tr class="memdesc:a0b16b97dd24ea1424b651332c33a8b69"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set window properties.  <a href="#a0b16b97dd24ea1424b651332c33a8b69">More...</a><br/></td></tr>
<tr class="separator:a0b16b97dd24ea1424b651332c33a8b69"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa15dd0844f5ccd96a2d175b0ee78b8e7"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#aa15dd0844f5ccd96a2d175b0ee78b8e7">reparent</a> (const <a class="el" href="classminxlib_1_1window.html">window</a> &amp;p)</td></tr>
<tr class="memdesc:aa15dd0844f5ccd96a2d175b0ee78b8e7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reparent this window to another.  <a href="#aa15dd0844f5ccd96a2d175b0ee78b8e7">More...</a><br/></td></tr>
<tr class="separator:aa15dd0844f5ccd96a2d175b0ee78b8e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc347a1488cd17e03e081f287691051a"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classminxlib_1_1window.html">window</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#afc347a1488cd17e03e081f287691051a">parent</a> ()</td></tr>
<tr class="memdesc:afc347a1488cd17e03e081f287691051a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get this window's parent window.  <a href="#afc347a1488cd17e03e081f287691051a">More...</a><br/></td></tr>
<tr class="separator:afc347a1488cd17e03e081f287691051a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a90e9ea1fa14a13ca4376e8b44c2d57f8"><td class="memItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="classminxlib_1_1window.html">window</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#a90e9ea1fa14a13ca4376e8b44c2d57f8">children</a> ()</td></tr>
<tr class="memdesc:a90e9ea1fa14a13ca4376e8b44c2d57f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get this window's children.  <a href="#a90e9ea1fa14a13ca4376e8b44c2d57f8">More...</a><br/></td></tr>
<tr class="separator:a90e9ea1fa14a13ca4376e8b44c2d57f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05e47f5047fb09089b0ee46d41d166fe"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#a05e47f5047fb09089b0ee46d41d166fe">screen</a> ()</td></tr>
<tr class="memdesc:a05e47f5047fb09089b0ee46d41d166fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get screen number of this window.  <a href="#a05e47f5047fb09089b0ee46d41d166fe">More...</a><br/></td></tr>
<tr class="separator:a05e47f5047fb09089b0ee46d41d166fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a63a88dba883db23adaf25434129a33d3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#a63a88dba883db23adaf25434129a33d3">select_events</a> (long mask)</td></tr>
<tr class="memdesc:a63a88dba883db23adaf25434129a33d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the X event mask for this window.  <a href="#a63a88dba883db23adaf25434129a33d3">More...</a><br/></td></tr>
<tr class="separator:a63a88dba883db23adaf25434129a33d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d737f7d5b08801c7b31e7da0ff52ec2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#a9d737f7d5b08801c7b31e7da0ff52ec2">grab_key</a> (const std::string &amp;s)</td></tr>
<tr class="memdesc:a9d737f7d5b08801c7b31e7da0ff52ec2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Setup a passive keyboard grab.  <a href="#a9d737f7d5b08801c7b31e7da0ff52ec2">More...</a><br/></td></tr>
<tr class="separator:a9d737f7d5b08801c7b31e7da0ff52ec2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9edfea4e5e8671dac8c8b7dbd07f62d5"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#a9edfea4e5e8671dac8c8b7dbd07f62d5">show</a> ()</td></tr>
<tr class="memdesc:a9edfea4e5e8671dac8c8b7dbd07f62d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Show the window, i.e., map it.  <a href="#a9edfea4e5e8671dac8c8b7dbd07f62d5">More...</a><br/></td></tr>
<tr class="separator:a9edfea4e5e8671dac8c8b7dbd07f62d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ceb1e616b1fe6ab32dd2b086ed3265e"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#a3ceb1e616b1fe6ab32dd2b086ed3265e">hide</a> ()</td></tr>
<tr class="memdesc:a3ceb1e616b1fe6ab32dd2b086ed3265e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Hide this window, i.e., unmap it.  <a href="#a3ceb1e616b1fe6ab32dd2b086ed3265e">More...</a><br/></td></tr>
<tr class="separator:a3ceb1e616b1fe6ab32dd2b086ed3265e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab4ecab7966af723758afa69824f169e4"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#ab4ecab7966af723758afa69824f169e4">is_mapped</a> ()</td></tr>
<tr class="memdesc:ab4ecab7966af723758afa69824f169e4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if window is currently mapped or not.  <a href="#ab4ecab7966af723758afa69824f169e4">More...</a><br/></td></tr>
<tr class="separator:ab4ecab7966af723758afa69824f169e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adadfff9fa6b13767ade590eebaa310ca"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#adadfff9fa6b13767ade590eebaa310ca">move_resize</a> (int x, int y, int w, int h)</td></tr>
<tr class="memdesc:adadfff9fa6b13767ade590eebaa310ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move and resize the window.  <a href="#adadfff9fa6b13767ade590eebaa310ca">More...</a><br/></td></tr>
<tr class="separator:adadfff9fa6b13767ade590eebaa310ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7905a61b4dadd154757081435ebde3f7"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#a7905a61b4dadd154757081435ebde3f7">configure</a> (int x, int y, int w, int h, int b, const <a class="el" href="classminxlib_1_1window.html">window</a> *s, int t, unsigned int v)</td></tr>
<tr class="memdesc:a7905a61b4dadd154757081435ebde3f7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configure the window.  <a href="#a7905a61b4dadd154757081435ebde3f7">More...</a><br/></td></tr>
<tr class="separator:a7905a61b4dadd154757081435ebde3f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1ff05255132df5330329b2aa048d92e0"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#a1ff05255132df5330329b2aa048d92e0">set_border_attr</a> (unsigned long c, unsigned int s)</td></tr>
<tr class="memdesc:a1ff05255132df5330329b2aa048d92e0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set window's border color and size.  <a href="#a1ff05255132df5330329b2aa048d92e0">More...</a><br/></td></tr>
<tr class="separator:a1ff05255132df5330329b2aa048d92e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64031783fa5bdb3f36476be3a1f52239"><td class="memItemLeft" align="right" valign="top">virtual std::vector&lt; int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#a64031783fa5bdb3f36476be3a1f52239">geometry</a> ()</td></tr>

<tr class="memdesc:a64031783fa5bdb3f36476be3a1f52239"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve window's size, position, and border width.  <a href="#a64031783fa5bdb3f36476be3a1f52239">More...</a><br/></td></tr>
<tr class="separator:a64031783fa5bdb3f36476be3a1f52239"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab657201c5d7ffddcb0f8f448bb9d4309"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#ab657201c5d7ffddcb0f8f448bb9d4309">focus</a> ()</td></tr>
<tr class="memdesc:ab657201c5d7ffddcb0f8f448bb9d4309"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set input focus on this window and raise it.  <a href="#ab657201c5d7ffddcb0f8f448bb9d4309">More...</a><br/></td></tr>
<tr class="separator:ab657201c5d7ffddcb0f8f448bb9d4309"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a42ae7cfc2279b41c89ae77125ad68e82"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#a42ae7cfc2279b41c89ae77125ad68e82">kill</a> ()</td></tr>
<tr class="memdesc:a42ae7cfc2279b41c89ae77125ad68e82"><td class="mdescLeft">&#160;</td><td class="mdescRight">Kill this window.  <a href="#a42ae7cfc2279b41c89ae77125ad68e82">More...</a><br/></td></tr>
<tr class="separator:a42ae7cfc2279b41c89ae77125ad68e82"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad75e1509c45ea694638313ed42ccfad0"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#ad75e1509c45ea694638313ed42ccfad0">nuke</a> ()</td></tr>
<tr class="memdesc:ad75e1509c45ea694638313ed42ccfad0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Kill this window using brute force.  <a href="#ad75e1509c45ea694638313ed42ccfad0">More...</a><br/></td></tr>
<tr class="separator:ad75e1509c45ea694638313ed42ccfad0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae47e1c5ef9f774d73c4bbeb8a22e952c"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#ae47e1c5ef9f774d73c4bbeb8a22e952c">~window</a> ()</td></tr>
<tr class="memdesc:ae47e1c5ef9f774d73c4bbeb8a22e952c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#ae47e1c5ef9f774d73c4bbeb8a22e952c">More...</a><br/></td></tr>
<tr class="separator:ae47e1c5ef9f774d73c4bbeb8a22e952c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a658aa509a4ba86b2b927ed324e19c1b2"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classminxlib_1_1window.html#a658aa509a4ba86b2b927ed324e19c1b2">pythonize</a> ()</td></tr>
<tr class="memdesc:a658aa509a4ba86b2b927ed324e19c1b2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Export the window class to minxlib Python module.  <a href="#a658aa509a4ba86b2b927ed324e19c1b2">More...</a><br/></td></tr>
<tr class="separator:a658aa509a4ba86b2b927ed324e19c1b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Encapsulate the details of an X window. </p>
<p>This class provides an API for the Python parts of Minx to be able to deal with X windows. It wraps around the relevant parts of Xlib and exposes its functionality to Python via <a href="http://www.boost.org/libs/python/doc/">Boost.Python</a>. </p>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a class="anchor" id="a877dfcd851499f9bd1b911ca0e1926bb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classminxlib_1_1window.html#a877dfcd851499f9bd1b911ca0e1926bb">minxlib::window::configure_mask</a></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>An enumeration for the different configure values. </p>
<p>This enumeration simply provides C++ names for the Xlib value mask for configure requests. These names are exported to Python via <a href="http://www.boost.org/libs/python/doc/">Boost.Python</a>'s enum exporting facility.</p>
<p>The minxlib and corresponding Xlib names for these enums are shown below:</p>
<table class="doxtable">
<tr>
<th><b>minxlib</b>  </th><th><b>Xlib</b>  </th></tr>
................................................................................
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classminxlib_1_1window.html#ac709e7dc27cd9730e44e10ced19100e7">minxlib::window::event_mask</a></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>An enumeration for the different event masks. </p>
<p>This enumeration simply provides C++ names for the Xlib event masks that are exported to Python via <a href="http://www.boost.org/libs/python/doc/">Boost.Python</a>'s enum exporting facility.</p>
<p>minxlib's names for the event masks and their corresponding Xlib names are shown below:</p>
<table class="doxtable">
<tr>
<th><b>minxlib</b> </th><th><b>Xlib</b> </th></tr>
................................................................................
<td>colormap_change_mask </td><td>ColormapChangeMask </td></tr>
<tr>
<td>owner_grab_button_mask </td><td>OwnerGrabButtonMask </td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ac5db5d29d610a8bdcdb687b71ce180fe"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">minxlib::window::window </td>
          <td>(</td>
          <td class="paramtype">Display *&#160;</td>
          <td class="paramname"><em>d</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Window&#160;</td>
          <td class="paramname"><em>w</em>&#160;</td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Create a wrapper object for an existing Xlib window. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">d</td><td>The display object to which the window is "linked." </td></tr>
    <tr><td class="paramname">w</td><td>The Xlib Window ID. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A valid window wrapper for the given Xlib window. </dd></dl>

</div>
</div>
<a class="anchor" id="ae47e1c5ef9f774d73c4bbeb8a22e952c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual minxlib::window::~window </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Destructor. </p>
<dl class="section return"><dt>Returns</dt><dd>Nothing.</dd></dl>
<p>Clean-up for when a window object is deleted. Really, there's nothing to do because this class is only a thin wrapper around X windows and we only maintain a pointer to the Xlib display structure and an integral ID. We don't actually create or acquire anything when this class is instantiated; consequently, there's nothing to destroy or release. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a90e9ea1fa14a13ca4376e8b44c2d57f8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;<a class="el" href="classminxlib_1_1window.html">window</a>&gt; minxlib::window::children </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get this window's children. </p>
<dl class="section return"><dt>Returns</dt><dd>Window's children.</dd></dl>
<p>This function uses XQueryTree() to determine the list of child windows of the X window encapsulated by this object. If the call to XQueryTree() fails, this function will return an empty list and, eventually, X will generate a protocol error. </p>

</div>
</div>
<a class="anchor" id="a7905a61b4dadd154757081435ebde3f7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>

          <td class="memname">virtual void minxlib::window::configure </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Configure the window. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>Window's x coordinate relative to parent's origin. </td></tr>
    <tr><td class="paramname">y</td><td>Window's y coordinate relative to parent's origin. </td></tr>
    <tr><td class="paramname">w</td><td>Window's width (not counting its border). </td></tr>
    <tr><td class="paramname">h</td><td>Window's height (not counting its border). </td></tr>
    <tr><td class="paramname">b</td><td>Window's border width. </td></tr>
    <tr><td class="paramname">s</td><td>Window's sibling for stacking operations. </td></tr>
    <tr><td class="paramname">t</td><td>Window's stacking mode. </td></tr>
    <tr><td class="paramname">v</td><td>Value mask to determine what to configure. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Nothing.</dd></dl>
<p>This function calls XConfigureWindow() using v as the value_mask parameter to the Xlib function and using the other parameters to fill out the XWindowChanges structure. The value_mask is a bitwise OR of the configure_mask enums.</p>
<p>Please consult Xlib documentation for further details. For example, the following page may be instructive:</p>
<p><a href="http://tronche.com/gui/x/xlib/window/configure.html">http://tronche.com/gui/x/xlib/window/configure.html</a> </p>

<p>Reimplemented in <a class="el" href="classminxlib_1_1root__window.html#a96e831fb44a1c29d5187abd3e25ef8f7">minxlib::root_window</a>.</p>

</div>
</div>
<a class="anchor" id="ab657201c5d7ffddcb0f8f448bb9d4309"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>

          <td class="memname">virtual void minxlib::window::focus </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set input focus on this window and raise it. </p>
<dl class="section return"><dt>Returns</dt><dd>Nothing. </dd></dl>

<p>Reimplemented in <a class="el" href="classminxlib_1_1root__window.html#a23c173a07fe7ee9bbfafe5bbeccf6d95">minxlib::root_window</a>.</p>

</div>
</div>
<a class="anchor" id="a64031783fa5bdb3f36476be3a1f52239"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>

          <td class="memname">virtual std::vector&lt;int&gt; minxlib::window::geometry </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Retrieve window's size, position, and border width. </p>
<dl class="section return"><dt>Returns</dt><dd>STL vector of ints containing window geometry.</dd></dl>

<p>This function uses XGetGeometry() to determine the window's size, position, and border width. It returns an STL vector of integers containing the following five values:</p>
<ul>
<li>Element 0: x-coordinate of window's top-left corner </li>
<li>Element 1: y-coordinate of window's top-left corner </li>
<li>Element 2: window width </li>
<li>Element 3: window height </li>
<li>Element 4: window's border width</li>
</ul>

<p>If the call to XGetGeometry() fails, this function will return an empty vector.</p>
<dl class="section note"><dt>Note</dt><dd>On the Python side, the STL vector returned by this function will be converted into a Python list. Also, since we would expect a <a class="el" href="structminxlib_1_1protocol__error.html" title="A base class to indicate X protocol errors. ">minxlib::protocol_error</a> to be raised soon after a failed XGetGeometry(), we return and empty list instead of throwing an exception in case the call to XGetGeometry() bombs. </dd></dl>

<p>Reimplemented in <a class="el" href="classminxlib_1_1root__window.html#a0726debab25eb60abe696a2e5aa91138">minxlib::root_window</a>.</p>

</div>
</div>
<a class="anchor" id="a9d737f7d5b08801c7b31e7da0ff52ec2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void minxlib::window::grab_key </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>s</em>)</td><td></td>
          <td></td>
        </tr>
      </table>

</div><div class="memdoc">

<p>Setup a passive keyboard grab. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">s</td><td>String describing key sequence for activating grab. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Nothing.</dd></dl>
<p>The string s is expected to name a key binding and should be of the form:</p>
<pre class="fragment">    (([CAS]|M[1-5]?)-)*key
</pre><p>The parenthesized part plus the asterisk in the above expression are a regular expression while <code>"key"</code> stands for the string form of a valid X keysym. Here are some examples of key binding specifications:</p>
<table class="doxtable">
<tr>
<td>C-A-T  </td><td>CTRL + ALT + T  </td></tr>
<tr>
<td>S-F1  </td><td>SHIFT + F1  </td></tr>
<tr>
<td>A-Tab  </td><td>ALT + Tab  </td></tr>
................................................................................
</table>
<p>Minx's key bindings specification is designed to be similar to the way key bindings are specified in Emacs.</p>
<p>This function interprets its parameter s in the manner described above and infers the appropriate keycode and corresponding modifier mask for the specified key binding. It then sets up a passive grab for that keycode and modifier mask and also records the name of the key binding (viz., s) in a key map that is indexed using the keycode and modifier mask.</p>
<p>Later, when the X server sends Minx keyboard events, we will use the event's keycode and modifier mask to look-up the key binding in the above-mentioned key map and return that name as part of the event to Minx's Python core. </p>

</div>
</div>
<a class="anchor" id="a3ceb1e616b1fe6ab32dd2b086ed3265e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>

          <td class="memname">virtual void minxlib::window::hide </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Hide this window, i.e., unmap it. </p>
<dl class="section return"><dt>Returns</dt><dd>Nothing. </dd></dl>

<p>Reimplemented in <a class="el" href="classminxlib_1_1root__window.html#aa4f323eeec1eb8416630938356b926b8">minxlib::root_window</a>.</p>

</div>
</div>
<a class="anchor" id="ab4ecab7966af723758afa69824f169e4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool minxlib::window::is_mapped </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Check if window is currently mapped or not. </p>
<dl class="section return"><dt>Returns</dt><dd>True if window is mapped, false otherwise.</dd></dl>
<p>This function uses XGetWindowAttributes() and checks the value of the XWindowAttributes's map_state field to see if the window is mapped or not. It'll return true if map_state equals IsViewable or IsUnviewable and false if either map_state is IsUnmapped or if the call to XGetWindowAttributes() fails.</p>
<dl class="section note"><dt>Note</dt><dd>If XGetWindowAttributes() fails, we would expect a <a class="el" href="structminxlib_1_1protocol__error.html" title="A base class to indicate X protocol errors. ">minxlib::protocol_error</a> to be raised soon after. That's why this function returns false instead of throwing an exception. </dd></dl>

<p>Reimplemented in <a class="el" href="classminxlib_1_1root__window.html#aa19dd69cb3a1f0e3e5e7d504de735728">minxlib::root_window</a>.</p>

</div>
</div>
<a class="anchor" id="a42ae7cfc2279b41c89ae77125ad68e82"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>

          <td class="memname">virtual void minxlib::window::kill </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Kill this window. </p>
<dl class="section return"><dt>Returns</dt><dd>Nothing.</dd></dl>
<p>This method destroys the X window encapsulated by this object by killing the X client application that created the window. If the window supports the WM_DELETE_WINDOW protocol, this method will use that to kill the window and its client application. Otherwise, it will simply use the XKillClient() function to destroy the window and its client by brute force. </p>

<p>Reimplemented in <a class="el" href="classminxlib_1_1root__window.html#ac4d52ed99686fcb9d84781abc95952cd">minxlib::root_window</a>.</p>

</div>
</div>
<a class="anchor" id="adadfff9fa6b13767ade590eebaa310ca"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>

          <td class="memname">virtual void minxlib::window::move_resize </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
................................................................................
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Move and resize the window. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>Window's x coordinate relative to parent's origin. </td></tr>
    <tr><td class="paramname">y</td><td>Window's y coordinate relative to parent's origin. </td></tr>
    <tr><td class="paramname">w</td><td>Window's width (not counting its border). </td></tr>
    <tr><td class="paramname">h</td><td>Window's height (not counting its border). </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Nothing.</dd></dl>
<p>This function sets the window geometry by calling XMoveResizeWindow(). Please consult Xlib documentation for further details. </p>

<p>Reimplemented in <a class="el" href="classminxlib_1_1root__window.html#afc45b7ebc8cb364f042b2e005529f6b0">minxlib::root_window</a>.</p>

</div>
</div>
<a class="anchor" id="ad75e1509c45ea694638313ed42ccfad0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>

          <td class="memname">virtual void minxlib::window::nuke </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Kill this window using brute force. </p>
<dl class="section return"><dt>Returns</dt><dd>Nothing.</dd></dl>
<p>This method destroys the X window encapsulated by this object without trying a graceful shutdown via WM_DELETE_WINDOW. It is meant to be used on those clients whose windows advertise support for WM_DELETE_WINDOW but don't implement the delete protocol properly and stay alive without good cause despite a user-initiated kill request. </p>

<p>Reimplemented in <a class="el" href="classminxlib_1_1root__window.html#a5d3d1141c0b0447b4d935a5081e8fa6e">minxlib::root_window</a>.</p>

</div>
</div>
<a class="anchor" id="ad00dd8b5dfbc8801ec481a6158a97093"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">minxlib::window::operator Window </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Convert to an Xlib Window. </p>
<dl class="section return"><dt>Returns</dt><dd>This object cast to an Xlib Window.</dd></dl>
<p>This cast operator allows us to pass <a class="el" href="classminxlib_1_1window.html" title="Encapsulate the details of an X window. ">minxlib::window</a> objects seamlessly to Xlib functions. </p>

</div>
</div>
<a class="anchor" id="a271a44a98150a488ce15cac394a26303"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool minxlib::window::operator!= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classminxlib_1_1window.html">window</a> &amp;&#160;</td>
          <td class="paramname"><em>w</em>)</td><td></td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Window inequality operator. &l