Deploy gryf/window-maker.github.io to github.com/gryf/window-maker.github.io.git:gh-pages
36
README.md
Normal file
@@ -0,0 +1,36 @@
|
||||
Window Maker webpage source
|
||||
===========================
|
||||
|
||||
This is a web page source files. All of the files should be proper markdown
|
||||
files accepted by [Jekyll](https://jekyllrb.com) static site generator.
|
||||
|
||||
Build/serve
|
||||
-----------
|
||||
|
||||
In order to build the site, you'll need Jekyll framework installed and
|
||||
[jekyll-rst](https://github.com/gryf/jekyll-rst) plugin. Easiest way
|
||||
to achieve it, is to install it from system repositories.
|
||||
|
||||
If your distribution doesn't contain it (even in external ones, like PPA for
|
||||
Ubuntu, AUR for Arch or some portage overlay from Gentoo), that it might be
|
||||
installed locally using [Bundler](https://github.com/bundler/bundler), which
|
||||
typical usage would be as follows:
|
||||
|
||||
```
|
||||
$ cd window-maker.github.io && bundler init
|
||||
$ bundler add jekyll
|
||||
$ mkdir _plugins
|
||||
$ git clone https://github.com/gryf/jekyll-rst _plugins/jekyll-rst
|
||||
$ pip install docutils pygments
|
||||
$ gem install RbST nokogiri
|
||||
$ bundler exec jekyll serve
|
||||
```
|
||||
|
||||
Consult [jekyll-rst](https://github.com/gryf/jekyll-rst) plugin documentation
|
||||
for requirements. Other options for installing dependencies are also possible -
|
||||
they might be installed from distribution repositories.
|
||||
|
||||
Last line will initialize gemfile, add jekyll to it, and then perform `jekyll
|
||||
serve` which underneath will build the site and than run simple http server on
|
||||
`http://localhost:4000` in development mode. More about jekyll you can find [on
|
||||
it's page](https://jekyllrb.com/docs)
|
||||
42
WINGs_tutorial/3 Steps to Make a WINGs User Interface.html
Normal file
@@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- saved from url=(0074)WINGsIntro.html -->
|
||||
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>3 Steps to Make a WINGs User Interface</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="keywords" content="WINGs, tutorial, Introduction, C, programming, GUI, Window Maker, Linux">
|
||||
<meta name="description" content="WINGs library tutorial">
|
||||
<meta name="license" content="GNU Free Documentation License">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table align="JUSITFY" width="100%"><tbody><tr><td align="LEFT"><a href="WINGtoc.html">LAST: Contents</a></td><td align="RIGHT"><a href="WINGStep1.html">NEXT: Step 1 Drawing a Window</a></td></tr></tbody></table>
|
||||
|
||||
<h3>Make a WINGs based Graphical User Interface in 3 Steps</h3>
|
||||
|
||||
The WINGs library is the library with routines for a graphical user interface which comes with the Window Maker window manager. In 2010 the library's web page is <a href="http://windowmaker.org/development.php?show=wings">here</a> on the windowmaker.org website. You can download windowmaker with the WINGs libraries <a href="http://windowmaker.org/index.php">here</a>. The library provides widgets which you can use to make a graphical user interface. A widget is a software module which is used to interact with the user. Buttons and menus are widgets. The WINGs library offers the possibility to programme these widgets in a few lines of C code, so that you can dedicate the rest of your time to the functionality in your application.
|
||||
|
||||
<p>This tutorial shows in three simple steps how to write a graphical user interface with WINGs. Those three steps will cover all that is needed to write the major dialogs and widgets needed for communication between application and user. It assumes that you know how to programme in C, but you do not need to know anything about GUI-programming.
|
||||
|
||||
</p><p> Step 1 in this tutorial will show the framework for an application which uses a WINGS graphical user interface. It shows how you have the WINGs library create a widget for you, and how you set its properties. Step 2 briefly explains what events are, and how you make your application react to incoming events. This is what makes your interface work. Step 3 shows how to insert two buttons and a text area into the application's window, and how to implement the handling of events for them. Along the explanations in the main text, there are a few examples of source code. Most WINGs function names speak for themselves, and therefore, not everything in the source code is repeated in the text. You can just read the code. The example developed in the three steps is a sufficient blueprint to allow you to use the other widgets in the WINGs library. To do that, just look up the functions in the relevant section in the library description section.
|
||||
|
||||
</p><p>There are three programming detail sections after the three tutorial sections. They explain how to use Xlib code along with the WINGs code, how to set up a widget in which you can draw OpenGL images, and how to change part of the WINGs library source for your own needs, among other things.
|
||||
|
||||
</p><p>To compile WINGs widgets, you need a C-compiler, the WINGs library, and an X-server on your computer. The first few libraries which you need will be libWINGs and libwraster, and the X11 library libXft. If the WINGs library <em>directory</em> is in the /usr/lib path, and your X11 libraries in /usr/X11/lib, you can compile the code with gcc as follows
|
||||
</p><p><kbd>gcc -x c FileName -lXft -L/usr/X11/lib -L/usr/lib -lwraster -lWINGs -o FileName</kbd>
|
||||
</p><p>This will get you a binary called FileName which you can run, either by double clicking, or by running the <kbd>./FileName</kbd> command in an xterm.
|
||||
</p><p> To compile in C++, just replace the <code> fprintf(stderr, ..)</code> command with an appropriate <code>cerr << </code>, add the namespace command, and replace the <stdio.h> with the iostream header, then compile as
|
||||
<kbd>
|
||||
g++ -x c++ -lXft FileName -L/usr/X11/lib -L/usr/lib -lwraster -lWINGs-o FileName</kbd>
|
||||
|
||||
|
||||
|
||||
</p><p>The function prototypes in the library description were retrieved from the information in the WINGs man pages which were compiled by Alexey Voinov. His page was <a href="http://voins.program.ru/windowmaker/wingsman.html">here</a> in 2010.
|
||||
|
||||
|
||||
<br>
|
||||
<br>
|
||||
</p><p>
|
||||
</p><table align="JUSITFY" width="100%"><tbody><tr><td align="LEFT"><a href="WINGtoc.html">LAST: Contents</a></td><td align="RIGHT"><a href="WINGStep1.html">NEXT: Step 1 Drawing a Window</a></td></tr></tbody></table>
|
||||
|
||||
|
||||
|
||||
</body><style type="text/css">embed[type*="application/x-shockwave-flash"],embed[src*=".swf"],object[type*="application/x-shockwave-flash"],object[codetype*="application/x-shockwave-flash"],object[src*=".swf"],object[codebase*="swflash.cab"],object[classid*="D27CDB6E-AE6D-11cf-96B8-444553540000"],object[classid*="d27cdb6e-ae6d-11cf-96b8-444553540000"],object[classid*="D27CDB6E-AE6D-11cf-96B8-444553540000"]{ display: none !important;}</style></html>
|
||||
70
WINGs_tutorial/EighthWindow.c
Normal file
@@ -0,0 +1,70 @@
|
||||
#include "editmenu.h"
|
||||
|
||||
#define WINWIDTH 300
|
||||
#define WINHEIGHT 400
|
||||
#define MENUWIDTH 80
|
||||
#define MENITEMHT 21
|
||||
|
||||
struct datacouple{WMWindow *window;
|
||||
WEditMenu *menu;
|
||||
} datacouple;
|
||||
|
||||
void closeAll(WMWidget *self,void *data){
|
||||
WMDestroyWidget(self);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void getMenu(WMWidget *self, void *data){
|
||||
WMPoint position;
|
||||
struct datacouple *tmp=(struct datacouple *)data;
|
||||
if(WMGetButtonSelected(self)){
|
||||
position=WMGetViewScreenPosition(WMWidgetView(tmp->window));
|
||||
WEditMenuShowAt(tmp->menu,(position.x>MENUWIDTH)?position.x-MENUWIDTH:0, position.y+MENITEMHT,tmp->window);
|
||||
}else
|
||||
WEditMenuHide(tmp->menu);
|
||||
}
|
||||
|
||||
int main (int argc, char **argv){
|
||||
|
||||
Display *display;
|
||||
WMScreen *screen;
|
||||
WMWindow *win;
|
||||
WEditMenu *submenu, *menu;
|
||||
WEditMenuItem * menuitem;
|
||||
struct datacouple Mainmenu;
|
||||
WMButton *Button;
|
||||
|
||||
WMInitializeApplication("MenuWindow", &argc, argv);
|
||||
display = XOpenDisplay("");
|
||||
screen = WMCreateScreen(display, DefaultScreen(display));
|
||||
win = WMCreateWindow(screen, "Menu");
|
||||
WMResizeWidget(win, WINWIDTH, WINHEIGHT);
|
||||
WMSetWindowCloseAction(win, closeAll, NULL);
|
||||
|
||||
submenu=WCreateEditMenu(screen,"Submenu");
|
||||
menuitem =WAddMenuItemWithTitle(submenu,"Submenu item");
|
||||
menu=WCreateEditMenu(screen,"Main menu");
|
||||
menuitem = WAddMenuItemWithTitle(menu,"To submenu");
|
||||
WSetEditMenuSubmenu(menu, menuitem , submenu);
|
||||
menuitem = WAddMenuItemWithTitle(menu,"Main item");
|
||||
|
||||
Mainmenu.window=win;
|
||||
Mainmenu.menu=menu;
|
||||
|
||||
Button =WMCreateButton(win,WBTPushOnPushOff);
|
||||
WMSetButtonText (Button, "Menu");
|
||||
WMSetButtonAction (Button, getMenu, &Mainmenu);
|
||||
WMMoveWidget(Button, 1,1);
|
||||
|
||||
WMRealizeWidget(win);
|
||||
WMRealizeWidget(Button);
|
||||
WMRealizeWidget(menu);
|
||||
WMRealizeWidget(submenu);
|
||||
|
||||
WMMapSubwidgets(win);
|
||||
WMMapWidget(win);
|
||||
|
||||
WMScreenMainLoop(screen);
|
||||
|
||||
return 0;
|
||||
}
|
||||
370
WINGs_tutorial/FDL.html
Normal file
@@ -0,0 +1,370 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- saved from url=(0068)FDL.html -->
|
||||
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>3 Steps to Make a WINGs User Interface - Licence</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table align="JUSITFY" width="100%"><tbody><tr><td align="LEFT"><a href="WINGtoc.html">Contents</a></td><td></td></tr></tbody></table>
|
||||
|
||||
|
||||
<pre> GNU Free Documentation License
|
||||
Version 1.1, March 2000
|
||||
|
||||
Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
0. PREAMBLE
|
||||
|
||||
The purpose of this License is to make a manual, textbook, or other
|
||||
written document "free" in the sense of freedom: to assure everyone
|
||||
the effective freedom to copy and redistribute it, with or without
|
||||
modifying it, either commercially or noncommercially. Secondarily,
|
||||
this License preserves for the author and publisher a way to get
|
||||
credit for their work, while not being considered responsible for
|
||||
modifications made by others.
|
||||
|
||||
This License is a kind of "copyleft", which means that derivative
|
||||
works of the document must themselves be free in the same sense. It
|
||||
complements the GNU General Public License, which is a copyleft
|
||||
license designed for free software.
|
||||
|
||||
We have designed this License in order to use it for manuals for free
|
||||
software, because free software needs free documentation: a free
|
||||
program should come with manuals providing the same freedoms that the
|
||||
software does. But this License is not limited to software manuals;
|
||||
it can be used for any textual work, regardless of subject matter or
|
||||
whether it is published as a printed book. We recommend this License
|
||||
principally for works whose purpose is instruction or reference.
|
||||
|
||||
|
||||
1. APPLICABILITY AND DEFINITIONS
|
||||
|
||||
This License applies to any manual or other work that contains a
|
||||
notice placed by the copyright holder saying it can be distributed
|
||||
under the terms of this License. The "Document", below, refers to any
|
||||
such manual or work. Any member of the public is a licensee, and is
|
||||
addressed as "you".
|
||||
|
||||
A "Modified Version" of the Document means any work containing the
|
||||
Document or a portion of it, either copied verbatim, or with
|
||||
modifications and/or translated into another language.
|
||||
|
||||
A "Secondary Section" is a named appendix or a front-matter section of
|
||||
the Document that deals exclusively with the relationship of the
|
||||
publishers or authors of the Document to the Document's overall subject
|
||||
(or to related matters) and contains nothing that could fall directly
|
||||
within that overall subject. (For example, if the Document is in part a
|
||||
textbook of mathematics, a Secondary Section may not explain any
|
||||
mathematics.) The relationship could be a matter of historical
|
||||
connection with the subject or with related matters, or of legal,
|
||||
commercial, philosophical, ethical or political position regarding
|
||||
them.
|
||||
|
||||
The "Invariant Sections" are certain Secondary Sections whose titles
|
||||
are designated, as being those of Invariant Sections, in the notice
|
||||
that says that the Document is released under this License.
|
||||
|
||||
The "Cover Texts" are certain short passages of text that are listed,
|
||||
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
|
||||
the Document is released under this License.
|
||||
|
||||
A "Transparent" copy of the Document means a machine-readable copy,
|
||||
represented in a format whose specification is available to the
|
||||
general public, whose contents can be viewed and edited directly and
|
||||
straightforwardly with generic text editors or (for images composed of
|
||||
pixels) generic paint programs or (for drawings) some widely available
|
||||
drawing editor, and that is suitable for input to text formatters or
|
||||
for automatic translation to a variety of formats suitable for input
|
||||
to text formatters. A copy made in an otherwise Transparent file
|
||||
format whose markup has been designed to thwart or discourage
|
||||
subsequent modification by readers is not Transparent. A copy that is
|
||||
not "Transparent" is called "Opaque".
|
||||
|
||||
Examples of suitable formats for Transparent copies include plain
|
||||
ASCII without markup, Texinfo input format, LaTeX input format, SGML
|
||||
or XML using a publicly available DTD, and standard-conforming simple
|
||||
HTML designed for human modification. Opaque formats include
|
||||
PostScript, PDF, proprietary formats that can be read and edited only
|
||||
by proprietary word processors, SGML or XML for which the DTD and/or
|
||||
processing tools are not generally available, and the
|
||||
machine-generated HTML produced by some word processors for output
|
||||
purposes only.
|
||||
|
||||
The "Title Page" means, for a printed book, the title page itself,
|
||||
plus such following pages as are needed to hold, legibly, the material
|
||||
this License requires to appear in the title page. For works in
|
||||
formats which do not have any title page as such, "Title Page" means
|
||||
the text near the most prominent appearance of the work's title,
|
||||
preceding the beginning of the body of the text.
|
||||
|
||||
|
||||
2. VERBATIM COPYING
|
||||
|
||||
You may copy and distribute the Document in any medium, either
|
||||
commercially or noncommercially, provided that this License, the
|
||||
copyright notices, and the license notice saying this License applies
|
||||
to the Document are reproduced in all copies, and that you add no other
|
||||
conditions whatsoever to those of this License. You may not use
|
||||
technical measures to obstruct or control the reading or further
|
||||
copying of the copies you make or distribute. However, you may accept
|
||||
compensation in exchange for copies. If you distribute a large enough
|
||||
number of copies you must also follow the conditions in section 3.
|
||||
|
||||
You may also lend copies, under the same conditions stated above, and
|
||||
you may publicly display copies.
|
||||
|
||||
|
||||
3. COPYING IN QUANTITY
|
||||
|
||||
If you publish printed copies of the Document numbering more than 100,
|
||||
and the Document's license notice requires Cover Texts, you must enclose
|
||||
the copies in covers that carry, clearly and legibly, all these Cover
|
||||
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
|
||||
the back cover. Both covers must also clearly and legibly identify
|
||||
you as the publisher of these copies. The front cover must present
|
||||
the full title with all words of the title equally prominent and
|
||||
visible. You may add other material on the covers in addition.
|
||||
Copying with changes limited to the covers, as long as they preserve
|
||||
the title of the Document and satisfy these conditions, can be treated
|
||||
as verbatim copying in other respects.
|
||||
|
||||
If the required texts for either cover are too voluminous to fit
|
||||
legibly, you should put the first ones listed (as many as fit
|
||||
reasonably) on the actual cover, and continue the rest onto adjacent
|
||||
pages.
|
||||
|
||||
If you publish or distribute Opaque copies of the Document numbering
|
||||
more than 100, you must either include a machine-readable Transparent
|
||||
copy along with each Opaque copy, or state in or with each Opaque copy
|
||||
a publicly-accessible computer-network location containing a complete
|
||||
Transparent copy of the Document, free of added material, which the
|
||||
general network-using public has access to download anonymously at no
|
||||
charge using public-standard network protocols. If you use the latter
|
||||
option, you must take reasonably prudent steps, when you begin
|
||||
distribution of Opaque copies in quantity, to ensure that this
|
||||
Transparent copy will remain thus accessible at the stated location
|
||||
until at least one year after the last time you distribute an Opaque
|
||||
copy (directly or through your agents or retailers) of that edition to
|
||||
the public.
|
||||
|
||||
It is requested, but not required, that you contact the authors of the
|
||||
Document well before redistributing any large number of copies, to give
|
||||
them a chance to provide you with an updated version of the Document.
|
||||
|
||||
|
||||
4. MODIFICATIONS
|
||||
|
||||
You may copy and distribute a Modified Version of the Document under
|
||||
the conditions of sections 2 and 3 above, provided that you release
|
||||
the Modified Version under precisely this License, with the Modified
|
||||
Version filling the role of the Document, thus licensing distribution
|
||||
and modification of the Modified Version to whoever possesses a copy
|
||||
of it. In addition, you must do these things in the Modified Version:
|
||||
|
||||
A. Use in the Title Page (and on the covers, if any) a title distinct
|
||||
from that of the Document, and from those of previous versions
|
||||
(which should, if there were any, be listed in the History section
|
||||
of the Document). You may use the same title as a previous version
|
||||
if the original publisher of that version gives permission.
|
||||
B. List on the Title Page, as authors, one or more persons or entities
|
||||
responsible for authorship of the modifications in the Modified
|
||||
Version, together with at least five of the principal authors of the
|
||||
Document (all of its principal authors, if it has less than five).
|
||||
C. State on the Title page the name of the publisher of the
|
||||
Modified Version, as the publisher.
|
||||
D. Preserve all the copyright notices of the Document.
|
||||
E. Add an appropriate copyright notice for your modifications
|
||||
adjacent to the other copyright notices.
|
||||
F. Include, immediately after the copyright notices, a license notice
|
||||
giving the public permission to use the Modified Version under the
|
||||
terms of this License, in the form shown in the Addendum below.
|
||||
G. Preserve in that license notice the full lists of Invariant Sections
|
||||
and required Cover Texts given in the Document's license notice.
|
||||
H. Include an unaltered copy of this License.
|
||||
I. Preserve the section entitled "History", and its title, and add to
|
||||
it an item stating at least the title, year, new authors, and
|
||||
publisher of the Modified Version as given on the Title Page. If
|
||||
there is no section entitled "History" in the Document, create one
|
||||
stating the title, year, authors, and publisher of the Document as
|
||||
given on its Title Page, then add an item describing the Modified
|
||||
Version as stated in the previous sentence.
|
||||
J. Preserve the network location, if any, given in the Document for
|
||||
public access to a Transparent copy of the Document, and likewise
|
||||
the network locations given in the Document for previous versions
|
||||
it was based on. These may be placed in the "History" section.
|
||||
You may omit a network location for a work that was published at
|
||||
least four years before the Document itself, or if the original
|
||||
publisher of the version it refers to gives permission.
|
||||
K. In any section entitled "Acknowledgements" or "Dedications",
|
||||
preserve the section's title, and preserve in the section all the
|
||||
substance and tone of each of the contributor acknowledgements
|
||||
and/or dedications given therein.
|
||||
L. Preserve all the Invariant Sections of the Document,
|
||||
unaltered in their text and in their titles. Section numbers
|
||||
or the equivalent are not considered part of the section titles.
|
||||
M. Delete any section entitled "Endorsements". Such a section
|
||||
may not be included in the Modified Version.
|
||||
N. Do not retitle any existing section as "Endorsements"
|
||||
or to conflict in title with any Invariant Section.
|
||||
|
||||
If the Modified Version includes new front-matter sections or
|
||||
appendices that qualify as Secondary Sections and contain no material
|
||||
copied from the Document, you may at your option designate some or all
|
||||
of these sections as invariant. To do this, add their titles to the
|
||||
list of Invariant Sections in the Modified Version's license notice.
|
||||
These titles must be distinct from any other section titles.
|
||||
|
||||
You may add a section entitled "Endorsements", provided it contains
|
||||
nothing but endorsements of your Modified Version by various
|
||||
parties--for example, statements of peer review or that the text has
|
||||
been approved by an organization as the authoritative definition of a
|
||||
standard.
|
||||
|
||||
You may add a passage of up to five words as a Front-Cover Text, and a
|
||||
passage of up to 25 words as a Back-Cover Text, to the end of the list
|
||||
of Cover Texts in the Modified Version. Only one passage of
|
||||
Front-Cover Text and one of Back-Cover Text may be added by (or
|
||||
through arrangements made by) any one entity. If the Document already
|
||||
includes a cover text for the same cover, previously added by you or
|
||||
by arrangement made by the same entity you are acting on behalf of,
|
||||
you may not add another; but you may replace the old one, on explicit
|
||||
permission from the previous publisher that added the old one.
|
||||
|
||||
The author(s) and publisher(s) of the Document do not by this License
|
||||
give permission to use their names for publicity for or to assert or
|
||||
imply endorsement of any Modified Version.
|
||||
|
||||
|
||||
5. COMBINING DOCUMENTS
|
||||
|
||||
You may combine the Document with other documents released under this
|
||||
License, under the terms defined in section 4 above for modified
|
||||
versions, provided that you include in the combination all of the
|
||||
Invariant Sections of all of the original documents, unmodified, and
|
||||
list them all as Invariant Sections of your combined work in its
|
||||
license notice.
|
||||
|
||||
The combined work need only contain one copy of this License, and
|
||||
multiple identical Invariant Sections may be replaced with a single
|
||||
copy. If there are multiple Invariant Sections with the same name but
|
||||
different contents, make the title of each such section unique by
|
||||
adding at the end of it, in parentheses, the name of the original
|
||||
author or publisher of that section if known, or else a unique number.
|
||||
Make the same adjustment to the section titles in the list of
|
||||
Invariant Sections in the license notice of the combined work.
|
||||
|
||||
In the combination, you must combine any sections entitled "History"
|
||||
in the various original documents, forming one section entitled
|
||||
"History"; likewise combine any sections entitled "Acknowledgements",
|
||||
and any sections entitled "Dedications". You must delete all sections
|
||||
entitled "Endorsements."
|
||||
|
||||
|
||||
6. COLLECTIONS OF DOCUMENTS
|
||||
|
||||
You may make a collection consisting of the Document and other documents
|
||||
released under this License, and replace the individual copies of this
|
||||
License in the various documents with a single copy that is included in
|
||||
the collection, provided that you follow the rules of this License for
|
||||
verbatim copying of each of the documents in all other respects.
|
||||
|
||||
You may extract a single document from such a collection, and distribute
|
||||
it individually under this License, provided you insert a copy of this
|
||||
License into the extracted document, and follow this License in all
|
||||
other respects regarding verbatim copying of that document.
|
||||
|
||||
|
||||
7. AGGREGATION WITH INDEPENDENT WORKS
|
||||
|
||||
A compilation of the Document or its derivatives with other separate
|
||||
and independent documents or works, in or on a volume of a storage or
|
||||
distribution medium, does not as a whole count as a Modified Version
|
||||
of the Document, provided no compilation copyright is claimed for the
|
||||
compilation. Such a compilation is called an "aggregate", and this
|
||||
License does not apply to the other self-contained works thus compiled
|
||||
with the Document, on account of their being thus compiled, if they
|
||||
are not themselves derivative works of the Document.
|
||||
|
||||
If the Cover Text requirement of section 3 is applicable to these
|
||||
copies of the Document, then if the Document is less than one quarter
|
||||
of the entire aggregate, the Document's Cover Texts may be placed on
|
||||
covers that surround only the Document within the aggregate.
|
||||
Otherwise they must appear on covers around the whole aggregate.
|
||||
|
||||
|
||||
8. TRANSLATION
|
||||
|
||||
Translation is considered a kind of modification, so you may
|
||||
distribute translations of the Document under the terms of section 4.
|
||||
Replacing Invariant Sections with translations requires special
|
||||
permission from their copyright holders, but you may include
|
||||
translations of some or all Invariant Sections in addition to the
|
||||
original versions of these Invariant Sections. You may include a
|
||||
translation of this License provided that you also include the
|
||||
original English version of this License. In case of a disagreement
|
||||
between the translation and the original English version of this
|
||||
License, the original English version will prevail.
|
||||
|
||||
|
||||
9. TERMINATION
|
||||
|
||||
You may not copy, modify, sublicense, or distribute the Document except
|
||||
as expressly provided for under this License. Any other attempt to
|
||||
copy, modify, sublicense or distribute the Document is void, and will
|
||||
automatically terminate your rights under this License. However,
|
||||
parties who have received copies, or rights, from you under this
|
||||
License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
|
||||
10. FUTURE REVISIONS OF THIS LICENSE
|
||||
|
||||
The Free Software Foundation may publish new, revised versions
|
||||
of the GNU Free Documentation License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns. See
|
||||
http://www.gnu.org/copyleft/.
|
||||
|
||||
Each version of the License is given a distinguishing version number.
|
||||
If the Document specifies that a particular numbered version of this
|
||||
License "or any later version" applies to it, you have the option of
|
||||
following the terms and conditions either of that specified version or
|
||||
of any later version that has been published (not as a draft) by the
|
||||
Free Software Foundation. If the Document does not specify a version
|
||||
number of this License, you may choose any version ever published (not
|
||||
as a draft) by the Free Software Foundation.
|
||||
|
||||
|
||||
ADDENDUM: How to use this License for your documents
|
||||
|
||||
To use this License in a document you have written, include a copy of
|
||||
the License in the document and put the following copyright and
|
||||
license notices just after the title page:
|
||||
|
||||
Copyright (c) YEAR YOUR NAME.
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with the Invariant Sections being LIST THEIR TITLES, with the
|
||||
Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
|
||||
A copy of the license is included in the section entitled "GNU
|
||||
Free Documentation License".
|
||||
|
||||
If you have no Invariant Sections, write "with no Invariant Sections"
|
||||
instead of saying which ones are invariant. If you have no
|
||||
Front-Cover Texts, write "no Front-Cover Texts" instead of
|
||||
"Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
|
||||
|
||||
If your document contains nontrivial examples of program code, we
|
||||
recommend releasing these examples in parallel under your choice of
|
||||
free software license, such as the GNU General Public License,
|
||||
to permit their use in free software.
|
||||
|
||||
</pre>
|
||||
|
||||
</body><style type="text/css">embed[type*="application/x-shockwave-flash"],embed[src*=".swf"],object[type*="application/x-shockwave-flash"],object[codetype*="application/x-shockwave-flash"],object[src*=".swf"],object[codebase*="swflash.cab"],object[classid*="D27CDB6E-AE6D-11cf-96B8-444553540000"],object[classid*="d27cdb6e-ae6d-11cf-96b8-444553540000"],object[classid*="D27CDB6E-AE6D-11cf-96B8-444553540000"]{ display: none !important;}</style></html>
|
||||
119
WINGs_tutorial/FifthWindow.c
Normal file
@@ -0,0 +1,119 @@
|
||||
#define MARGIN 14
|
||||
#define WINWIDTH 300
|
||||
#define WINHEIGHT 400
|
||||
|
||||
Display *display;
|
||||
WMScreen *screen;
|
||||
|
||||
WMWindow *win;
|
||||
WMSize ButtonsetSize;
|
||||
|
||||
WMText *text;
|
||||
WMColor *color;
|
||||
WMFrame *controlframe;
|
||||
|
||||
char textbuf[40];
|
||||
|
||||
void closeAll(WMWidget *self,void *data){
|
||||
WMDestroyWidget(self);
|
||||
fprintf(stderr,"I've been used!\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
static void selectFiles(void *self, void *data){
|
||||
int i=0;
|
||||
WMOpenPanel *oPanel;
|
||||
oPanel = WMGetOpenPanel(screen);
|
||||
if (WMRunModalFilePanelForDirectory(oPanel, NULL, "/tmp",
|
||||
"Search..", NULL) == True){
|
||||
snprintf(textbuf,39,"%s\n-", WMGetFilePanelFileName(oPanel));
|
||||
WMFreezeText(text);
|
||||
WMAppendTextStream(text,textbuf);
|
||||
WMThawText(text);
|
||||
}
|
||||
return ;
|
||||
}
|
||||
|
||||
static void handleEvents(XEvent *event, void *data){
|
||||
WMWidget *widget = (WMWidget*)data;
|
||||
switch (event->type) {
|
||||
case ButtonPress:
|
||||
snprintf(textbuf,39,"Button down at (%i,%i) \n-",event->xbutton.x,event->xbutton.y);
|
||||
WMFreezeText(text);
|
||||
WMAppendTextStream(text,textbuf);
|
||||
WMThawText(text);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void resizeHandler(void *self, WMNotification *notif){
|
||||
WMSize size = WMGetViewSize(WMWidgetView(win));
|
||||
WMMoveWidget(controlframe, size.width-ButtonsetSize.width, size.height-ButtonsetSize.height);
|
||||
WMResizeWidget(text, size.width-MARGIN -10, size.height-80);
|
||||
}
|
||||
|
||||
|
||||
int main (int argc, char **argv){
|
||||
|
||||
WMButton *Button;
|
||||
|
||||
WMInitializeApplication("FifthWindow", &argc, argv);
|
||||
if (!(display = XOpenDisplay(""))){
|
||||
fprintf(stderr,"err: cannot open display");
|
||||
exit(1);
|
||||
}
|
||||
screen = WMCreateScreen(display, DefaultScreen(display));
|
||||
|
||||
/* window */
|
||||
win = WMCreateWindow(screen, "");
|
||||
WMResizeWidget(win, WINWIDTH, WINHEIGHT);
|
||||
WMSetWindowCloseAction(win, closeAll, NULL);
|
||||
WMCreateEventHandler(WMWidgetView(win), ButtonPressMask,handleEvents, win);
|
||||
color = WMCreateRGBColor(screen, 124<<9,206<<8,162<<8, False);
|
||||
WMSetWidgetBackgroundColor((WMWidget *)win, color);
|
||||
WMSetViewNotifySizeChanges(WMWidgetView(win), True);
|
||||
WMAddNotificationObserver(resizeHandler, NULL, WMViewSizeDidChangeNotification, WMWidgetView(win));
|
||||
|
||||
/* Text area */
|
||||
|
||||
text = WMCreateText(win);
|
||||
WMResizeWidget(text, WINWIDTH-MARGIN, WINHEIGHT -80);
|
||||
WMMoveWidget(text, 10, 10);
|
||||
WMSetTextHasVerticalScroller(text, True);
|
||||
WMSetTextEditable(text, False);
|
||||
|
||||
/* frame and two buttons */
|
||||
|
||||
controlframe=WMCreateFrame(win);
|
||||
WMSetWidgetBackgroundColor((WMWidget *)controlframe, color);
|
||||
WMSetFrameRelief(controlframe,WRFlat);
|
||||
|
||||
Button =WMCreateButton(controlframe,WBTMomentaryPush);
|
||||
WMSetWidgetBackgroundColor((WMWidget *)Button, color);
|
||||
WMSetButtonText (Button, "Files");
|
||||
WMSetButtonAction (Button, selectFiles, NULL);
|
||||
ButtonsetSize = WMGetViewSize(WMWidgetView(Button));
|
||||
WMMoveWidget(Button, MARGIN, MARGIN);
|
||||
|
||||
Button =WMCreateButton(controlframe,WBTMomentaryPush);
|
||||
WMSetWidgetBackgroundColor((WMWidget *)Button, color);
|
||||
WMSetButtonText (Button, "Quit");
|
||||
WMSetButtonAction (Button, closeAll, NULL);
|
||||
WMMoveWidget(Button,2*MARGIN+ButtonsetSize.width, MARGIN);
|
||||
ButtonsetSize.width = 3*MARGIN+2*ButtonsetSize.width;
|
||||
ButtonsetSize.height=2*MARGIN+ButtonsetSize.height;
|
||||
WMResizeWidget(controlframe,ButtonsetSize.width,ButtonsetSize.height);
|
||||
|
||||
WMMapSubwidgets(controlframe);
|
||||
resizeHandler(NULL,NULL);
|
||||
/* end of frame and buttons setup */
|
||||
|
||||
|
||||
WMMapSubwidgets(win);
|
||||
WMMapWidget(win);
|
||||
WMRealizeWidget(win);
|
||||
|
||||
WMScreenMainLoop(screen);
|
||||
|
||||
return 0;
|
||||
}
|
||||
17
WINGs_tutorial/FirstWindow.c
Normal file
@@ -0,0 +1,17 @@
|
||||
int main (int argc, char **argv){
|
||||
|
||||
Display *display;
|
||||
WMScreen *screen;
|
||||
WMWindow *win;
|
||||
|
||||
WMInitializeApplication("FirstWindow", &argc, argv);
|
||||
|
||||
display = XOpenDisplay("");
|
||||
screen = WMCreateScreen(display, DefaultScreen(display));
|
||||
win = WMCreateWindow(screen, "");
|
||||
|
||||
WMRealizeWidget(win);
|
||||
WMMapWidget(win);
|
||||
|
||||
WMScreenMainLoop(screen);
|
||||
}
|
||||
122
WINGs_tutorial/FourthWindow.c
Normal file
@@ -0,0 +1,122 @@
|
||||
#define MARGIN 14
|
||||
#define WINWIDTH 300
|
||||
#define WINHEIGHT 400
|
||||
|
||||
Display *display;
|
||||
WMScreen *screen;
|
||||
|
||||
WMButton *Button;
|
||||
WMWindow *win;
|
||||
WMSize ButtonsetSize;
|
||||
|
||||
WMBox *box;
|
||||
WMText *text;
|
||||
WMColor *color;
|
||||
|
||||
char textbuf[40];
|
||||
|
||||
void closeAll(WMWidget *self,void *data){
|
||||
WMDestroyWidget(self);
|
||||
fprintf(stderr,"I've been used!\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
static void selectFiles(void *self, void *data){
|
||||
WMOpenPanel *oPanel;
|
||||
oPanel = WMGetOpenPanel(screen);
|
||||
if (WMRunModalFilePanelForDirectory(oPanel, NULL, "/tmp",
|
||||
"Search..", NULL) == True){
|
||||
snprintf(textbuf,39,"%s\n-", WMGetFilePanelFileName(oPanel));
|
||||
WMFreezeText(text);
|
||||
WMAppendTextStream(text,textbuf);
|
||||
WMThawText(text);
|
||||
}
|
||||
return ;
|
||||
}
|
||||
|
||||
static void handleEvents(XEvent *event, void *data){
|
||||
WMWidget *widget = (WMWidget*)data;
|
||||
switch (event->type) {
|
||||
case ButtonPress:
|
||||
snprintf(textbuf,39,"Button down at (%i,%i) \n-",event->xbutton.x,event->xbutton.y);
|
||||
WMFreezeText(text);
|
||||
WMAppendTextStream(text,textbuf);
|
||||
WMThawText(text);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void resizeHandler(void *self, WMNotification *notif){
|
||||
WMSize size = WMGetViewSize(WMWidgetView(win));
|
||||
WMMoveWidget(box, size.width-ButtonsetSize.width, size.height-ButtonsetSize.height);
|
||||
WMResizeWidget(text, size.width-MARGIN -10, size.height-80);
|
||||
}
|
||||
|
||||
|
||||
int main (int argc, char **argv){
|
||||
|
||||
WMInitializeApplication("FourthWindow", &argc, argv);
|
||||
if (!(display = XOpenDisplay(""))){
|
||||
fprintf(stderr,"err: cannot open display");
|
||||
exit(-1);
|
||||
}
|
||||
screen = WMCreateScreen(display, DefaultScreen(display));
|
||||
|
||||
/* window */
|
||||
win = WMCreateWindow(screen, "");
|
||||
WMResizeWidget(win, WINWIDTH, WINHEIGHT);
|
||||
WMSetWindowCloseAction(win, closeAll, NULL);
|
||||
|
||||
color = WMCreateRGBColor(screen, 124<<9,206<<8,162<<8, False);
|
||||
WMSetWidgetBackgroundColor((WMWidget *)win, color);
|
||||
|
||||
WMCreateEventHandler(WMWidgetView(win), ButtonPressMask,handleEvents, win);
|
||||
WMSetViewNotifySizeChanges(WMWidgetView(win), True);
|
||||
WMAddNotificationObserver(resizeHandler, NULL, WMViewSizeDidChangeNotification, WMWidgetView(win));
|
||||
|
||||
/* Text area */
|
||||
|
||||
text = WMCreateText(win);
|
||||
WMResizeWidget(text, WINWIDTH-MARGIN, WINHEIGHT -80);
|
||||
WMMoveWidget(text, 10, 10);
|
||||
WMSetTextHasVerticalScroller(text, True);
|
||||
WMSetTextEditable(text, False);
|
||||
WMSetTextIgnoresNewline(text, False);
|
||||
|
||||
/* box with buttons */
|
||||
box=WMCreateBox(win);
|
||||
WMSetBoxBorderWidth(box, MARGIN);
|
||||
WMSetWidgetBackgroundColor((WMWidget *)box, color);
|
||||
WMSetBoxHorizontal(box, True);
|
||||
|
||||
|
||||
Button =WMCreateButton(box,WBTMomentaryPush);
|
||||
WMSetWidgetBackgroundColor((WMWidget *)Button, color);
|
||||
WMSetButtonText (Button, "Files");
|
||||
WMSetButtonAction (Button, selectFiles, NULL);
|
||||
WMMapWidget(Button);
|
||||
ButtonsetSize = WMGetViewSize(WMWidgetView(Button));
|
||||
|
||||
WMAddBoxSubview(box, WMWidgetView(Button), True, False, 60, 1000, MARGIN);
|
||||
|
||||
Button =WMCreateButton(box,WBTMomentaryPush);
|
||||
WMSetWidgetBackgroundColor((WMWidget *)Button, color);
|
||||
WMSetButtonText (Button, "Quit");
|
||||
WMSetButtonAction (Button, closeAll, NULL);
|
||||
WMMapWidget(Button);
|
||||
|
||||
WMAddBoxSubview(box, WMWidgetView(Button), True,False, 60, 1000, 0);
|
||||
WMResizeWidget(box, 4*MARGIN+2*ButtonsetSize.width,2*MARGIN+ButtonsetSize.height);
|
||||
ButtonsetSize =WMGetViewSize(WMWidgetView(box));
|
||||
resizeHandler(NULL,NULL);
|
||||
/* end of box and buttons setup */
|
||||
|
||||
WMMapWidget(win);
|
||||
|
||||
WMMapSubwidgets(win);
|
||||
WMRealizeWidget(win);
|
||||
|
||||
WMScreenMainLoop(screen);
|
||||
|
||||
return 0;
|
||||
}
|
||||
206
WINGs_tutorial/NinthWindow.c
Normal file
@@ -0,0 +1,206 @@
|
||||
#include "editmenu.h" /* This must be the MODIFIED .h file */
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <signal.h>
|
||||
#define WINWIDTH 300
|
||||
#define WINHEIGHT 400
|
||||
#define MENUWIDTH 85
|
||||
#define MENITEMHT 21
|
||||
#define LOGPROGRAM "xconsole"
|
||||
#define ERRMSGFIFO "/tmp/WINGsWindowfifo"
|
||||
#define FIFONAMELEN 20
|
||||
#define NOLOGWINDOW (-2) /* value when there is no console window */
|
||||
#define FIFOERROR (-1) /* value when there is a problem w/ console */
|
||||
#define FIFOLOWESTPOSS 0
|
||||
|
||||
|
||||
int windowCounter=0;
|
||||
int fifonr;
|
||||
int sibpid;
|
||||
char fifofilename[FIFONAMELEN+5];
|
||||
|
||||
struct dataStruct{
|
||||
WMWindow *window;
|
||||
WEditMenu *menu;
|
||||
} dataStruct;
|
||||
|
||||
|
||||
/* functions for the message window part: */
|
||||
|
||||
void redirectmsg(int sig){
|
||||
|
||||
// clean up after SIGCHLD, and set fifonr to flag it
|
||||
fifonr=NOLOGWINDOW;
|
||||
if (!access(fifofilename,F_OK|W_OK))
|
||||
unlink(fifofilename);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
int showMessageWindow(){
|
||||
|
||||
sprintf(fifofilename,"%s%i",ERRMSGFIFO,(unsigned short)getpid());
|
||||
|
||||
(void) signal(SIGCHLD,redirectmsg); // clean up if message console is killed
|
||||
|
||||
if(access(fifofilename,F_OK)==-1)
|
||||
fifonr=mknod(fifofilename,0640|O_EXCL|S_IFIFO,(dev_t)0);
|
||||
else {fifonr=FIFOERROR;
|
||||
wwarning("Fifo file already exists\n");
|
||||
}
|
||||
/* fifonr == FIFOERROR if mknod/mkfifo or access failed, mknod returns -1 on failure */
|
||||
|
||||
if(fifonr!=FIFOERROR){
|
||||
|
||||
sibpid=fork();
|
||||
if(sibpid==0){
|
||||
execlp(LOGPROGRAM , LOGPROGRAM, "-file",fifofilename,"-geometry","250x400", "-title","Window Messages",(char *)0);
|
||||
exit(1);
|
||||
}else
|
||||
fifonr=open(fifofilename,O_WRONLY);
|
||||
}
|
||||
return fifonr;
|
||||
}
|
||||
|
||||
/* general and menu handling functions */
|
||||
|
||||
void closeAll(WMWidget *self,void *data){
|
||||
|
||||
WMDestroyWidget(self);
|
||||
if(--windowCounter<1){
|
||||
if (fifonr>=FIFOLOWESTPOSS)
|
||||
kill(sibpid,SIGTERM);
|
||||
if (!access(fifofilename,F_OK|W_OK))
|
||||
unlink(fifofilename);
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void menuItemAction(void *self, void *data){
|
||||
|
||||
if (fifonr<FIFOLOWESTPOSS)fifonr=showMessageWindow(); // try again in case FIFOERROR
|
||||
if (fifonr==FIFOERROR) // give up and print to stderr
|
||||
fprintf(stderr,"%i: %s selected\n", getpid(), WGetEditMenuItemTitle(self));
|
||||
else{
|
||||
char textbuffer[100];
|
||||
snprintf(textbuffer,100, "%i: %s selected\n", getpid(), WGetEditMenuItemTitle(self));
|
||||
write(fifonr, textbuffer,strlen(textbuffer));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void menuItemCloseAction(void *self, void *data){
|
||||
|
||||
WMPostNotificationName("WMWindowClose", self, NULL);
|
||||
}
|
||||
|
||||
|
||||
void getMenu(WMWidget *self, void *data){
|
||||
|
||||
WMPoint position;
|
||||
struct dataStruct *tmp=(struct dataStruct *)data;
|
||||
|
||||
if(WMGetButtonSelected(self)){
|
||||
position=WMGetViewScreenPosition(WMWidgetView(tmp->window));
|
||||
WEditMenuShowAt(tmp->menu,(position.x>MENUWIDTH)?position.x-MENUWIDTH:0, position.y+MENITEMHT,tmp->window);
|
||||
}else{
|
||||
WEditMenuHide(tmp->menu);
|
||||
WDeselectItem(tmp->menu); // remove selection before next pop up
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void notificationHandler(void *self, WMNotification *notif){
|
||||
|
||||
if(!strcmp("WMWindowClose",WMGetNotificationName(notif)))
|
||||
closeAll(self,NULL);
|
||||
if(!strcmp(WMViewSizeDidChangeNotification,WMGetNotificationName(notif))){
|
||||
//resize actions
|
||||
WMSize size = WMGetViewSize(WMWidgetView(self));
|
||||
}
|
||||
}
|
||||
|
||||
/* main widget creating functions */
|
||||
|
||||
WMWindow * makeMainwindow(Display *display, WMScreen *screen){
|
||||
WMWindow *window;
|
||||
|
||||
window = WMCreateWindow(screen, "Menu");
|
||||
WMResizeWidget(window, WINWIDTH, WINHEIGHT);
|
||||
WMSetWindowCloseAction(window, closeAll, NULL);
|
||||
WMAddNotificationObserver(notificationHandler, window, "WMWindowClose", WMWidgetView(window));
|
||||
WMSetViewNotifySizeChanges(WMWidgetView(window), True);
|
||||
WMAddNotificationObserver(notificationHandler, window, WMViewSizeDidChangeNotification, WMWidgetView(window));
|
||||
WMAddNotificationObserver(notificationHandler, window, "WMWindowClose", NULL);
|
||||
WMRealizeWidget(window);
|
||||
return window;
|
||||
}
|
||||
|
||||
|
||||
WEditMenu * makeMenus(WMScreen *screen,WEditMenu *menu, WEditMenu *submenu){
|
||||
WEditMenuItem * menuitem;
|
||||
|
||||
submenu=WCreateEditMenu(screen,"Submenu");
|
||||
menuitem =WAddMenuItemWithTitle(submenu,"Submenu item");
|
||||
WSetEditMenuItemAction( menuitem, menuItemAction);
|
||||
menuitem =WAddMenuItemWithTitle(submenu,"2nd submenu item");
|
||||
WSetEditMenuItemAction( menuitem, menuItemAction);
|
||||
menuitem =WAddMenuItemWithTitle(submenu,"3d submenu item");
|
||||
WSetEditMenuItemAction( menuitem, menuItemAction);
|
||||
menu=WCreateEditMenu(screen,"Main menu");
|
||||
menuitem = WAddMenuItemWithTitle(menu,"1st main item");
|
||||
WSetEditMenuItemAction( menuitem, menuItemAction);
|
||||
menuitem = WAddMenuItemWithTitle(menu,"2nd main item");
|
||||
WSetEditMenuItemAction( menuitem, menuItemAction);
|
||||
menuitem = WAddMenuItemWithTitle(menu,"To submenu");
|
||||
WSetEditMenuSubmenu(menu, menuitem , submenu);
|
||||
menuitem = WAddMenuItemWithTitle(menu,"Quit");
|
||||
WSetEditMenuItemAction( menuitem, menuItemCloseAction);
|
||||
WMRealizeWidget(submenu);WMRealizeWidget(menu);
|
||||
return menu;
|
||||
}
|
||||
|
||||
|
||||
WMButton * makeButtonsTop( WMWidget *window, void *AppData){
|
||||
WMButton *Button;
|
||||
|
||||
Button =WMCreateButton(window,WBTPushOnPushOff);
|
||||
WMSetButtonText (Button, "Menu");
|
||||
WMSetButtonAction (Button, getMenu, AppData);
|
||||
WMMoveWidget(Button, 4,2);
|
||||
WMRealizeWidget(Button);
|
||||
return Button;
|
||||
}
|
||||
|
||||
|
||||
int main (int argc, char **argv){
|
||||
|
||||
Display *display;
|
||||
WMScreen *screen;
|
||||
WMWindow *mainwindow;
|
||||
WEditMenu *submenu, *menu;
|
||||
WEditMenuItem * menuitem;
|
||||
struct dataStruct Mainmenu;
|
||||
WMButton *menubutton;
|
||||
|
||||
fifonr=NOLOGWINDOW;
|
||||
|
||||
WMInitializeApplication("MenuWindow", &argc, argv);
|
||||
display = XOpenDisplay("");
|
||||
screen = WMCreateScreen(display, DefaultScreen(display));
|
||||
mainwindow= makeMainwindow(display, screen) ;
|
||||
|
||||
menu=makeMenus(screen,menu,submenu);
|
||||
|
||||
Mainmenu.window=mainwindow;
|
||||
Mainmenu.menu=menu;
|
||||
menubutton=makeButtonsTop(mainwindow, &Mainmenu);
|
||||
|
||||
WMMapSubwidgets(mainwindow);
|
||||
WMMapWidget(mainwindow);
|
||||
|
||||
WMScreenMainLoop(screen);
|
||||
return 0;
|
||||
}
|
||||
34
WINGs_tutorial/SecondWindow.c
Normal file
@@ -0,0 +1,34 @@
|
||||
void closeAll(WMWidget *self,void *data){
|
||||
fprintf(stderr,"I've been used!\n");
|
||||
WMDestroyWidget(self);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
int main (int argc, char **argv){
|
||||
|
||||
Display *display;
|
||||
WMScreen *screen;
|
||||
|
||||
WMWindow *win;
|
||||
WMColor *color;
|
||||
|
||||
WMInitializeApplication("SecondWin", &argc, argv);
|
||||
|
||||
if (!(display = XOpenDisplay(""))){
|
||||
fprintf(stderr, "cannot open display\n");
|
||||
exit(1);
|
||||
}
|
||||
screen = WMCreateScreen(display, DefaultScreen(display));
|
||||
|
||||
win = WMCreateWindow(screen, "");
|
||||
WMSetWindowCloseAction(win, closeAll, NULL);
|
||||
color = WMCreateRGBColor(screen,124<<9,206<<8,162<<8, False);
|
||||
WMSetWidgetBackgroundColor((WMWidget *)win, color);
|
||||
|
||||
WMMapWidget(win);
|
||||
WMRealizeWidget(win);
|
||||
|
||||
WMScreenMainLoop(screen);
|
||||
|
||||
return 0;
|
||||
}
|
||||
100
WINGs_tutorial/SeventhWindow.c
Normal file
@@ -0,0 +1,100 @@
|
||||
#include <WINGs/WINGs.h>
|
||||
#include <WINGs/WINGsP.h>
|
||||
|
||||
#define HOFF 40
|
||||
#define VOFF 160
|
||||
#define WINWIDTH 180
|
||||
#define WINHEIGHT 300
|
||||
|
||||
Display *display;
|
||||
WMScreen *screen;
|
||||
WMPixmap* pixmap;
|
||||
|
||||
struct _pict{
|
||||
Drawable dwin;
|
||||
XSegment segments[40];
|
||||
int seglen;
|
||||
} pic;
|
||||
|
||||
GC gc, g3;
|
||||
|
||||
void closeAction(WMWidget *self,void *data){
|
||||
WMDestroyWidget(self);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void drawProcedure(XEvent *event, void *data){
|
||||
|
||||
WMDrawPixmap(pixmap, ((struct _pict*)data)->dwin,HOFF,30);
|
||||
XDrawRectangle(display,((struct _pict*)data)->dwin,g3, HOFF,VOFF,100,100);
|
||||
XFillRectangle(screen->display, ((struct _pict*)data)->dwin , WMColorGC(screen->white), HOFF, VOFF, 100, 100);
|
||||
XDrawSegments(display, ((struct _pict*)data)->dwin, WMColorGC(screen->black), ((struct _pict*)data)->segments, ((struct _pict*)data)->seglen);
|
||||
XFlush(display);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
int main (int argc, char **argv){
|
||||
int i,j;
|
||||
WMColor *color;
|
||||
WMWindow * win;
|
||||
RImage *image;
|
||||
struct _pict pict;
|
||||
Drawable de;
|
||||
|
||||
RColor one, two={0xaf, 0x0f,0xff,0x33};
|
||||
one.red=247;
|
||||
one.green=251;
|
||||
one.blue=107;
|
||||
one.alpha=0xff;
|
||||
|
||||
|
||||
WMInitializeApplication("DrawWin", &argc, argv);
|
||||
display = XOpenDisplay("");
|
||||
screen = WMCreateScreen(display, DefaultScreen(display));
|
||||
win = WMCreateWindow(screen, "");
|
||||
WMResizeWidget(win, WINWIDTH, WINHEIGHT);
|
||||
WMSetWindowCloseAction(win, closeAction, NULL);
|
||||
WMSetWindowTitle(win,"Graphics");
|
||||
color = WMCreateRGBColor(screen,124<<9,206<<8,162<<8, False);
|
||||
WMSetWidgetBackgroundColor((WMWidget *)win, color);
|
||||
/* end setup main window */
|
||||
|
||||
image=RCreateImage( 100,100,0.5);
|
||||
RFillImage(image, &two);
|
||||
RDrawLine(image, 50,10,90,90,&one);
|
||||
RDrawLine(image, 10,90,50,10,&one);
|
||||
RDrawLine(image, 10,90,90,90,&one);
|
||||
|
||||
g3=WMColorGC(screen->gray);
|
||||
XSetLineAttributes(display,g3,3,LineSolid,CapButt,JoinMiter);
|
||||
|
||||
pict.segments[1].x1= pict.segments[0].x1=HOFF;
|
||||
pict.segments[0].x2=HOFF;
|
||||
pict.segments[0].y1=VOFF;
|
||||
pict.segments[1].y2= pict.segments[0].y2=VOFF;
|
||||
pict.segments[1].x2= HOFF+10;
|
||||
pict.segments[1].y1=VOFF+10;
|
||||
pict.seglen=2;
|
||||
for (i=9;i>0;i--){
|
||||
j=2*(10-i);
|
||||
pict.segments[j+1].x1= pict.segments[j].x1=HOFF;
|
||||
pict.segments[j+1].y2= pict.segments[j].y2=VOFF;
|
||||
pict.segments[j].x2= i+pict.segments[j-1].x2;
|
||||
pict.segments[j].y1=i+pict.segments[j-1].y1;
|
||||
pict.segments[j+1].x2= i+pict.segments[j].x2;
|
||||
pict.segments[j+1].y1=i+pict.segments[j].y1;
|
||||
pict.seglen+=2;
|
||||
};
|
||||
|
||||
|
||||
WMRealizeWidget(win);
|
||||
|
||||
pict.dwin=W_VIEW_DRAWABLE(WMWidgetView(win));
|
||||
pixmap=WMCreatePixmapFromRImage(screen, image,1);
|
||||
|
||||
WMCreateEventHandler(WMWidgetView(win), ExposureMask,drawProcedure,&pict);
|
||||
|
||||
WMMapWidget(win);
|
||||
WMScreenMainLoop(screen);
|
||||
}
|
||||
58
WINGs_tutorial/SixthWindow.c
Normal file
@@ -0,0 +1,58 @@
|
||||
#include <WINGs/WINGs.h>
|
||||
#include <WINGs/WINGsP.h>
|
||||
|
||||
#define WINWIDTH 200
|
||||
#define WINHEIGHT 300
|
||||
|
||||
Display *display;
|
||||
WMScreen *screen;
|
||||
WMPixmap* pixmap;
|
||||
|
||||
void closeAction(WMWidget *self,void *data){
|
||||
WMDestroyWidget(self);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void drawProcedure(XEvent *event, void *data){
|
||||
WMDrawPixmap(pixmap, W_VIEW_DRAWABLE(WMWidgetView(data)),30,30);XFlush(display);
|
||||
}
|
||||
|
||||
|
||||
int main (int argc, char **argv){
|
||||
WMColor *color;
|
||||
WMWindow * win;
|
||||
RImage *image;
|
||||
|
||||
RColor one, two={0xaf, 0x0f,0xff,0x33};
|
||||
one.red=0x20;
|
||||
one.green=0x20;
|
||||
one.blue=0x20;
|
||||
one.alpha=0xff;
|
||||
|
||||
|
||||
WMInitializeApplication("DrawWin", &argc, argv);
|
||||
display = XOpenDisplay("");
|
||||
screen = WMCreateScreen(display, DefaultScreen(display));
|
||||
win = WMCreateWindow(screen, "");
|
||||
WMResizeWidget(win, WINWIDTH, WINHEIGHT);
|
||||
WMSetWindowCloseAction(win, closeAction, NULL);
|
||||
WMSetWindowTitle(win,"Graphics");
|
||||
color = WMCreateRGBColor(screen,124<<9,206<<8,162<<8, False);
|
||||
WMSetWidgetBackgroundColor((WMWidget *)win, color);
|
||||
/* end setup main window */
|
||||
|
||||
|
||||
image=RCreateImage( 100,100,.8);
|
||||
RFillImage(image, &two);
|
||||
RDrawLine(image, 50,10,90,90,&one);
|
||||
RDrawLine(image, 10,90,50,10,&one);
|
||||
RDrawLine(image, 10,90,90,90,&one);
|
||||
|
||||
WMRealizeWidget(win);
|
||||
|
||||
pixmap=WMCreatePixmapFromRImage(screen, image,1);
|
||||
WMCreateEventHandler(WMWidgetView(win), ExposureMask,drawProcedure,win);
|
||||
|
||||
WMMapWidget(win);
|
||||
WMScreenMainLoop(screen);
|
||||
}
|
||||
46
WINGs_tutorial/ThirdWindow.c
Normal file
@@ -0,0 +1,46 @@
|
||||
void closeAll(WMWidget *self,void *data){
|
||||
fprintf(stderr, "I've been used!\n");
|
||||
WMDestroyWidget(self);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
static void
|
||||
handleEvents(XEvent *event, void *data)
|
||||
{
|
||||
WMWidget *widget = (WMWidget*)data;
|
||||
switch (event->type) {
|
||||
case ButtonPress:
|
||||
closeAll(widget,NULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int main (int argc, char **argv){
|
||||
|
||||
Display *display;
|
||||
WMScreen *screen;
|
||||
|
||||
WMWindow *win;
|
||||
WMColor *color;
|
||||
|
||||
WMInitializeApplication("ThirdWindow", &argc, argv);
|
||||
|
||||
if (!(display = XOpenDisplay(""))){
|
||||
fprintf(stderr,"error: cannot open display\n");
|
||||
exit(1);
|
||||
}
|
||||
screen = WMCreateScreen(display, DefaultScreen(display));
|
||||
|
||||
win = WMCreateWindow(screen, "");
|
||||
WMSetWindowCloseAction(win, closeAll, NULL);
|
||||
WMCreateEventHandler(WMWidgetView(win), ButtonPressMask,handleEvents, win);
|
||||
color = WMCreateRGBColor(screen, 124<<9,206<<8,162<<8, False);
|
||||
WMSetWidgetBackgroundColor((WMWidget *)win, color);
|
||||
|
||||
WMMapWidget(win);
|
||||
WMRealizeWidget(win);
|
||||
|
||||
WMScreenMainLoop(screen);
|
||||
|
||||
return 0;
|
||||
}
|
||||
119
WINGs_tutorial/WINGGraphics.html
Normal file
@@ -0,0 +1,119 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- saved from url=(0077)WINGGraphics.html -->
|
||||
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>3 Steps to Make a WINGs User Interface</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="keywords" content="WINGs, tutorial,X11, Xlib,graphics, GUI, Window Maker, OpenGL, Mesa">
|
||||
<meta name="description" content="WINGs library tutorial">
|
||||
<meta name="license" content="GNU Free Documentation License">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table align="JUSTIFY" width="100%"><tbody><tr><td align="LEFT"><a href="WINGsRemark.html">LAST: Programming Details 1</a></td><td align="CENTER"><a href="WINGtoc.html">Contents</a></td><td align="RIGHT"><a href="WINGMenu.html">NEXT: Programming Details 3</a></td></tr></tbody></table>
|
||||
|
||||
<h4>Drawing procedures</h4>
|
||||
|
||||
<h5>The drawable</h5>
|
||||
<p>The WINGs library has functions to directly draw an image in a label, button or slider. To write to other widgets, there is a function <code>WMDrawPixmap (WMPixmap *pixmap, Drawable d, int x, int y)</code>. The pixmap can be written to any XLib variable of type <code>Drawable</code>, at position (x,y). This section shows how it is done to a window. The drawable is retrieved from the widget's view structure by the macro <code>W_VIEW_DRAWABLE(WMView)</code>. You <em>only</em> call this macro <em>after</em> the widget has been <code>WMRealizeWidget</code>ed, or there simply will not be a drawable in it. To use it,<code>#include <WINGs/WINGsP.h></code>.
|
||||
</p><p>Images can be created from within the code itself. The WINGs/wraster library creates a structure for it, by the call <code>RCreateImage</code>, and there <a href="WINGLib.html#DrawFunctions">are</a> a few functions to draw a line or segments in it. You would only use this if you like to store the image in memory for some reason. These functions use a colour structure <code>RColor</code>. There is a conversion function from a <code>WMColor</code>, but the RColor is a simple structure with four unsigned long members which are the RGB and alpha values. This <a href="SixthWindow.c">example</a> shows how a picture is drawn directly into a window, by the defined function <code>drawProcedure</code>. This function is called by associating <code>Expose</code> events to it, by using <code>WMCreateEventHandler</code> on the window's view:
|
||||
</p><pre><code>
|
||||
void drawProcedure(XEvent *event, void *data){
|
||||
WMDrawPixmap(pixmap, W_VIEW_DRAWABLE(WMWidgetView(data)),30,30);XFlush(display);
|
||||
}
|
||||
int main (){
|
||||
/* code */
|
||||
WMCreateEventHandler(WMWidgetView(win), ExposureMask,drawProcedure,win);
|
||||
/* */ }</code></pre>
|
||||
<p>
|
||||
Try to comment out the line with the event handler function, and to call <code>WMDrawPixmap(pixmap, W_VIEW_DRAWABLE<wbr>(WMWidgetView(win)),30,30)</code> directly from main. It won't work. When the <code>WMScreenMainLoop</code> starts up, there will be an Expose event. The window will react to the event by drawing itself, as specified in the WINGslib routines, but there won't be another call to WMDrawPixmap, unless you programme it yourself.
|
||||
|
||||
</p><h5>Xlib graphics functions</h5>
|
||||
<p><img src="./WINGGraphics_files/seventh2.jpeg" align="right" width="150">The Xlib library itself offers more possibilities to draw in a widget, like drawing curves. The Xlib functions write to the drawable, like WMDrawPixmap. Xlib functions need the Xlib <code>GC</code> type <a href="WINGsRemark.html#talkGraphicsContext">graphics contexts</a>. You keep different graphics contexts at a time to switch drawing styles. The WMColorGC macro creates one from a WMColor structure, which will give you the color you used as an argument. In the example, the line width in this graphics context is set to 3 instead of one with the function <code>XSetLineAttributes</code>. You'll get this line width whenever you use <code>XMColorGC(screen->gray)</code> from that point on. The next lines are drawn with default line width. The example is <a href="SeventhWindow.c">here</a>.
|
||||
|
||||
</p><p>Useful Xlib functions and structures are
|
||||
</p><ul>
|
||||
<li><code> int XDrawRectangle(Display *display, Drawable d, GC gc,
|
||||
int x, int y, unsigned int width, unsigned int
|
||||
height)</code></li><li><code>
|
||||
int XDrawLines(Display *display, Drawable d, GC gc, XPoint
|
||||
*points, int npoints, int mode)</code></li><li><code>
|
||||
|
||||
int XDrawSegments(Display *display, Drawable d, GC gc,
|
||||
XSegment *segments, int nsegments)</code></li><li><code>
|
||||
|
||||
int XDrawArc(Display *display, Drawable d, GC gc, int x,
|
||||
int y, unsigned int width, unsigned int height, int
|
||||
angle1, int angle2)</code></li><li><code>
|
||||
int XDrawArcs(Display *display, Drawable d, GC gc, XArc
|
||||
*arcs, int narcs)</code></li><li><code>
|
||||
int XDrawPoint(Display *display, Drawable d, GC gc, int x,
|
||||
int y)</code></li><li><code>
|
||||
|
||||
int XDrawPoints(Display *display, Drawable d, GC gc,
|
||||
XPoint *points, int npoints, int mode)</code></li><li><code>
|
||||
|
||||
GC XCreateGC(Display *display, Drawable d, unsigned long
|
||||
valuemask, XGCValues *values)</code></li><li><code>
|
||||
int XFillArc(Display *display, Drawable d, GC gc, int x,
|
||||
int y, unsigned int width, unsigned int height, int
|
||||
angle1, int angle2)</code></li><li><code>
|
||||
int XFillPolygon(Display *display, Drawable d, GC gc,
|
||||
XPoint *points, int npoints, int shape, int mode)</code></li><li><code>
|
||||
|
||||
|
||||
typedef struct {
|
||||
short x1, y1, x2, y2;
|
||||
} XSegment</code></li><li><code>
|
||||
|
||||
typedef struct {
|
||||
short x, y;
|
||||
} XPoint</code></li><li><code>
|
||||
|
||||
|
||||
typedef struct {
|
||||
short x, y;
|
||||
unsigned short width, height;
|
||||
short angle1, angle2; /* Degrees * 64 */
|
||||
} XArc</code>
|
||||
</li></ul>
|
||||
<p>The XFree XLib man pages are <a href="http://www.xfree86.org/current/manindex3.html">here</a> in 2010.
|
||||
|
||||
|
||||
</p><h5><a name="talkOpenGL">An OpenGL drawing area</a></h5>
|
||||
<p><img src="./WINGGraphics_files/glframe.jpeg" align="right" width="20%">Just like the Xlib functions, we can use a drawable for drawing 3 dimensional images with the <a href="http://www.opengl.org/">OpenGL</a>/<a href="http://www.mesa3d.org/">Mesa GL</a> libraries. This section will show how to use a WINGs frame for this. The application shall have a GL-window and one button which allows the user to turn the object in the frame.
|
||||
</p><p>We realize a widget "glframe" of type WMFrame as usual, and get the drawable (win of type Window) out of its view with
|
||||
</p><pre><code>win =W_VIEW_DRAWABLE(WMWidgetView(glframe));</code></pre>
|
||||
To set up the variables needed to use the MesaGL library, we use the glX library. We shall also change some properties of the X-window <code>win</code>. We can retrieve the necessary information for both by way of an RContext, but what we need is so simple, that we shall use Xlib functions to get it directly.
|
||||
<pre><code>Window win;
|
||||
XVisualInfo *xvVisualInfo;
|
||||
Colormap usColorMap;
|
||||
XSetWindowAttributes winAttr;
|
||||
GLXContext glXContext;
|
||||
int Attributes[] = { GLX_RGBA,
|
||||
GLX_RED_SIZE, 8,
|
||||
GLX_GREEN_SIZE, 8,
|
||||
GLX_BLUE_SIZE, 8,
|
||||
GLX_DEPTH_SIZE, 16,
|
||||
GLX_DOUBLEBUFFER,
|
||||
None};
|
||||
xvVisualInfo = glXChooseVisual(display, DefaultScreen(display), Attributes);
|
||||
cmColorMap = XCreateColormap(display,RootWindow(display, DefaultScreen(display)), usVisualInfo->visual, AllocNone);
|
||||
winAttr.colormap = usColorMap;
|
||||
winAttr.border_pixel = 0;
|
||||
winAttr.background_pixel = 0;
|
||||
winAttr.event_mask = ExposureMask | ButtonPressMask |StructureNotifyMask| KeyPressMask;
|
||||
|
||||
XChangeWindowAttributes(display,win,CWBorderPixel | CWColormap | CWEventMask,&winAttr);
|
||||
glXContext = glXCreateContext(display, xvVisualInfo, None, True);
|
||||
glXMakeCurrent(display, win, glXContext);</code></pre>
|
||||
<p>The first thing to get, is an X XVisualInfo structure for the colour properties we need (8 bits for a colour) and depth size. The glX library has the <br><code>glXChooseVisual(Display *display, int screen, int * attributes) </code><br> function for that. We use these data to create a colormap,with the Xlib function <br><code>XCreateColormap(Display *display, Window win, Visual *visual, int alloc)</code>.<br> We then make an Xlib structure <code>XSetWindowAttributes</code>, to which we add the colormap as a member .colormap, and to which we set a member .event_mask by <code>OR</code>ing the necessary masks. This structure, finally, can be used to set the window's properties with <br><code>int XChangeWindowAttributes(Display *display, Window win, unsigned long valuemask, XSetWindowAttributes *attributes)</code>.<br> Having done this, we collect the "environment variables" for OpenGL with the glX function <br><code>GLXContext glXCreateContext( Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct )</code>.<br> Finally we select the glframe's drawable <code>win</code> as the window OpenGl shall write to, by <br> <code>Bool glXMakeCurrent( Display *display, GLXDrawable win, GLXContext ctx )</code>.<br> The frame's window <code>Window win</code> can now be used in the GL-call <code>void glXSwapBuffers( Display *display, GLXDrawable win )</code>.
|
||||
</p><p> The source code is in the file <a href="glframe.c">glframe.c</a>. You need to have MesaGL installed, and the glx library. To compile, use <kbd>gcc -x c glframe.c -lXft -L/usr/X11/lib -L/usr/lib -lWINGs -lwraster -lOSMesa -lm -o glframe</kbd>. If the compiler does not find the glx library, you could add <kbd> -L/usr/X11/lib/modules/extensions -lglx</kbd>, if that is where your library is.
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
</p><p>
|
||||
</p><table align="JUSTIFY" width="100%"><tbody><tr><td align="LEFT"><a href="WINGsRemark.html">LAST: Programming Details 1</a></td><td align="CENTER"><a href="WINGtoc.html">Contents</a></td><td align="RIGHT"><a href="WINGMenu.html">NEXT: Programming Details 3</a></td></tr></tbody></table>
|
||||
|
||||
|
||||
</body><style type="text/css">embed[type*="application/x-shockwave-flash"],embed[src*=".swf"],object[type*="application/x-shockwave-flash"],object[codetype*="application/x-shockwave-flash"],object[src*=".swf"],object[codebase*="swflash.cab"],object[classid*="D27CDB6E-AE6D-11cf-96B8-444553540000"],object[classid*="d27cdb6e-ae6d-11cf-96b8-444553540000"],object[classid*="D27CDB6E-AE6D-11cf-96B8-444553540000"]{ display: none !important;}</style></html>
|
||||
BIN
WINGs_tutorial/WINGGraphics_files/glframe.jpeg
Normal file
|
After Width: | Height: | Size: 8.8 KiB |
BIN
WINGs_tutorial/WINGGraphics_files/seventh2.jpeg
Normal file
|
After Width: | Height: | Size: 11 KiB |
1188
WINGs_tutorial/WINGLib.html
Normal file
BIN
WINGs_tutorial/WINGLib_files/2tabs.jpeg
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
BIN
WINGs_tutorial/WINGLib_files/AlertPanel.jpeg
Normal file
|
After Width: | Height: | Size: 9.6 KiB |
BIN
WINGs_tutorial/WINGLib_files/Buttons.jpeg
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
BIN
WINGs_tutorial/WINGLib_files/ColorPanel.jpeg
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
WINGs_tutorial/WINGLib_files/FontPanel.jpeg
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
WINGs_tutorial/WINGLib_files/InputDialog.jpeg
Normal file
|
After Width: | Height: | Size: 8.6 KiB |
BIN
WINGs_tutorial/WINGLib_files/Labels.jpeg
Normal file
|
After Width: | Height: | Size: 7.1 KiB |
BIN
WINGs_tutorial/WINGLib_files/List.jpeg
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
WINGs_tutorial/WINGLib_files/OpenFileDialog.jpeg
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
WINGs_tutorial/WINGLib_files/Progress.jpeg
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
WINGs_tutorial/WINGLib_files/PullDown.jpeg
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
BIN
WINGs_tutorial/WINGLib_files/Slider.jpeg
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
WINGs_tutorial/WINGLib_files/TabView.jpeg
Normal file
|
After Width: | Height: | Size: 9.8 KiB |
BIN
WINGs_tutorial/WINGLib_files/TextField.jpeg
Normal file
|
After Width: | Height: | Size: 7.6 KiB |
BIN
WINGs_tutorial/WINGLib_files/scrollview.jpeg
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
WINGs_tutorial/WINGLib_files/textarea.jpeg
Normal file
|
After Width: | Height: | Size: 72 KiB |
82
WINGs_tutorial/WINGMenu.html
Normal file
@@ -0,0 +1,82 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- saved from url=(0073)WINGMenu.html -->
|
||||
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>3 Steps to Make a WINGs User Interface</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="keywords" content="WINGs, tutorial,X11, Xlib,graphics, GUI, hack, Linux">
|
||||
<meta name="description" content="WINGs library tutorial">
|
||||
<meta name="license" content="GNU Free Documentation License">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table align="JUSTIFY" width="100%"><tbody><tr><td align="LEFT"><a href="WINGGraphics.html">LAST: Programming Details 2</a></td><td align="CENTER"><a href="WINGtoc.html">Contents</a></td><td align="RIGHT"><a href="WINGLib.html">NEXT: Library description</a></td></tr></tbody></table>
|
||||
|
||||
<h4>Change a widget: a cascading menu</h4>
|
||||
<p>The WINGs library offers functions to set up a structure for a menu with submenus. However, the mapping of the menu itself is left to the Window Maker window manager. Without Window Maker, a menu which has been programmed this way, will not show. The easy way around this, is to use the source code for the editable menu in the WPrefs application, change it to give it the usual menu functionality, and compile this modified source code with the application's code. The two files you need to do this, are in the Window Maker's 0.92 source code directory WPrefs.app. Copy WPrefs.app/editmenu.c and WPrefs.app/editmenu.h to your current directory. A couple of little changes to editmenu.c will be sufficient to give adequate menu/submenu functionality.
|
||||
</p><p>Change the editable menu widget <code>struct W_EditMenuItem</code>. The EditMenuItem structure is the structure which is used to programme the editable menu in the Window Maker Preferences utility. To use it as a regular menu, it needs a pointer to the function which you want to execute when you click the item. Any WINGs widget structure needs to keep <code>W_Class widgetClass</code> and <code>WMView *view</code> as its first two declarations. Insert the line <code>WMAction * callback;</code> somewhere after them. The widget declaration will now be:
|
||||
</p><pre><code>
|
||||
typedef struct W_EditMenuItem {
|
||||
W_Class widgetClass;
|
||||
WMView *view;
|
||||
|
||||
struct W_EditMenu *parent;
|
||||
char *label;
|
||||
WMPixmap *pixmap;
|
||||
void *data;
|
||||
WMCallback *destroyData;
|
||||
WMAction * callback;
|
||||
struct W_EditMenu *submenu;
|
||||
struct {
|
||||
unsigned isTitle:1;
|
||||
unsigned isHighlighted:1;
|
||||
} flags;
|
||||
} EditMenuItem;</code></pre>
|
||||
For convenience, add this function to editmenu.c, too:
|
||||
<pre><code>void WSetEditMenuItemAction(WEditMenuItem *item, WMAction *callback)
|
||||
{
|
||||
item->callback= callback;
|
||||
}</code></pre>
|
||||
|
||||
<p><a name="overrideMenu"><img src="./WINGMenu_files/menu.jpeg" align="right"></a>We shall make a window with one button which will make the menu pop up. The code to create the menu is as follows. Have editmenu.c and editmenu.h in the same directory as the window application code, insert <code>#include "editmenu.h"</code> somewhere at the top.
|
||||
</p><pre><code>
|
||||
WEditMenu *submenu, *menu;
|
||||
WEditMenuItem * menuitem;
|
||||
|
||||
submenu=WCreateEditMenu(screen,"Submenu");
|
||||
menuitem =WAddMenuItemWithTitle(submenu,"Submenu item");
|
||||
menu=WCreateEditMenu(screen,"Main menu");
|
||||
menuitem = WAddMenuItemWithTitle(menu,"To submenu");
|
||||
WSetEditMenuSubmenu(menu, menuitem , submenu);
|
||||
menuitem = WAddMenuItemWithTitle(menu,"Main item");
|
||||
WMRealizeWidget(submenu);
|
||||
WMRealizeWidget(menu);</code></pre>
|
||||
The function to map the window w's menu at point (x,y) is <code>WEditMenuShowAt(menu,x,y,w)</code>. However, it will not show anything unless it is used after the intial window has been mapped. To do this, we use <code>WMSetButtonAction</code> on a button, and make the WMAction map the menu. We pass it pointers to both the menu and the window, so that we can map the menu in the window's neighbourhood. The WMAction will look like :
|
||||
<pre><code>void getMenu(WMWidget *self, void *data){
|
||||
WMPoint position;
|
||||
struct datacouple *tmp=(struct datacouple *)data;
|
||||
if(WMGetButtonSelected(self)){
|
||||
position=WMGetViewScreenPosition(WMWidgetView(tmp->window));
|
||||
WEditMenuShowAt(tmp->menu,(position.x>MENUWIDTH)?position.x-MENUWIDTH:0,\
|
||||
position.y+MENITEMHT,tmp->window);
|
||||
}else
|
||||
WEditMenuHide(tmp->menu);
|
||||
}</code></pre> The used structure is <code>struct datacouple{WMWindow *window; WEditMenu *menu;} datacouple;
|
||||
</code>. Realize the window before the others. The code with details is <a href="EighthWindow.c">here</a>. To compile it, you now type <kbd>cc -x c EighthWindow.c editmenu.c -lXft -L/usr/X11/lib -L/usr/lib -lWINGs -lwraster -o EighthWindow</kbd>. editmenu.c is, of course, the modified source file.
|
||||
<p>To use the callback functions, we need to execute them somewhere. To do this, search the <code>static void selectItem</code> function in the editmenu.c source. After its last line, <a name="talkInsertCallback">insert</a> the line: <code>if (menu->selectedItem->callback) menu->selectedItem->callback(menu->selectedItem,NULL);</code>. Define the callback before main as, eg.:
|
||||
</p><pre><code>void menuItemAction(void *self, void *data){
|
||||
fprintf(stderr, "Selected\n");}</code></pre>
|
||||
and add it to the menu items in the <code>main</code> code with the <code> WSetEditMenuItemAction( menuitem, menuItemAction);</code>. There is also a little addition to the getMenu function, to reset the menu when we hide it.
|
||||
|
||||
<p>The function <code>WCreateEditMenuItem</code> in editmenu.c associates to ButtonPress events on the menu item widget, the function <code>handleItemClick</code>. This event handler function calls the function <code>selectItem</code> when it gets this event, and does a few other things we shall not need any more. The selectItem function goes through a few things. If the clicked menu item is a submenu entry, it checks its location and maps the submenu. At the end of this function we have <a href="WINGMenu.html#talkInsertCallback">inserted</a> the line which calls our callback function in case the pointer to it is not <code>NULL</code>. If the menu has to appear, legacy-style, below a fixed bar in the window's top, we would just need to calculate this position, and also need to hide the menu whenever we drag the window itself. For a free floating menu, the latter is not very important.
|
||||
</p><p>The application source code is <a href="NinthWindow.c">here</a>. The editmenu.c code with the first few changes in it, is <a href="editmenu.c">here</a>. The changes are marked by a comment starting with <code>/* MOD </code>. There is one change in the new <a href="editmenu.h">editmenu.h</a> file.
|
||||
</p><h5>Window manager hints</h5>
|
||||
<p></p><table align="left" width="20%" clear="right"><tbody><tr><td><img src="./WINGMenu_files/redirectmenu1.jpeg" align="left" width="100%"></td></tr><tr><td><img src="./WINGMenu_files/redirectmenu2.jpeg" align="left" width="100%"></td></tr></tbody></table>As the menu does not have the functions of an ordinary application window, we would not want it to have the same window frame. The buttons in the titlebar may be omitted, or limited. This can be done by the window manager, on data obtained from the X server.The X server, in its turn, gets them from the application. The XLib function <code> XSetTransientForHint</code> will, in xfce4, make the menu widget look like the one in the image shown on the left. The window manager gives it a title bar and button. It also allows to drag the menu. The code must provide functions to handle the event that the close button on the title bar is clicked, or the menu window will have the same problem as our <a href="WINGStep1.html#talkMissing">first window</a>. The window manager can also be bypassed. To do this, there is the Xlib function <code> int XChangeWindowAttributes<wbr>(Display *display, Window w,
|
||||
unsigned long valuemask, XSetWindowAttributes
|
||||
*attributes)</code>. As shown in the example code, it can be used to set the window attribute <code>override_redirect</code>. This will block window manager interference with the placement of windows. The menu window will now in all window managers look like the one in the <a href="WINGMenu.html#overrideMenu">first image</a> at the top of this page.
|
||||
<p align="left"><br><br>
|
||||
<br>
|
||||
</p><p>
|
||||
</p><table align="JUSTIFY" width="100%"><tbody><tr><td align="LEFT"><a href="WINGGraphics.html">LAST: Programming Details 2</a></td><td align="CENTER"><a href="WINGtoc.html">Contents</a></td><td align="RIGHT"><a href="WINGLib.html">NEXT: Library description</a></td></tr></tbody></table>
|
||||
|
||||
|
||||
</body><style type="text/css">embed[type*="application/x-shockwave-flash"],embed[src*=".swf"],object[type*="application/x-shockwave-flash"],object[codetype*="application/x-shockwave-flash"],object[src*=".swf"],object[codebase*="swflash.cab"],object[classid*="D27CDB6E-AE6D-11cf-96B8-444553540000"],object[classid*="d27cdb6e-ae6d-11cf-96b8-444553540000"],object[classid*="D27CDB6E-AE6D-11cf-96B8-444553540000"]{ display: none !important;}</style></html>
|
||||
BIN
WINGs_tutorial/WINGMenu_files/menu.jpeg
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
WINGs_tutorial/WINGMenu_files/redirectmenu1.jpeg
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
WINGs_tutorial/WINGMenu_files/redirectmenu2.jpeg
Normal file
|
After Width: | Height: | Size: 14 KiB |
42
WINGs_tutorial/WINGsIntro.html
Normal file
@@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- saved from url=(0074)WINGsIntro.html -->
|
||||
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>3 Steps to Make a WINGs User Interface</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="keywords" content="WINGs, tutorial, Introduction, C, programming, GUI, Window Maker, Linux">
|
||||
<meta name="description" content="WINGs library tutorial">
|
||||
<meta name="license" content="GNU Free Documentation License">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table align="JUSITFY" width="100%"><tbody><tr><td align="LEFT"><a href="WINGtoc.html">LAST: Contents</a></td><td align="RIGHT"><a href="WINGStep1.html">NEXT: Step 1 Drawing a Window</a></td></tr></tbody></table>
|
||||
|
||||
<h3>Make a WINGs based Graphical User Interface in 3 Steps</h3>
|
||||
|
||||
The WINGs library is the library with routines for a graphical user interface which comes with the Window Maker window manager. In 2010 the library's web page is <a href="http://windowmaker.org/development.php?show=wings">here</a> on the windowmaker.org website. You can download windowmaker with the WINGs libraries <a href="http://windowmaker.org/index.php">here</a>. The library provides widgets which you can use to make a graphical user interface. A widget is a software module which is used to interact with the user. Buttons and menus are widgets. The WINGs library offers the possibility to programme these widgets in a few lines of C code, so that you can dedicate the rest of your time to the functionality in your application.
|
||||
|
||||
<p>This tutorial shows in three simple steps how to write a graphical user interface with WINGs. Those three steps will cover all that is needed to write the major dialogs and widgets needed for communication between application and user. It assumes that you know how to programme in C, but you do not need to know anything about GUI-programming.
|
||||
|
||||
</p><p> Step 1 in this tutorial will show the framework for an application which uses a WINGS graphical user interface. It shows how you have the WINGs library create a widget for you, and how you set its properties. Step 2 briefly explains what events are, and how you make your application react to incoming events. This is what makes your interface work. Step 3 shows how to insert two buttons and a text area into the application's window, and how to implement the handling of events for them. Along the explanations in the main text, there are a few examples of source code. Most WINGs function names speak for themselves, and therefore, not everything in the source code is repeated in the text. You can just read the code. The example developed in the three steps is a sufficient blueprint to allow you to use the other widgets in the WINGs library. To do that, just look up the functions in the relevant section in the library description section.
|
||||
|
||||
</p><p>There are three programming detail sections after the three tutorial sections. They explain how to use Xlib code along with the WINGs code, how to set up a widget in which you can draw OpenGL images, and how to change part of the WINGs library source for your own needs, among other things.
|
||||
|
||||
</p><p>To compile WINGs widgets, you need a C-compiler, the WINGs library, and an X-server on your computer. The first few libraries which you need will be libWINGs and libwraster, and the X11 library libXft. If the WINGs library <em>directory</em> is in the /usr/lib path, and your X11 libraries in /usr/X11/lib, you can compile the code with gcc as follows
|
||||
</p><p><kbd>gcc -x c FileName -lXft -L/usr/X11/lib -L/usr/lib -lwraster -lWINGs -o FileName</kbd>
|
||||
</p><p>This will get you a binary called FileName which you can run, either by double clicking, or by running the <kbd>./FileName</kbd> command in an xterm.
|
||||
</p><p> To compile in C++, just replace the <code> fprintf(stderr, ..)</code> command with an appropriate <code>cerr << </code>, add the namespace command, and replace the <stdio.h> with the iostream header, then compile as
|
||||
<kbd>
|
||||
g++ -x c++ -lXft FileName -L/usr/X11/lib -L/usr/lib -lwraster -lWINGs-o FileName</kbd>
|
||||
|
||||
|
||||
|
||||
</p><p>The function prototypes in the library description were retrieved from the information in the WINGs man pages which were compiled by Alexey Voinov. His page was <a href="http://voins.program.ru/windowmaker/wingsman.html">here</a> in 2010.
|
||||
|
||||
|
||||
<br>
|
||||
<br>
|
||||
</p><p>
|
||||
</p><table align="JUSITFY" width="100%"><tbody><tr><td align="LEFT"><a href="WINGtoc.html">LAST: Contents</a></td><td align="RIGHT"><a href="WINGStep1.html">NEXT: Step 1 Drawing a Window</a></td></tr></tbody></table>
|
||||
|
||||
|
||||
|
||||
</body><style type="text/css">embed[type*="application/x-shockwave-flash"],embed[src*=".swf"],object[type*="application/x-shockwave-flash"],object[codetype*="application/x-shockwave-flash"],object[src*=".swf"],object[codebase*="swflash.cab"],object[classid*="D27CDB6E-AE6D-11cf-96B8-444553540000"],object[classid*="d27cdb6e-ae6d-11cf-96b8-444553540000"],object[classid*="D27CDB6E-AE6D-11cf-96B8-444553540000"]{ display: none !important;}</style></html>
|
||||
174
WINGs_tutorial/WINGsRemark.html
Normal file
@@ -0,0 +1,174 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- saved from url=(0075)WINGsRemark.html -->
|
||||
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>3 Steps to Make a WINGs User Interface</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="keywords" content="WINGs, tutorial, Introduction, C, programming, GUI, Window Maker, Linux">
|
||||
<meta name="description" content="WINGs library tutorial">
|
||||
<meta name="license" content="GNU Free Documentation License">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table align="JUSTIFY" width="100%"><tbody><tr><td align="LEFT"><a href="WINGStep3.html">LAST: Step 3 Adding Widgets</a></td><td align="CENTER"><a href="WINGtoc.html">Contents</a></td><td align="RIGHT"><a href="WINGGraphics.html">NEXT: Programming Details 2</a></td></tr></tbody></table>
|
||||
|
||||
<h4>Programming details and WINGs functions</h4>
|
||||
|
||||
<h5>Count the windows</h5>
|
||||
In the code up till now, we had just one window. When it receives notificaton that the window is requested to close, it shuts down the whole application. In an application with more windows open, we might not like it when closing an arbitrary window shuts everything down. An obvious solution is to exit the programma when the last open window is requested to close, and keep a count of the number of windows open. The closeAll function becomes:
|
||||
<pre><code>int windowcounter=0;
|
||||
void closeAll(WMWidget *self,void *data){
|
||||
WMDestroyWidget(self);
|
||||
fprintf(stderr,"I've been used!");
|
||||
if(--windowcounter<1) exit(0);
|
||||
}</code></pre>
|
||||
A second window should be opened with the existing screen as an argument. After success in opening, you increase <code>windowcounter</code> by one.
|
||||
<h5><a name="talkIcons">Icons and images</a></h5>
|
||||
<p>Defining an icon which will be used for your application, and drawing an image in a widget, are quite straightforward. Suppose, there is an XPM-image available, and it is the file /usr/include/<wbr>pixmaps/<wbr>picture.xpm. The following code sets an application icon and draws an icon in a label.
|
||||
</p><pre><code>RContext *ctxt;
|
||||
RImage *img;
|
||||
WMPixmap *wimg;
|
||||
/* code to open screen, window*/
|
||||
ctxt=WMScreenRContext(screen);
|
||||
img=RLoadXPM(ctxt, "/usr/include/pixmaps/picture.xpm", 0);
|
||||
WMSetApplicationIconImage(screen, img);
|
||||
wimg= WMCreatePixmapFromRImage(screen, img,0);
|
||||
/* code to create a label */
|
||||
WMSetLabelImagePosition(label, WIPImageOnly);
|
||||
WMSetLabelImage(label, wimg);</code></pre>
|
||||
<code>RContext</code> refers to the X-server's so-called <a name="talkGraphicsContext">graphics context</a>. This specifies which line width, fill patterns, etc. will be used. That information is not contained in the XPM-file. With <code>WMScreenRContext</code>, we use the existing context. <code>RLoadXPM</code> loads the xpm from a file, and stores it as an RImage.
|
||||
<p> The image is set as an icon for the application with this RImage. We transform the RImage into a WMPixmap. The WMPixmap can be shown in a widget. Here, we show it in a label with <code>WMSetLabelImage </code>. You must specify its position with the right <a href="WINGLib.html#ImagePositions">option</a> first.
|
||||
</p><p>An X pixmap is a text file. You can insert its code into your application source code directly, and handle it with <code>RGetImageFromXPMData</code>
|
||||
|
||||
</p><h5><a name="talkResolution">Virtual screen and resolution</a></h5>
|
||||
|
||||
<p>
|
||||
WINGs provide the function <code> unsigned int WMScreenWidth (WMScreen *wmscr)</code> to get the screen's width in pixels. There is a similar function to get its height. This is information about the virtual screen, and is not always what you are looking for. Many (or all?) Gtk+ interfaces have bigger font sizes when the virtual screen is bigger, even when the monitor is the same. If your monitor runs at 1024x768, and your virtual screen measures 1800x1440 pixels, you would often want to adjust your application to the monitor's resolution, and the view it has on the virtual screen, rather than to the screen's size itself. To get the used video mode (ie. the 1024x768 in our example), and the position on the virtual screen, the X-library libXxf86vmode provides two functions.
|
||||
</p><ul>
|
||||
<li><code> Bool XF86VidModeGetModeLine( Display *display, int screen, int *dotclock_return, XF86VidModeModeLine *modeline)</code>
|
||||
</li><li><code> Bool XF86VidModeGetViewPort( Display *display, int screen, int *x_return, int *y_return)</code>
|
||||
</li></ul>
|
||||
The returned <code>modeline</code> is a structure which has members <code>hdisplay</code> and <code>vdisplay</code>. The monitor's current resolution is <code>hdisplay x vdisplay</code>. The monitor's left uppper corner is at the position returned by <code>XF86VidModeGetViewPort</code> in <code>*x_return x *y-return</code>. The <code>screen</code> parameter in these function calls is <em>not</em> a WMScreen variable. A WMScreen variable <code>wmscr</code>is a structure, defined in WINGsP.h, which contains the screen number in a member <code>wmscr.screen</code>. The follwing example defines a function <code>*WMGetModeViewSSize()</code> For simplicity, it is assumed the application is using the default screen. The argument to the <code>WMScreenWidth</code> function should of course be a WMScreen type.
|
||||
|
||||
<pre><code> /* extra headers */
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/extensions/xf86vmode.h>
|
||||
|
||||
Display *display;
|
||||
WMScreen *screen;
|
||||
|
||||
int *WMGetModeViewSSize(){
|
||||
int *result;
|
||||
XF86VidModeModeLine modeline;
|
||||
int dotclock_return;
|
||||
|
||||
result=(int *)calloc(8,sizeof(int));
|
||||
|
||||
XF86VidModeGetModeLine(display,DefaultScreen(display), &dotclock_return,&modeline);
|
||||
*result= modeline.hdisplay;
|
||||
result[1]= modeline.vdisplay;
|
||||
XF86VidModeGetViewPort(display,DefaultScreen(display), result+2,result+3);
|
||||
result[4]=WMScreenWidth(screen);
|
||||
result[5]=WMScreenHeight(screen);
|
||||
|
||||
return result;
|
||||
}</code></pre>
|
||||
<img src="./WINGsRemark_files/ScreenSize.jpeg" align="right" width="50%">To compile this function, you need the <kbd>libXxf86vm</kbd> library. For the GNU compiler, your command would now be <kbd>gcc -x c -lXft FileName.c -L/usr/X11/lib -L/usr/lib -lWINGs -lwraster -lXxf86vm -o FileName</kbd>. When you run the function (after opening the screen), and print its results, you will find something like: <pre><code>result 0 and 1: 1024 768
|
||||
result 2 and 3: 126 171
|
||||
result 4 and 5: 1800 1440</code></pre>
|
||||
meaning that the monitor is running at 1024x768, its upper left corner is at (126,171) in the virtual screen, and the whole screen has a resolution of 1800x1440. The user is seeing the screen part from (126,171) to (1150,939). In the illustration to the right, (X,Y) represent the Viewport coordinates which are obtained from <code>XF86VidModeGetViewPort</code>. The bright part is the part of the virtual screen which is visible on the monitor at that moment.
|
||||
|
||||
<h5><a name="talkMessageLog">Message log window</a></h5>
|
||||
<p>In all the applications up till now, error and other messages have been sent to stderr or stdout. when you start the programmes by (double-)clicking in your file manager, the messages may disappear, or pop up in a window. This makes starting the application from an xterm command line the most practical. To get rid of this disappointing feature, you can programme another window to send the messages to, or, more logically, use a named pipe to send them to a different application which you already have on your system. This section gives an example how to code this last method.
|
||||
</p><p>The method is simple: when the first message needs to be written, the code creates the pipe with <code>mknod</code>. If successful, it forks. The child process uses unix' <code>execlp</code> to start the logging application. In this example it is <kbd>xconsole</kbd>, with the pipe as its file argument. The parent process opens the pipe for writing. The application now can write to the pipe.
|
||||
</p><p>The first detail is in the function to close our applicaton, <code>closeAll</code>, in the examples. This function should terminate the child process, and also delete the file which was used for piping the data. The second detail is the way we keep track if the child process is still running, or whether the user has clicked it away. For this we declare a signal handler each time we start up the child process. At the SIGCHLD signal, which indicates the child process has been terminated, we call a function which deletes the pipe file as well, and sets a global variable to a value which allows us to check if the child process has terminated. When writing our second message, we check first if the child process is still running. If it is, we can write to the pipe, if it isn't, we create a new child process and pipe. If there is any problem, we fall back on the usual stderr. Here is the (extra) code for a simple implementation:
|
||||
|
||||
</p><pre><code>#include <fcntl.h>
|
||||
#include <signal.h>
|
||||
#include <sys/stat.h>
|
||||
#define ERRMSGFIFO "/tmp/WINGsWindowfifo"
|
||||
#define NOLOGWINDOW (-2)
|
||||
#define FIFOERROR (-1)
|
||||
#define FIFOLOWESTPOSS 0
|
||||
|
||||
int fifonr=NOLOGWINDOW; /* the fifo nr, or an error value */
|
||||
int sibpid; /* the child's process ID */
|
||||
|
||||
|
||||
/* clean up when closing: */
|
||||
|
||||
void closeAll(WMWidget *self,void *data){
|
||||
|
||||
WMDestroyWidget(self);
|
||||
if(--windowCounter<1){
|
||||
if (fifonr>=FIFOLOWESTPOSS)
|
||||
kill(sibpid,SIGTERM);
|
||||
if (!access(ERRMSGFIFO,F_OK|W_OK))
|
||||
unlink(ERRMSGFIFO);
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
/* handle the case the child terminates. Set fifonr and clean up: */
|
||||
|
||||
void redirectmsg(int sig){
|
||||
|
||||
fifonr=NOLOGWINDOW;
|
||||
if (!access(ERRMSGFIFO,F_OK|W_OK))
|
||||
unlink(ERRMSGFIFO);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* have the log window pop up: */
|
||||
|
||||
int showMessageWindow(){
|
||||
|
||||
(void) signal(SIGCHLD,redirectmsg); /* use redirectmsg whenever the child process stops */
|
||||
|
||||
if(access(ERRMSGFIFO,F_OK)==-1)
|
||||
fifonr=mknod(ERRMSGFIFO,0640|O_EXCL|S_IFIFO,(dev_t)0);
|
||||
else
|
||||
fifonr=FIFOERROR;
|
||||
/* fifonr == FIFOERROR if mkfifo or access failed, for mknod returns -1 on failure */
|
||||
|
||||
if(fifonr!=FIFOERROR){
|
||||
|
||||
sibpid=fork();
|
||||
|
||||
if(sibpid==0){
|
||||
execlp("xconsole" , "xconsole", "-file",ERRMSGFIFO,"-geometry","250x400", \
|
||||
"-title","Application Messages",(char *)0);
|
||||
exit(1);
|
||||
}
|
||||
else
|
||||
fifonr=open(ERRMSGFIFO,O_WRONLY);
|
||||
}
|
||||
return fifonr;
|
||||
}
|
||||
|
||||
|
||||
/* usage: */
|
||||
|
||||
void someActionWithMessage(void *self, void *data){
|
||||
|
||||
if (fifonr<FIFOLOWESTPOSS)
|
||||
fifonr=showMessageWindow(); /* (re)start xconsole, or try again in case of FIFOERROR */
|
||||
|
||||
if (fifonr==FIFOERROR) /* if still error, use stderr */
|
||||
fprintf(stderr,"%s selected\n", WMgetSomeInformationFrom(self));
|
||||
else{
|
||||
char textbuffer[100];
|
||||
snprintf(textbuffer,99, "%s is the information\n", WMGetSomeInformationFrom(self));
|
||||
write(fifonr, textbuffer,strlen(textbuffer));
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
<p>
|
||||
The <code>someActionWithMessage</code> function is a <a href="WINGStep2.html#WMAction">WMAction</a> in this case. Of course, there must be an xconsole in the user's path and he needs the correct rights. The example catches the events that the user clicks away the xconsole before he is finished, that the fifo file already exists, and that the fifo file is replaced with something which is not accessible during run time. There is nothing to change in <code>main</code>.
|
||||
|
||||
<br>
|
||||
</p><p>
|
||||
</p><table align="JUSTIFY" width="100%"><tbody><tr><td align="LEFT"><a href="WINGStep3.html">LAST: Step 3 Adding Widgets</a></td><td align="CENTER"><a href="WINGtoc.html">Contents</a></td><td align="RIGHT"><a href="WINGGraphics.html">NEXT: Programming Details 2</a></td></tr></tbody></table>
|
||||
|
||||
|
||||
</body><style type="text/css">embed[type*="application/x-shockwave-flash"],embed[src*=".swf"],object[type*="application/x-shockwave-flash"],object[codetype*="application/x-shockwave-flash"],object[src*=".swf"],object[codebase*="swflash.cab"],object[classid*="D27CDB6E-AE6D-11cf-96B8-444553540000"],object[classid*="d27cdb6e-ae6d-11cf-96b8-444553540000"],object[classid*="D27CDB6E-AE6D-11cf-96B8-444553540000"]{ display: none !important;}</style></html>
|
||||
BIN
WINGs_tutorial/WINGsRemark_files/ScreenSize.jpeg
Normal file
|
After Width: | Height: | Size: 47 KiB |
64
WINGs_tutorial/WINGstep1.html
Normal file
@@ -0,0 +1,64 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- saved from url=(0074)WINGStep1.html -->
|
||||
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>3 Steps to Make a WINGs User Interface</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="keywords" content="WINGs, tutorial, Introduction, C, programming, GUI, Window Maker, Linux">
|
||||
<meta name="description" content="WINGs library tutorial">
|
||||
<meta name="license" content="GNU Free Documentation License">
|
||||
<!-- <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> -->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table align="JUSTIFY" width="100%"><tbody><tr><td align="LEFT"><a href="WINGsIntro.html">LAST: Introduction</a></td> <td align="CENTER"><a href="WINGtoc.html">Contents</a></td><td align="RIGHT"><a href="WINGstep2.html">NEXT: Step 2 Processing Events</a></td></tr></tbody></table>
|
||||
|
||||
<h4>Step 1: Six lines show a window on the screen</h4>
|
||||
<p>
|
||||
The WINGs library allows you to get a window on the screen with a few lines of C-code. The following source code will give a non-responsive empty window. By adding a short function and just one extra line of code, we shall enable it to be closed by clicking the destroy button on the title bar.
|
||||
</p><h5>Application <a name="FirstWindow">FirstWindow</a></h5>
|
||||
<pre><code>#include <WINGs/WINGs.h>
|
||||
|
||||
int main (int argc, char **argv){
|
||||
|
||||
Display *display;
|
||||
WMScreen *screen;
|
||||
WMWindow *win;
|
||||
|
||||
display = XOpenDisplay("");
|
||||
screen = WMCreateScreen(display, DefaultScreen(display));
|
||||
win = WMCreateWindow(screen, "");
|
||||
|
||||
WMRealizeWidget(win);
|
||||
WMMapWidget(win);
|
||||
|
||||
WMScreenMainLoop(screen);
|
||||
}
|
||||
</code>
|
||||
</pre>
|
||||
<p>The order in which things are created is display -> screen -> window. A display is your pc, with keyboard and mouse. Its name is what you may see if you type into your xterm <code>echo $DISPLAY</code>. The answer might very well be:<kbd>:0.0</kbd>. Your PC may have more than one screen. So, after connecting to the display with <code>XOpenDisplay</code>, you must open a screen with <code>WMCreateScreen</code>. The display knows which screen is your default screen, and there is a function <code>Defaultscreen</code> to tell you that. Your application will need to open a window in that screen, and that window is what you would like to interact with.
|
||||
|
||||
You complete the window, and put it on the screen with <a name="WMMap"><code>WMMapWidget(WMWindow *window)</code></a>, and <code>WMRealizeWidget(WMWindow *window)</code>. Omitting either of these two functions, will have as result that your programme is stuck and you won't see anything on the screen. IN general, a widget is complete when <code>WMRealizedWidget</code>ed. As long as you do not map it, you will not see it. The other way round, it won't work. You cannot map a widget which has not been realized. After WMrealizing the window, you set the interface in motion by calling <code>WMScreenMainLoop(WMScreen *screen)</code>. <code>WMMapWidget</code> makes a widget visible. You can also <code>WMUnmapWidget</code> them.
|
||||
</p><p>The source code is <a href="FirstWindow.c">here</a>. There is an extra intialization line which organizes the data the WINGs functions work with. Compile it: The application will show a grey area inside of the borders which your window manager provides. If you started the programme by running ./FirstWindow from an xterm, you can stop it by using ctrl-c from the command line. If you started it in the graphical interface by double clicking it, you may or may not be able to close it with the close button on the title bar. You'll notice that in Windowmaker the button is disabled, and you need to kill the application (double click). If you are using a different window manager you <em>may</em> be able close the window by clicking on the close button. More about this in a <a href="WINGStep1.html#talkCloseWindow">moment</a>.
|
||||
|
||||
</p><h6>Setting some properties</h6>
|
||||
<p><em>After</em> creating the window with <code>WMCreatWindow</code>, and before mapping it, its <a name="WindowProps">properties</a> can be set. Function names speak for themselves.
|
||||
</p><ul><li><code>WMResizeWidget(WMWindow *window,size-t WinSizePixels,int WinSizePixels)</code>
|
||||
</li><li><code> WMSetWindowTitle(WMWindow *window, const char **titlestring)</code>
|
||||
</li><li><code> WMSetWindowMinSize(WMWindow *window,int s,int s)</code>
|
||||
</li><li><code> WMSetWindowAspectRatio(WMWindow *window,int t,int t, int t, size-t t)</code>
|
||||
</li><li><code> WMSetWindowResizeIncrements(WMWindow *window,int Size,int Size)</code>
|
||||
</li><li><code> WMSetWidgetBackgroundColor(WMWidget *window, WMColor *color)</code>
|
||||
</li></ul>
|
||||
A WMColor colour can be created and undone with
|
||||
<ul><li><code>WMColor * WMCreateRGBColor (WMScreen *screen, unsigned short red, unsigned short green, unsigned short blue, Bool exact)</code>
|
||||
</li><li><code>void WMReleaseColor (WMColor *color)</code>
|
||||
</li></ul>
|
||||
The resulting colour is a RGB combination..
|
||||
<p>After inserting whichever functions you like, compile the code again.
|
||||
|
||||
</p><h6><a name="talkMissing">Something is missing</a></h6>
|
||||
<p> Let us go back to the difference in <a name="talkCloseWindow">behaviour</a> under different window managers. Open an xterm, and run your application FirstWindow) from the command line <kbd>./FirstWindow</kbd>, that is, if it's in your current directory. We have seen that under windowmaker, the close button is disabled, and you can only close the window by using ctrl-c. Now switch to a different window manager, like xfce4 or (yes) fvwm2. Run FileName from the <em>command line</em> in an xterm. Click on the close button in the title bar. The window closes, but that is not all. You are getting an error message in your xterm, when you close the window. xfce4 says <kbd>Broken pipe</kbd>. fvwm has more funky messages like <kbd>XIO: fatal IO error 104 (Connection reset by peer) on X server ":0.0" after 1320 requests (1319 known processed) with 1 events remaining.</kbd>, or <kbd>X connection to :0.0 broken (explicit kill or server shutdown)</kbd>. So one window manager disables a button, and the others give error messages. We have a problem to solve in any of them.
|
||||
|
||||
</p><table align="JUSTIFY" width="100%"><tbody><tr><td align="LEFT"><a href="WINGsIntro.html">LAST: Introduction</a></td> <td align="CENTER"><a href="WINGtoc.html">Contents</a></td><td align="RIGHT"><a href="WINGStep2.html">NEXT: Step 2 Processing Events</a></td></tr></tbody></table>
|
||||
|
||||
|
||||
</body><style type="text/css">embed[type*="application/x-shockwave-flash"],embed[src*=".swf"],object[type*="application/x-shockwave-flash"],object[codetype*="application/x-shockwave-flash"],object[src*=".swf"],object[codebase*="swflash.cab"],object[classid*="D27CDB6E-AE6D-11cf-96B8-444553540000"],object[classid*="d27cdb6e-ae6d-11cf-96b8-444553540000"],object[classid*="D27CDB6E-AE6D-11cf-96B8-444553540000"]{ display: none !important;}</style></html>
|
||||
59
WINGs_tutorial/WINGstep2.html
Normal file
@@ -0,0 +1,59 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- saved from url=(0074)WINGStep2.html -->
|
||||
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>3 Steps to Make a WINGs User Interface</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="keywords" content="WINGs, tutorial, Introduction, C, programming, GUI, Window Maker, Linux">
|
||||
<meta name="description" content="WINGs library tutorial">
|
||||
<meta name="license" content="GNU Free Documentation License">
|
||||
<!-- <META http-equiv="Content-Type" content="text/html> -->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table align="JUSTIFY" width="100%"><tbody><tr><td align="LEFT"><a href="WINGstep1.html">LAST: Step 1 Drawing a Window</a></td><td align="CENTER"><a href="WINGtoc.html">Contents</a></td><td align="RIGHT"><a href="WINGstep3.html">NEXT: Step 3 Adding Widgets</a></td></tr></tbody></table>
|
||||
|
||||
<h4>Step 2: Processing events</h4>
|
||||
|
||||
<h5>Closing the window</h5>
|
||||
|
||||
<p>Every widget can process <a name="talkEvents">events</a> if it wants to. An event is a structure with information, which is created by the X-server, when certain things happen, such as a mouse click, a pressed key, or the raising of a window. These Xevents are queued. You can select for a window or widget, which events, sent by the X-server, you want it to use. The other events will be ignored. The widget takes these events out of the queue. You must specify which function will be executed for which event. In our FirstWindow application, we have not done anything of this kind.
|
||||
|
||||
</p><p>In the FirstWindow application, the <code>WMScreenMainLoop(screen)</code> call puts the application into a loop to wait for events. We had not specified any events to be processed, however, and the application does not react to the event that you told the window manager to close it by clicking on the close button. For this, there is an easy fix. It is the <a name="WindowCloseAction">function</a>
|
||||
<br><code>void WMSetWindowCloseAction (WMWindow *window, WMAction *action, void *clientData)</code><br>
|
||||
This should be called after the window's creation and before its mapping with <code>WMMapWidget()</code>. The argument <a name="WMAction"><code>WMAction</code></a> must be a function, which looks like this:<br><code>void action(WMWidget *self,void *data){ commands}</code>.<br> It is automatically called when the window is closed. Typically, it handles the data, it destroys the widget where the CloseAction event arrived, in this case our only window. In our simple programme, we would simply exit the application. If there can be more than a single window, we should keep track of their number, and exit only if we are on the last window (if we wish to do so). Widgets are deleted by <code>void WMDestroyWidget (WMWidget *widget)</code> Now , to the <a href="WINGStep1.html#FirstWindow">FirstWindow</a> code, we can, somewhere before the <code>main</code> function, define this function:
|
||||
</p><pre><code>
|
||||
void closeAll(WMWidget *self,void *data){
|
||||
WMDestroyWidget(self);
|
||||
fprintf(stderr, "I've been used!\n");
|
||||
exit(0);
|
||||
}
|
||||
</code></pre>
|
||||
We write a message to the standard error output when the function is used. After the <code>WMCreateWindow()</code> line, we insert the line:
|
||||
<pre><code>WMSetWindowCloseAction(window, closeAll, NULL);</code></pre>
|
||||
<p><img src="./WINGstep2_files/FirstWindow.jpeg" align="right">Compile it. The source code now looks like <a href="SecondWindow.c">this</a>. Do the experiments <a href="WINGStep1.html#talkCloseWindow">above</a> again. In Windowmaker the close button now is enabled. In the other window managers, the error messages have disappeared, and our function lets us know it has been used.
|
||||
The title bar reads "untitled", because we have not used <code>WMSetWindowTitle</code>. The destroy-button now is enabled, however. The colour was created by the red, green, and blue values : <code>124<<9, 206<<8</code>, and <code>162<<8</code>.
|
||||
|
||||
|
||||
</p><h5>Closing the window in a different way</h5>
|
||||
The <code>WMSetWindowCloseAction()</code> hides many details. Suppose we like to close the window and end the application in a different way. We can use the same <code>closeAll</code> function as above for this. We are going to close the window whenever there is a mouse click in it. When there is a click, the system notifies the window that there is an X-event "ButtonPress". To use this, we must specify which events we want to use for the window, and specify which function will be called in case such an event arrives. The function to do this, is <br><code> void WMCreateEventHandler (WMView *view, unsigned long mask, WMEventProc *eventProc,void *clientData)</code>.<br> The <var>mask</var> argument in it will be an "OR"ed combination of masks. <a href="WINGLib.html#EventsList">Here</a> is a list of Events and their event masks. For the moment, we just need "ButtonPressMask". The WMEventProc is a function which must look like <code>void eventProc(XEvent *event, void *data)</code>. The clientData is our window to which we like to give access for these events. (WMView *) is a member in the WMWidget structure. It can be obtained from the window by the function <code> WMWidgetView(WMWindow *window)</code>.
|
||||
Now, insert the following function after our closeAll function in the programme
|
||||
<pre><code>
|
||||
static void handleEvents(XEvent *event, void *data)
|
||||
{
|
||||
WMWidget *widget = (WMWidget*)data;
|
||||
switch (event->type) {
|
||||
case ButtonPress:
|
||||
closeAll(widget,NULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
It says that if the incoming event for the window is of type ButtonPress, it will call the function closeAll. We really do not need the switch statement now, because we do not specify anything for <code>ButtonRelease</code>. Usually we define functions for all the event types which we have specified by the mask in the WMCreateEventHandler function. Now, after the line with <code>WMCreateWindow()</code>, insert the following line in our programme:
|
||||
<br><pre><code> WMCreateEventHandler(WMWidgetView(win), ButtonPressMask,handleEvents, win)</code></pre>
|
||||
The full source code now looks like <a href="ThirdWindow.c">this</a>. Compile the code. Run the programme, and find that the window closes as soon as you click in it. We have given window access to the ButtonPress Xevent, and specified that in case this event comes up, the closeAll function should be called. We'll remove this annoying feature again in the next step, when we shall show a button in the window, which will duely close the window when clicked.
|
||||
|
||||
<br>
|
||||
<p>
|
||||
</p><table align="JUSTIFY" width="100%"><tbody><tr><td align="LEFT"><a href="WINGStep1.html">LAST: Step 1 Drawing a Window</a></td><td align="CENTER"><a href="WINGtoc.html">Contents</a></td><td align="RIGHT"><a href="WINGStep3.html">NEXT: Step 3 Adding Widgets</a></td></tr></tbody></table>
|
||||
|
||||
|
||||
</body><style type="text/css">embed[type*="application/x-shockwave-flash"],embed[src*=".swf"],object[type*="application/x-shockwave-flash"],object[codetype*="application/x-shockwave-flash"],object[src*=".swf"],object[codebase*="swflash.cab"],object[classid*="D27CDB6E-AE6D-11cf-96B8-444553540000"],object[classid*="d27cdb6e-ae6d-11cf-96b8-444553540000"],object[classid*="D27CDB6E-AE6D-11cf-96B8-444553540000"]{ display: none !important;}</style></html>
|
||||
BIN
WINGs_tutorial/WINGstep2_files/FirstWindow.jpeg
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
143
WINGs_tutorial/WINGstep3.html
Normal file
@@ -0,0 +1,143 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- saved from url=(0074)WINGStep3.html -->
|
||||
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>3 Steps to Make a WINGs User Interface</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="keywords" content="WINGs, tutorial, GUI, Window Maker, widget, Linux">
|
||||
<meta name="description" content="WINGs library tutorial">
|
||||
<meta name="license" content="GNU Free Documentation License">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table align="JUSTIFY" width="100%"><tbody><tr><td align="LEFT"><a href="WINGstep2.html">LAST: Step 2 Processing Events</a></td><td align="CENTER"><a href="WINGtoc.html">Contents</a></td><td align="RIGHT"><a href="WINGsRemark.html">NEXT: Programming Details</a></td></tr></tbody></table>
|
||||
|
||||
<h4>Step 3: Adding widgets to a window</h4>
|
||||
|
||||
<h5>Adding buttons to a widget</h5>
|
||||
<p>As a window is a widget, we can create a button for it with the function<br>
|
||||
<code> WMButton * WMCreateButton (WMWidget *parent, WMButtonType type)</code><br>
|
||||
To make the button visible, the function <code>WMMapSubwidgets</code> may be called on the window. A call to WMMapWidget on the button will do the same of course. Before mapping the button, its properties can be set with functions whose names speak for themselves
|
||||
|
||||
</p><p>
|
||||
</p><ul><li><code> void WMSetButtonText (WMButton *bPtr, char *text)</code>
|
||||
</li><li><code>void WMSetButtonTextAlignment (WMButton *bPtr,WMAlignment alignment)</code>
|
||||
</li><li><code> void WMSetButtonAction (WMButton *bPtr, WMAction *action, void *clientData)</code>
|
||||
</li><li><code> void WMMoveWidget (WMWidget *wdiget, int pixelstoright, int pixelsdown)</code>
|
||||
</li><li><code> WMScreen * WMWidgetScreen (WMWidget *widget)</code>
|
||||
</li><li><code> WMSize WMGetViewSize (WMView *view)</code>
|
||||
</li><li><code>void WMMapSubwidgets (WMWidget *widget)</code>
|
||||
</li></ul>
|
||||
|
||||
<p>As windows and buttons are both widgets, <code>WMResizeWidget()</code> is the same as for the window <a href="WINGStep1.html#WindowProps">above</a>, just as the function to set the background colour. Sizing and moving is in pixels, movements are in pixels from the parent widget's upper left corner. The default action on a button, which is a mouse click, will call the WMAction function, just as happens with the <a href="WINGStep2.html#WindowCloseAction">CloseAction</a> on the window. WMAlignment can be WALeft, WACenter, WARight or WAJustified.
|
||||
|
||||
</p><p>The different WMButtonTypes are <img src="./WINGstep3_files/Buttons.jpeg" align="right">
|
||||
</p><dl><dt>Touch buttons:</dt><dd><code>WBTMomentaryPush, WBTMomentaryChange,WBTMomentaryLight </code>
|
||||
</dd><dt>Alternate on/off buttons: </dt><dd><code>WBTPushOnPushOff, WBTOnOff, WBToggle</code>
|
||||
</dd><dt>Checkbox with label next to it:</dt><dd> <code>WBTSwitch, WBTRadio</code>
|
||||
</dd></dl>
|
||||
Particular behaviour of a button can be obtained by using the function<br>
|
||||
<code>WMButton * WMCreateCustomButton (WMWidget *parent, int behaviourMask)</code><br>
|
||||
By default a new widget will be placed in the window's top left corner. <code>WMMoveWidget</code> is used to place it correctly.
|
||||
<p>Buttons can be grouped together by using a WMBox widget. You would do this when you want to do something fancy with the buttons, eg. filling the width of a part of the window, and resizing with that part. Create the box before creating the button, WMMap the button, and next add the latter's view, extracted with WMWidgetView() to the box:
|
||||
</p><ul>
|
||||
<li><code>WMBox * WMCreateBox (WMWidget *parent)</code>
|
||||
</li><li><code> void WMSetBoxHorizontal (WMBox *box, Bool TrueorFalse)</code>
|
||||
</li><li><code> void WMAddBoxSubview (WMBox *box, WMView *buttonsview,
|
||||
Bool expand, Bool fill, int minSize,
|
||||
int maxSizeor0, int space)</code>
|
||||
</li><li><code>void WMSetBoxBorderWidth (WMBox *box, unsigned width)</code>
|
||||
</li><li><code>void WMSetViewExpandsToParent (WMView *boxview, int leftOffset,
|
||||
int topOffset, int rightOffset,
|
||||
int bottomOffset)</code>
|
||||
</li></ul>
|
||||
<p>In the <code>WMAddBoxSubview</code> function, setting expand to True will stretch the button to the height of the box. <code>space</code> sets the space after the button. To resize the widgetbox with the window, you can use the <code>WMSetViewExpandsToParent</code> function. Otherwise, you can calculate your own positions, and move the box to where it is supposed to be in a resized window. There are other ways to group buttons, or other widgets, eg. by a <a href="WINGStep3.html#talkFrame">frame</a>.
|
||||
|
||||
</p><h6>Resize events</h6>
|
||||
To know the current window's size, and the size of any other widget, there is the function <code> WMSize WMGetViewSize (WMView *view)</code>. As before, the function <code>WMWidgetView</code> casts the widget into a view. <code>WMWidgetScreen</code> returns a pointer to the screen in which the widget was created.
|
||||
|
||||
<p>We thus can get the window's size, and place widgets in their correct positions. What is left to do is a function which handles the event that the user resizes the window. The buttons, or the box containing them, should move to their correct positions in the window again in such an event, or resize with the window itself. There is an event <code>WMViewSizeDidChangeNotification</code> when the window is resized. For a WMWindow win, passing WMWidgetView(win) as the last argument to the function below will define what to do when this event occurs.
|
||||
<br><code> void WMAddNotificationObserver (WMNotificationObserverAction *observerAction, void *observer,const char *name, void *object)</code><br>
|
||||
The third argument should be the event's name (WMViewSizeDidChangeNotification), and the first argument is the name of the function which will be called. This function should look like <code>void observerAct(void *self, WMNotification *notification)</code>. It is all done in the sample code <a href="FourthWindow.c">here</a>.
|
||||
|
||||
</p><h6>Adding the event handlers and widgets to the application</h6>
|
||||
In the FirstWindow code, we insert the following lines to handle the resize notification:<br>
|
||||
<pre><code> WMSetViewNotifySizeChanges(WMWidgetView(win), True);
|
||||
WMAddNotificationObserver(resizeHandler, NULL, WMViewSizeDidChangeNotification, WMWidgetView(win));</code></pre>
|
||||
<p>Before the <code>main</code> function we define the function (<code>resizeHandler</code>) which will handle the resize event for the two widgets, the text area and the box with buttons. There is a global variable ButtonsetSize, which contains the size of the box with buttons:
|
||||
</p><pre><code> WMSize ButtonsetSize;
|
||||
static void resizeHandler(void *self, WMNotification *notif){
|
||||
WMSize size = WMGetViewSize(WMWidgetView(win));
|
||||
WMMoveWidget(box, size.width-ButtonsetSize.width, size.height-ButtonsetSize.height);
|
||||
WMResizeWidget(text, size.width-MARGIN -10, size.height-80);
|
||||
}
|
||||
static void handleEvents(XEvent *event, void *data)
|
||||
{int i=0;
|
||||
WMWidget *widget = (WMWidget*)data;
|
||||
switch (event->type) {
|
||||
case ButtonPress:
|
||||
while (i<40)textbuf[i++]=' ';
|
||||
snprintf(textbuf,39,"Button down at (%i,%i) \n-",event->xbutton.x,event->xbutton.y);
|
||||
WMFreezeText(text);
|
||||
WMAppendTextStream(text,textbuf);
|
||||
WMThawText(text);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
</code></pre>
|
||||
The buttons keep their size, but are moved to stay in the bottom right corner, the text area is resized along with the window, but stays 80 pixels away from the window bottom border. We also do something useful with the mouseclicks on the window itself. This is done in the function handleEvents. The event ButtonPress has the click time and position in a member <code>.xbutton</code>. When the button is pressed, we get that information, and print it to the text area.
|
||||
|
||||
<p> The text is written to a <a href="WINGLib.html#TextArea">text area</a>. Function names for it are self-explanatory. We create this widget after creating the window. It will be WMmapped by the final <code>WMMapSubwidgets</code>. The code for setting it up is just:
|
||||
</p><pre><code> text = WMCreateText(win);
|
||||
WMResizeWidget(text, WINWIDTH-MARGIN, WINHEIGHT -80);
|
||||
WMMoveWidget(text, 10, 10)</code></pre>The text is written to the area by passing character strings to the <code>WMAppendTextStream</code> function.
|
||||
|
||||
<p>The important functions in creating the box and its widgets are:
|
||||
</p><pre><code> box=WMCreateBox(win);
|
||||
WMSetBoxBorderWidth(box, MARGIN);
|
||||
WMSetBoxHorizontal(box, True);
|
||||
Button =WMCreateButton(box,WBTMomentaryPush);
|
||||
WMSetButtonAction (Button, selectFiles, NULL);
|
||||
WMMapWidget(Button);
|
||||
ButtonsetSize = WMGetViewSize(WMWidgetView(QuitButton));
|
||||
WMAddBoxSubview(box, WMWidgetView(QuitButton), True,False, 60, 1000, MARGIN);
|
||||
/*-- make and add another button --*/
|
||||
WMResizeWidget(box, 4*MARGIN+2*ButtonsetSize.width,2*MARGIN+ButtonsetSize.height);
|
||||
ButtonsetSize =WMGetViewSize(WMWidgetView(box));
|
||||
resizeHandler(NULL,NULL)</code></pre>
|
||||
<img src="./WINGstep3_files/FirstWindow4.jpeg" align="LEFT" alt="Application window" hspace="#5">The box is created before the button is, because the button will have to be created with the box (its parent widget) as its first argument. The box is the "outer" widget and will be mapped with <code>WMMapSubwidgets</code>, but we map the buttons separately. The function which will be called on the default button event is closeAll() for the quit button. The file button will call the <code>selectFiles()</code> function, in which we open a <a href="WINGLib.html#FileSelect">file selector</a> widget. We have left it to WINGs to decide what size the button will be. We temporarily use ButtonsetSize to store this size. We add the button's view to the box. After adding all the buttons, We store the size of the resulting box, and use it in our <kbd>resizeHandler</kbd> function to keep the box in the corner. <img src="./WINGstep3_files/OpenFileDialog.jpeg" align="Right" width="20%" alt="File selector widget" hspace="#5">.Following the <a href="FourthWindow.c">source code</a>, pressing the file button will pop up the file selector dialog, and the name of the selected file is printed in the text area. Notice that, without the box widget, we would need two global Button pointers to change the position of both buttons in the <kbd>resizeHandler</kbd> function. We now need one Button pointer, which can remain local to <code>main</code>.
|
||||
|
||||
<p><a href="FourthWindow.c">Here</a> is the full code which we have now. As we have a text area, we can print text to it, as long as we are sure that the widget has not been destroyed. The scroll bar next to the area is obtained with one single <a href="WINGLib.html#TextArea">function</a> call.
|
||||
|
||||
</p><h6>Frames</h6>
|
||||
<p>The WMBox needs quite some configuration. It is not really intended for putting two simple buttons in a corner. We can use a <a name="talkFrame"></a><a href="WINGLib.html#Frames">frame</a> to keep widgets together and move them with one single pointer. For buttons, we could also use the <code>WMGroupButtons</code> function to handle a group of buttons with just one pointer. To use a frame, use this code, instead of the WMBox functions: At global scope:
|
||||
</p><pre><code>WMFrame *controlframe;
|
||||
static void resizeHandler(void *self, WMNotification *notif){
|
||||
WMSize size = WMGetViewSize(WMWidgetView(win));
|
||||
WMMoveWidget(controlframe, size.width-ButtonsetSize.width, size.height-ButtonsetSize.height);
|
||||
WMResizeWidget(text, size.width-MARGIN -10, size.height-80);
|
||||
}</code></pre>
|
||||
In <code>main</code>:
|
||||
<pre><code> controlframe=WMCreateFrame(win);
|
||||
Button =WMCreateButton(controlframe,WBTMomentaryPush);
|
||||
ButtonsetSize = WMGetViewSize(WMWidgetView(Button));
|
||||
WMMoveWidget(Button,MARGIN, MARGIN);
|
||||
/* (code to create a second button of the same size, with the same pointer) */
|
||||
WMMoveWidget(Button,2*MARGIN+ButtonsetSize.width, MARGIN);
|
||||
ButtonsetSize.width = 3*MARGIN+2*ButtonsetSize.width;
|
||||
ButtonsetSize.height=2*MARGIN+ButtonsetSize.height;
|
||||
WMResizeWidget(controlframe,ButtonsetSize.width,ButtonsetSize.height);
|
||||
WMMapSubwidgets(controlframe);</code></pre>
|
||||
|
||||
<p>As we created the buttons inside the frame, we WMMoveWidget them along coordinates with respect to the frame's upper left corner. We have left it to WINGs to set the buttons' size, so we get their size with <code>WMGetViewSize</code>. With the button sizes, we calculate what size the frame is to have, and how far we need to move the buttons from the upper left corner to get them to the right place. We WMMap both buttons inside the frame with <code>WMMapSubwidgets(controlframe);</code>. The frame is the outer widget, and will be WMMapped just before the window. Replacing the box with the frame, we get <a href="FifthWindow.c">this</a> source code. After compiling, we get the same application. The obvious frame properties are set with the <a href="WINGLib.html#Frames">frame functions</a>
|
||||
|
||||
</p><h5>Next sections</h5>
|
||||
<p> The three steps up till now have shown the important points in programming with the WINGs library. The basics are all the same all the time. Create, specify WMAction, define the WMAction function somewhere, WMMap the widget. If this won't do, use <a href="WINGLib.html#Notification">PostNotification</a>, and <code>AddNotificationObserver</code> to the widget which should react to it.
|
||||
</p><p>From the next sections, the <a href="WINGLib.html">library description</a> gives a whole range of widgets which you can fit into the window this way, and related functions and data structures. There is sample code for those widgets whose code seems a bit more involved. The only thing which cannot be obtained by a simple function call is a menu with submenus, which is to work under any window manager, not just Window Maker. The <a href="WINGMenu.html">third programming detail section</a> explains, how to programme this kind of menu. The other two programming detail sections are not about the WINGs/wraster/windowmaker libraries themselves, except for a <a href="WINGsRemark.html#talkIcons">short section</a> on the use of the WINGs functions to insert icons into widgets. Detail <a href="WINGsRemark.html">section 1</a> contains an <a href="WINGsRemark.html#talkMessageLog">example</a> of how to get rid of the disappointing xterm window which you need to start your windowed application from, to read its messages on stderr or stdout. It shows the standard code to open a <a href="WINGsRemark.html#talkMessageLog">logging window</a> on the screen when needed. For convenience, it uses xconsole for this, a standard application on unix systems with X11. The same section 1 shows how to get the correct information about <a href="WINGsRemark.html#talkResolution">monitor resolution</a> when a virtual screen is used. Detail <a href="WINGGraphics.html">section 2</a> gives code samples which demonstrate how to mix Xlib code with the WINGs library. Xlib is the library which gives direct access to the X-server, and which is the underlying code to the WINGs library itself. It also contains a <a href="WINGGraphics.html#talkOpenGL"> section</a> which shows how to use OpenGL 3D graphics code in a WINGs frame. These extra sections do not explain all the details on the used libraries. However, by just following the code examples, you can reproduce their results, and change them to use them in your own programmes.
|
||||
|
||||
|
||||
<br>
|
||||
</p><p>
|
||||
</p><table align="JUSTIFY" width="100%"><tbody><tr><td align="LEFT"><a href="WINGStep2.html">LAST: Step 2 Processing Events</a></td><td align="CENTER"><a href="WINGtoc.html">Contents</a></td><td align="RIGHT"><a href="WINGsRemark.html">NEXT: Programming Details</a></td></tr></tbody></table>
|
||||
|
||||
|
||||
</body><style type="text/css">embed[type*="application/x-shockwave-flash"],embed[src*=".swf"],object[type*="application/x-shockwave-flash"],object[codetype*="application/x-shockwave-flash"],object[src*=".swf"],object[codebase*="swflash.cab"],object[classid*="D27CDB6E-AE6D-11cf-96B8-444553540000"],object[classid*="d27cdb6e-ae6d-11cf-96b8-444553540000"],object[classid*="D27CDB6E-AE6D-11cf-96B8-444553540000"]{ display: none !important;}</style></html>
|
||||
BIN
WINGs_tutorial/WINGstep3_files/Buttons.jpeg
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
BIN
WINGs_tutorial/WINGstep3_files/FirstWindow4.jpeg
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
WINGs_tutorial/WINGstep3_files/OpenFileDialog.jpeg
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
WINGs_tutorial/WINGstep3_files/ScreenSize.jpeg
Normal file
|
After Width: | Height: | Size: 47 KiB |
126
WINGs_tutorial/WINGtoc.html
Normal file
@@ -0,0 +1,126 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- saved from url=(0072)WINGtoc.html -->
|
||||
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>3 Steps to Make a WINGs User Interface</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="keywords" content="WINGs, tutorial, Introduction, C, programming, GUI, Window Maker, Linux">
|
||||
<meta name="description" content="WINGs library tutorial">
|
||||
<meta name="license" content="GNU Free Documentation License">
|
||||
|
||||
<!-- <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> -->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table align="JUSTIFY" width="100%"><tbody><tr><td align="LEFT"></td><td align="RIGHT"><a href="WINGsIntro.html">NEXT: Introduction</a></td></tr></tbody></table>
|
||||
<h2>A WINGs based graphical user interface in three steps</h2>
|
||||
<h3>CONTENTS</h3>
|
||||
<ol>
|
||||
<li><a href="WINGsIntro.html">Introduction</a>
|
||||
</li><li><a href="WINGstep1.html"><strong>Step 1.</strong> Six lines show a window on the screen </a>
|
||||
<ol>
|
||||
<li>First application
|
||||
</li><li>Setting properties
|
||||
</li><li>Something is missing
|
||||
</li></ol>
|
||||
</li><li><a href="WINGstep2.html"><strong>Step 2.</strong> Processing events</a>
|
||||
<ol><li>Closing the window
|
||||
</li><li>Closing the window in a different way
|
||||
</li></ol>
|
||||
</li><li><a href="WINGstep3.html"><strong>Step 3.</strong> Adding widgets to a window</a>
|
||||
<ol><li>Adding buttons to a widget
|
||||
</li><li>Resize events
|
||||
</li><li>Adding the event handlers and widgets to the application
|
||||
</li><li>Frames
|
||||
</li></ol>
|
||||
</li><li><a href="WINGsRemark.html">Programming details</a>
|
||||
<ol><li>Count the windows
|
||||
</li><li>Icons and images
|
||||
</li><li>Virtual screen and resolution
|
||||
</li><li>Message log window
|
||||
</li></ol>
|
||||
</li><li><a href="WINGGraphics.html">Graphics programming details</a>
|
||||
<ol><li>The Drawable
|
||||
</li><li>Xlib Graphics Functions
|
||||
</li><li>An OpenGL Drawing Area
|
||||
</li></ol>
|
||||
</li><li><a href="WINGMenu.html">Floating hierarchical menus</a>
|
||||
<ol><li>The menu widget
|
||||
</li><li>Window Manager Hints</li></ol>
|
||||
</li><li><a href="WINGLib.html">Complete library description</a>
|
||||
<ol><li>General widgets
|
||||
</li><li>Frames
|
||||
</li><li>Panels
|
||||
</li><li>Windows
|
||||
</li><li>Views
|
||||
</li><li>Buttons
|
||||
</li><li>Button boxes
|
||||
</li><li>Expanding and pull-down buttons
|
||||
</li><li>Text fields
|
||||
</li><li>Labels
|
||||
</li><li>Sliders
|
||||
</li><li>Scrollable views
|
||||
</li><li>Message pop-up windows
|
||||
</li><li>Input dialogs
|
||||
</li><li>File selection dialogs
|
||||
</li><li>Text Areas
|
||||
</li><li>Split windows/views
|
||||
</li><li>Lists
|
||||
</li><li>Colour selection panels
|
||||
</li><li>Font selection panel
|
||||
</li><li>Tabbed views
|
||||
</li><li>Progress indicators
|
||||
</li><li>Event handlers
|
||||
</li><li>Selections
|
||||
</li><li>Screens
|
||||
</li><li>Image functions
|
||||
</li><li>Application wide functions
|
||||
</li><li>Notifications
|
||||
</li><li>Text balloons
|
||||
</li><li>Drag/drop functions
|
||||
</li><li>Network connections
|
||||
</li><li>Draw functions
|
||||
</li><li>Browser functions
|
||||
</li><li>Menu items
|
||||
</li><li>Utilities/redefined functions
|
||||
</li><li>Data types
|
||||
<ol><li>WMColor
|
||||
</li><li>WMFont
|
||||
</li><li>WMArray
|
||||
</li><li>Trees
|
||||
</li></ol>
|
||||
</li><li>ENUMs and #defines
|
||||
<ol><li>List of event masks and corresponding events
|
||||
</li><li> Frame Title Positions
|
||||
</li><li> WM Image Positions
|
||||
</li><li>WMAlignment
|
||||
</li><li>Reliefs
|
||||
</li></ol></li></ol>
|
||||
</li><li>Appendix: list of examples<ol>
|
||||
<li><a href="FirstWindow.c">Minimal window</a>
|
||||
</li><li><a href="SecondWindow.c">Responsive window</a>
|
||||
</li><li><a href="ThirdWindow.c">Clickable window</a>
|
||||
</li><li><a href="FourthWindow.c">Window with buttons and text area</a>
|
||||
</li><li><a href="FifthWindow.c">Window with buttons and text area using frames</a>
|
||||
</li><li><a href="SixthWindow.c">Pixmap drawing</a>
|
||||
</li><li><a href="SeventhWindow.c">Xlib drawing</a>
|
||||
</li><li><a href="EighthWindow.c">Menu creation</a>
|
||||
</li><li><a href="NinthWindow.c">Menu and submenus</a>
|
||||
</li><li><a href="glframe.c">OpenGL in a frame</a>
|
||||
</li></ol>
|
||||
</li><li><small><a href="FDL.html">GNU Free Documentation License</a></small>
|
||||
</li></ol>
|
||||
<p>
|
||||
</p><p>
|
||||
<br>
|
||||
<br>
|
||||
<tiny><small> Copyright (c) 2010
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no
|
||||
Front-Cover Texts, and with no Back-Cover Texts.
|
||||
A copy of the license is included in the section entitled <a href="FDL.html">"GNU
|
||||
Free Documentation License"</a>.</small></tiny>
|
||||
|
||||
|
||||
|
||||
</p></body><style type="text/css">embed[type*="application/x-shockwave-flash"],embed[src*=".swf"],object[type*="application/x-shockwave-flash"],object[codetype*="application/x-shockwave-flash"],object[src*=".swf"],object[codebase*="swflash.cab"],object[classid*="D27CDB6E-AE6D-11cf-96B8-444553540000"],object[classid*="d27cdb6e-ae6d-11cf-96b8-444553540000"],object[classid*="D27CDB6E-AE6D-11cf-96B8-444553540000"]{ display: none !important;}</style></html>
|
||||
283
WINGs_tutorial/glframe.c
Normal file
@@ -0,0 +1,283 @@
|
||||
#include <X11/keysym.h>
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
|
||||
#include <WINGs/WINGs.h>
|
||||
#include <WINGs/WINGsP.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define CONTENTH 300
|
||||
#define CONTENTW 300
|
||||
#define CONTENTMARGIN 30
|
||||
|
||||
|
||||
struct couple{
|
||||
WMWindow *window;
|
||||
WMFrame *frame;
|
||||
} datacouple;
|
||||
|
||||
|
||||
float red=252.0/256, green=88.0/256, blue=16.0/256;
|
||||
float redb=252.0/256, greenb=242.0/256, blueb=80.0/256;
|
||||
|
||||
int Attr[] = { GLX_RGBA,
|
||||
GLX_RED_SIZE, 8,
|
||||
GLX_GREEN_SIZE, 8,
|
||||
GLX_BLUE_SIZE, 8,
|
||||
GLX_DEPTH_SIZE, 16,
|
||||
GLX_DOUBLEBUFFER,
|
||||
None};
|
||||
Display * display;
|
||||
float alpha=0;
|
||||
|
||||
void init(void)
|
||||
{
|
||||
glClearColor (256/256, 256/256, 256/256, 0.0);
|
||||
glPolygonMode(GL_FRONT, GL_FILL);
|
||||
glPolygonMode(GL_BACK, GL_FILL);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glShadeModel(GL_SMOOTH);
|
||||
|
||||
glEnable(GL_LIGHTING);
|
||||
GLfloat ambientLight[] = { 0.2f, 0.2f, 0.2f, 1.0f };
|
||||
GLfloat diffuseLight[] = { 0.8f, 0.8f, 0.8f, 1.0f };
|
||||
GLfloat specularLight[] = { 0.5f, 0.5f, 0.5f, 1.0f };
|
||||
GLfloat position[] = { 2.0f, -0.1f, 2.0f, 1.0f };
|
||||
GLfloat position2[] = { -2.0f, -0.26f, -4.0f, 1.0f };
|
||||
glLightModelfv(GL_LIGHT_MODEL_AMBIENT, ambientLight);
|
||||
glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuseLight);
|
||||
//glLightfv(GL_LIGHT0, GL_SPECULAR, specularLight);
|
||||
glMateriali(GL_FRONT, GL_SHININESS, 98);
|
||||
glLightfv(GL_LIGHT0, GL_POSITION, position2);
|
||||
//glLightfv(GL_LIGHT1, GL_POSITION, position2);
|
||||
|
||||
glEnable(GL_LIGHT0);
|
||||
//glEnable(GL_LIGHT1);
|
||||
glColorMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE);
|
||||
//glColorMaterial(GL_FRONT, GL_SPECULAR);
|
||||
glEnable(GL_COLOR_MATERIAL);
|
||||
glShadeModel(GL_SMOOTH);
|
||||
glCullFace( GL_BACK );
|
||||
glEnable( GL_CULL_FACE );
|
||||
|
||||
glEnable(GL_POLYGON_SMOOTH);
|
||||
/*glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA_SATURATE, GL_ONE);
|
||||
//glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
glHint(GL_POLYGON_SMOOTH_HINT,GL_NICEST);*/
|
||||
|
||||
}
|
||||
|
||||
void normvector(float a, float aa, float aaa, float b, float bb, float bbb, float c, float cc, float ccc,float *result){
|
||||
float v1[3];float v2[3];float tmp;
|
||||
|
||||
v1[0]=(b-a);v1[1]=(bb-aa);v1[2]=(bbb-aaa);
|
||||
v2[0]=(b-c);v2[1]=(bb-cc);v2[2]=(bbb-ccc);
|
||||
result[0]=(v1[1]*v2[2]-v1[2]*v2[1]);
|
||||
result[1]=(v1[2]*v2[0]-v1[0]*v2[2]);
|
||||
result[2]=(v1[0]*v2[1]-v1[1]*v2[0]);
|
||||
tmp=sqrt(result[0]*result[0]+result[1]*result[1]+result[2]*result[2]);
|
||||
result[0]/=tmp;
|
||||
result[1]/=tmp;
|
||||
result[2]/=tmp;
|
||||
}
|
||||
|
||||
|
||||
void redraw(XEvent * v,void *xw){
|
||||
Window win;
|
||||
float z[3];
|
||||
|
||||
win = *(Window *)xw;
|
||||
|
||||
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
|
||||
glPushMatrix(); glShadeModel(GL_SMOOTH);
|
||||
|
||||
glRotatef(alpha, 0, 1, 0);
|
||||
if (alpha > 360) alpha =alpha-360;
|
||||
|
||||
glBegin(GL_TRIANGLES);
|
||||
|
||||
glColor3f(redb,greenb,blueb);
|
||||
normvector(-0.85f, 0.0f, 0.0f,0.0f, 0.0f, 0.85f,0.0f, 0.6f, 0.0f,z);
|
||||
glNormal3fv(z);
|
||||
glVertex3f(-0.85f, 0.0f, 0.0f);
|
||||
glVertex3f(0.0f, 0.0f, 0.85f);
|
||||
glVertex3f(0.0f, 0.6f, 0.0f);
|
||||
|
||||
normvector(0.0f, 0.0f,0.85f,0.85f, 0.0f, 0.0f,0.0f, 0.60f,0.0f,z);
|
||||
glNormal3fv(z);
|
||||
glVertex3f(0.0f, 0.0f, 0.85f);
|
||||
glVertex3f(0.85f, 0.0f, 0.0f);
|
||||
glVertex3f(0.0f, 0.6f, 0.0f);
|
||||
|
||||
glColor3f(red,green,blue);
|
||||
normvector(0.85f, 0.0f, 0.0f,0.0f, 0.0f, -0.85f,0.0f, 0.6f, 0.0f,z);
|
||||
glNormal3fv(z);
|
||||
glVertex3f(0.85f, 0.0f, 0.0f);
|
||||
glVertex3f(0.0f, 0.0f, -0.85f);
|
||||
glVertex3f(0.0f, 0.6f, 0.0f);
|
||||
|
||||
normvector(0.0f, 0.0f, -0.85f,-0.85f, 0.0f, 0.0f,0.0f, 0.6f, 0.0f,z);
|
||||
glNormal3fv(z);
|
||||
glVertex3f(0.0f, 0.0f, -0.85f);
|
||||
glVertex3f(-0.85f, 0.0f, 0.0f);
|
||||
glVertex3f(0.0f, 0.6f, 0.0f);
|
||||
|
||||
glColor3f(redb,greenb,blueb);
|
||||
normvector(-0.85f, 0.0f, 0.0f,0.0f, -1.0f, 0.0f,0.0f, 0.0f, 0.85f,z);
|
||||
glNormal3fv(z);
|
||||
glVertex3f(-0.85f, 0.0f, 0.0f);
|
||||
glVertex3f(0.0f, -1.0f, 0.0f);
|
||||
glVertex3f(0.0f, 0.0f, 0.85f);
|
||||
|
||||
normvector(0.0f, 0.0f, 0.85f, 0.0f, -1.0f, 0.0f,0.85f, 0.0f, 0.0f ,z);
|
||||
glNormal3fv(z);
|
||||
glVertex3f(0.0f, 0.0f, 0.85f);
|
||||
glVertex3f(0.0f, -1.0f, 0.0f);
|
||||
glVertex3f(0.85f, 0.0f, 0.0f);
|
||||
|
||||
glColor3f(red,green,blue);
|
||||
normvector(0.85f, 0.0f, 0.0f,0.0f, -1.0f, 0.0f, 0.0f, 0.0,-0.85f ,z);
|
||||
glNormal3fv(z);
|
||||
glVertex3f(0.85f, 0.0f, 0.0f);
|
||||
glVertex3f(0.0f,-1.0f, 0.0f);
|
||||
glVertex3f(0.0f, 0.0f, -0.85f);
|
||||
|
||||
normvector(0.0f, 0.0f, -0.85f,0.0f, -1.0f, 0.0f, -0.85f, 0.0f,0.0f ,z);
|
||||
glNormal3fv(z);
|
||||
glVertex3f(0.0f, 0.0f, -0.85f);
|
||||
glVertex3f(0.0f, -1.0f, 0.0f);
|
||||
glVertex3f(-0.85f, 0.0f, 0.0f);
|
||||
|
||||
glEnd();
|
||||
|
||||
glPopMatrix();
|
||||
glXSwapBuffers(display, win);
|
||||
}
|
||||
|
||||
setsize(unsigned int width, unsigned int height)
|
||||
{
|
||||
glViewport(0, 0, width, height);
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0);
|
||||
glMatrixMode (GL_MODELVIEW);
|
||||
}
|
||||
|
||||
void DoRotate(void *self,void *xwindow){
|
||||
XEvent event;int i=0;
|
||||
alpha+=15;
|
||||
redraw(NULL,(Window *)xwindow);
|
||||
}
|
||||
|
||||
void redo(XEvent * event,void *xw){
|
||||
switch (event->type)
|
||||
{
|
||||
case Expose:
|
||||
if (event->xexpose.count!=0) break;
|
||||
redraw(event,&event->xexpose.window);
|
||||
break;
|
||||
case ConfigureNotify: setsize(event->xconfigure.width, event->xconfigure.height); // assuming there will be an expose afterwards
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void closeAll(WMWidget *self,void *data){
|
||||
WMDestroyWidget(self);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
static void resizeHandler(void *data, WMNotification *notif){
|
||||
struct couple *tmp;tmp=(struct couple *)data;
|
||||
WMSize size = WMGetViewSize(WMWidgetView(tmp->window));
|
||||
WMResizeWidget(tmp->frame, size.width -2*CONTENTMARGIN, size.height-2*CONTENTMARGIN);
|
||||
}
|
||||
|
||||
void getargs(int argc, char **argv){
|
||||
if (argc>3) {
|
||||
redb=red=(float)atoi(argv[1])/256;
|
||||
greenb=green=(float)atoi(argv[2])/256;
|
||||
blueb=blue=(float)atoi(argv[3])/256;
|
||||
}
|
||||
if (argc>6){
|
||||
redb=(float)atoi(argv[4])/256;
|
||||
greenb=(float)atoi(argv[5])/256;
|
||||
blueb=(float)atoi(argv[6])/256;
|
||||
}
|
||||
}
|
||||
|
||||
int main (int argc, char **argv){
|
||||
|
||||
WMFrame *glframe;
|
||||
WMScreen *screen;
|
||||
WMWindow *window;
|
||||
WMButton *Button;
|
||||
|
||||
|
||||
/* Xlib and glX variables */
|
||||
Window win;
|
||||
XVisualInfo *xvVisualInfo;
|
||||
Colormap cmColorMap;
|
||||
XSetWindowAttributes winAttr;
|
||||
GLXContext glXContext;
|
||||
|
||||
getargs(argc,argv);
|
||||
WMInitializeApplication("GLWindow", &argc, argv);
|
||||
display = XOpenDisplay("");
|
||||
screen = WMCreateScreen(display, DefaultScreen(display));
|
||||
|
||||
if(!glXQueryExtension(display, NULL, NULL)){wwarning("X server does not have GLX\n"); return 0; }
|
||||
|
||||
window = WMCreateWindow(screen, "Main");
|
||||
WMResizeWidget(window, CONTENTW+2*CONTENTMARGIN, CONTENTH+2*CONTENTMARGIN*CONTENTH/CONTENTW);
|
||||
WMSetWindowAspectRatio(window, CONTENTW,CONTENTH,CONTENTW,CONTENTH);
|
||||
WMSetWindowCloseAction(window, closeAll, NULL);
|
||||
WMSetWindowTitle(window,"GL Frame");
|
||||
WMRealizeWidget(window);
|
||||
datacouple.window=window;
|
||||
WMSetViewNotifySizeChanges(WMWidgetView(window), True);
|
||||
WMAddNotificationObserver(resizeHandler, &datacouple, WMViewSizeDidChangeNotification, WMWidgetView(window));
|
||||
|
||||
|
||||
glframe = WMCreateFrame(window);
|
||||
datacouple.frame=glframe;
|
||||
WMResizeWidget(glframe, CONTENTW, CONTENTH);
|
||||
WMMoveWidget(glframe, CONTENTMARGIN,CONTENTMARGIN);
|
||||
WMRealizeWidget(glframe);
|
||||
|
||||
Button=WMCreateButton(window, WBTMomentaryPush);
|
||||
WMSetButtonAction(Button, DoRotate,&win);
|
||||
WMSetButtonText(Button,"Turn");
|
||||
WMMoveWidget(Button, CONTENTMARGIN,2);
|
||||
WMRealizeWidget(Button);
|
||||
WMMapWidget(Button);
|
||||
|
||||
/* get the frame's X window value */
|
||||
win =W_VIEW_DRAWABLE(WMWidgetView(glframe));
|
||||
WMCreateEventHandler(WMWidgetView(glframe), ExposureMask|StructureNotifyMask,redo,&win);
|
||||
|
||||
xvVisualInfo = glXChooseVisual(display, DefaultScreen(display), Attr);
|
||||
if(xvVisualInfo == NULL) {wwarning("No visualinfo\n");return 0;}
|
||||
|
||||
cmColorMap = XCreateColormap(display,RootWindow(display, DefaultScreen(display)), xvVisualInfo->visual, AllocNone);
|
||||
|
||||
winAttr.colormap = cmColorMap;
|
||||
winAttr.border_pixel = 0;
|
||||
winAttr.background_pixel = 0;
|
||||
winAttr.event_mask = ExposureMask | ButtonPressMask |StructureNotifyMask| KeyPressMask;
|
||||
|
||||
XChangeWindowAttributes(display,win,CWBorderPixel | CWColormap | CWEventMask,&winAttr);
|
||||
glXContext = glXCreateContext(display, xvVisualInfo, None, True);
|
||||
if(!glXContext) {wwarning("glX cannot create rendering context\n");return 0;}
|
||||
|
||||
glXMakeCurrent(display, win, glXContext);
|
||||
|
||||
WMMapWidget(glframe);
|
||||
init();
|
||||
setsize(CONTENTW,CONTENTH);
|
||||
WMMapWidget(window);
|
||||
|
||||
WMScreenMainLoop(screen);
|
||||
|
||||
return 0;
|
||||
}
|
||||
285
WINGs_tutorial/glframe.c.1
Normal file
@@ -0,0 +1,285 @@
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xatom.h>
|
||||
#include <X11/keysym.h>
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
|
||||
#include <WINGs/WINGs.h>
|
||||
#include <WINGs/WINGsP.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define CONTENTH 300
|
||||
#define CONTENTW 300
|
||||
#define CONTENTMARGIN 30
|
||||
|
||||
|
||||
struct couple{
|
||||
WMWindow *window;
|
||||
WMFrame *frame;
|
||||
} datacouple;
|
||||
|
||||
|
||||
float red=252.0/256, green=88.0/256, blue=16.0/256;
|
||||
float redb=252.0/256, greenb=242.0/256, blueb=80.0/256;
|
||||
|
||||
int Attr[] = { GLX_RGBA,
|
||||
GLX_RED_SIZE, 8,
|
||||
GLX_GREEN_SIZE, 8,
|
||||
GLX_BLUE_SIZE, 8,
|
||||
GLX_DEPTH_SIZE, 16,
|
||||
GLX_DOUBLEBUFFER,
|
||||
None};
|
||||
Display * display;
|
||||
float alpha=0;
|
||||
|
||||
void init(void)
|
||||
{
|
||||
glClearColor (256/256, 256/256, 256/256, 0.0);
|
||||
glPolygonMode(GL_FRONT, GL_FILL);
|
||||
glPolygonMode(GL_BACK, GL_FILL);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glShadeModel(GL_SMOOTH);
|
||||
|
||||
glEnable(GL_LIGHTING);
|
||||
GLfloat ambientLight[] = { 0.2f, 0.2f, 0.2f, 1.0f };
|
||||
GLfloat diffuseLight[] = { 0.8f, 0.8f, 0.8f, 1.0f };
|
||||
GLfloat specularLight[] = { 0.5f, 0.5f, 0.5f, 1.0f };
|
||||
GLfloat position[] = { 2.0f, -0.1f, 2.0f, 1.0f };
|
||||
GLfloat position2[] = { -2.0f, -0.26f, -4.0f, 1.0f };
|
||||
glLightModelfv(GL_LIGHT_MODEL_AMBIENT, ambientLight);
|
||||
glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuseLight);
|
||||
//glLightfv(GL_LIGHT0, GL_SPECULAR, specularLight);
|
||||
glMateriali(GL_FRONT, GL_SHININESS, 98);
|
||||
glLightfv(GL_LIGHT0, GL_POSITION, position2);
|
||||
//glLightfv(GL_LIGHT1, GL_POSITION, position2);
|
||||
|
||||
glEnable(GL_LIGHT0);
|
||||
//glEnable(GL_LIGHT1);
|
||||
glColorMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE);
|
||||
//glColorMaterial(GL_FRONT, GL_SPECULAR);
|
||||
glEnable(GL_COLOR_MATERIAL);
|
||||
glShadeModel(GL_SMOOTH);
|
||||
glCullFace( GL_BACK );
|
||||
glEnable( GL_CULL_FACE );
|
||||
|
||||
glEnable(GL_POLYGON_SMOOTH);
|
||||
/*glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA_SATURATE, GL_ONE);
|
||||
//glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
glHint(GL_POLYGON_SMOOTH_HINT,GL_NICEST);*/
|
||||
|
||||
}
|
||||
|
||||
void normvector(float a, float aa, float aaa, float b, float bb, float bbb, float c, float cc, float ccc,float *result){
|
||||
float v1[3];float v2[3];float tmp;
|
||||
|
||||
v1[0]=(b-a);v1[1]=(bb-aa);v1[2]=(bbb-aaa);
|
||||
v2[0]=(b-c);v2[1]=(bb-cc);v2[2]=(bbb-ccc);
|
||||
result[0]=(v1[1]*v2[2]-v1[2]*v2[1]);
|
||||
result[1]=(v1[2]*v2[0]-v1[0]*v2[2]);
|
||||
result[2]=(v1[0]*v2[1]-v1[1]*v2[0]);
|
||||
tmp=sqrt(result[0]*result[0]+result[1]*result[1]+result[2]*result[2]);
|
||||
result[0]/=tmp;
|
||||
result[1]/=tmp;
|
||||
result[2]/=tmp;
|
||||
}
|
||||
|
||||
|
||||
void redraw(XEvent * v,void *xw){
|
||||
Window win;
|
||||
float z[3];
|
||||
|
||||
win = *(Window *)xw;
|
||||
|
||||
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
|
||||
glPushMatrix(); glShadeModel(GL_SMOOTH);
|
||||
|
||||
glRotatef(alpha, 0, 1, 0);
|
||||
if (alpha > 360) alpha =alpha-360;
|
||||
|
||||
glBegin(GL_TRIANGLES);
|
||||
|
||||
glColor3f(redb,greenb,blueb);
|
||||
normvector(-0.85f, 0.0f, 0.0f,0.0f, 0.0f, 0.85f,0.0f, 0.6f, 0.0f,z);
|
||||
glNormal3fv(z);
|
||||
glVertex3f(-0.85f, 0.0f, 0.0f);
|
||||
glVertex3f(0.0f, 0.0f, 0.85f);
|
||||
glVertex3f(0.0f, 0.6f, 0.0f);
|
||||
|
||||
normvector(0.0f, 0.0f,0.85f,0.85f, 0.0f, 0.0f,0.0f, 0.60f,0.0f,z);
|
||||
glNormal3fv(z);
|
||||
glVertex3f(0.0f, 0.0f, 0.85f);
|
||||
glVertex3f(0.85f, 0.0f, 0.0f);
|
||||
glVertex3f(0.0f, 0.6f, 0.0f);
|
||||
|
||||
glColor3f(red,green,blue);
|
||||
normvector(0.85f, 0.0f, 0.0f,0.0f, 0.0f, -0.85f,0.0f, 0.6f, 0.0f,z);
|
||||
glNormal3fv(z);
|
||||
glVertex3f(0.85f, 0.0f, 0.0f);
|
||||
glVertex3f(0.0f, 0.0f, -0.85f);
|
||||
glVertex3f(0.0f, 0.6f, 0.0f);
|
||||
|
||||
normvector(0.0f, 0.0f, -0.85f,-0.85f, 0.0f, 0.0f,0.0f, 0.6f, 0.0f,z);
|
||||
glNormal3fv(z);
|
||||
glVertex3f(0.0f, 0.0f, -0.85f);
|
||||
glVertex3f(-0.85f, 0.0f, 0.0f);
|
||||
glVertex3f(0.0f, 0.6f, 0.0f);
|
||||
|
||||
glColor3f(redb,greenb,blueb);
|
||||
normvector(-0.85f, 0.0f, 0.0f,0.0f, -1.0f, 0.0f,0.0f, 0.0f, 0.85f,z);
|
||||
glNormal3fv(z);
|
||||
glVertex3f(-0.85f, 0.0f, 0.0f);
|
||||
glVertex3f(0.0f, -1.0f, 0.0f);
|
||||
glVertex3f(0.0f, 0.0f, 0.85f);
|
||||
|
||||
normvector(0.0f, 0.0f, 0.85f, 0.0f, -1.0f, 0.0f,0.85f, 0.0f, 0.0f ,z);
|
||||
glNormal3fv(z);
|
||||
glVertex3f(0.0f, 0.0f, 0.85f);
|
||||
glVertex3f(0.0f, -1.0f, 0.0f);
|
||||
glVertex3f(0.85f, 0.0f, 0.0f);
|
||||
|
||||
glColor3f(red,green,blue);
|
||||
normvector(0.85f, 0.0f, 0.0f,0.0f, -1.0f, 0.0f, 0.0f, 0.0,-0.85f ,z);
|
||||
glNormal3fv(z);
|
||||
glVertex3f(0.85f, 0.0f, 0.0f);
|
||||
glVertex3f(0.0f,-1.0f, 0.0f);
|
||||
glVertex3f(0.0f, 0.0f, -0.85f);
|
||||
|
||||
normvector(0.0f, 0.0f, -0.85f,0.0f, -1.0f, 0.0f, -0.85f, 0.0f,0.0f ,z);
|
||||
glNormal3fv(z);
|
||||
glVertex3f(0.0f, 0.0f, -0.85f);
|
||||
glVertex3f(0.0f, -1.0f, 0.0f);
|
||||
glVertex3f(-0.85f, 0.0f, 0.0f);
|
||||
|
||||
glEnd();
|
||||
|
||||
glPopMatrix();
|
||||
glXSwapBuffers(display, win);
|
||||
}
|
||||
|
||||
setsize(unsigned int width, unsigned int height)
|
||||
{
|
||||
glViewport(0, 0, width, height);
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0);
|
||||
glMatrixMode (GL_MODELVIEW);
|
||||
}
|
||||
|
||||
void DoRotate(void *self,void *xwindow){
|
||||
XEvent event;int i=0;
|
||||
alpha+=15;
|
||||
redraw(NULL,(Window *)xwindow);
|
||||
}
|
||||
|
||||
void redo(XEvent * event,void *xw){
|
||||
switch (event->type)
|
||||
{
|
||||
case Expose:
|
||||
if (event->xexpose.count!=0) break;
|
||||
redraw(event,&event->xexpose.window);
|
||||
break;
|
||||
case ConfigureNotify: setsize(event->xconfigure.width, event->xconfigure.height); // assuming there will be an expose afterwards
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void closeAll(WMWidget *self,void *data){
|
||||
WMDestroyWidget(self);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
static void resizeHandler(void *data, WMNotification *notif){
|
||||
struct couple *tmp;tmp=(struct couple *)data;
|
||||
WMSize size = WMGetViewSize(WMWidgetView(tmp->window));
|
||||
WMResizeWidget(tmp->frame, size.width -2*CONTENTMARGIN, size.height-2*CONTENTMARGIN);
|
||||
}
|
||||
|
||||
void getargs(int argc, char **argv){
|
||||
if (argc>3) {
|
||||
redb=red=(float)atoi(argv[1])/256;
|
||||
greenb=green=(float)atoi(argv[2])/256;
|
||||
blueb=blue=(float)atoi(argv[3])/256;
|
||||
}
|
||||
if (argc>6){
|
||||
redb=(float)atoi(argv[4])/256;
|
||||
greenb=(float)atoi(argv[5])/256;
|
||||
blueb=(float)atoi(argv[6])/256;
|
||||
}
|
||||
}
|
||||
|
||||
int main (int argc, char **argv){
|
||||
|
||||
WMFrame *glframe;
|
||||
WMScreen *screen;
|
||||
WMWindow *window;
|
||||
WMButton *Button;
|
||||
|
||||
|
||||
/* Xlib and glX variables */
|
||||
Window win;
|
||||
XVisualInfo *xvVisualInfo;
|
||||
Colormap cmColorMap;
|
||||
XSetWindowAttributes winAttr;
|
||||
GLXContext glXContext;
|
||||
|
||||
getargs(argc,argv);
|
||||
WMInitializeApplication("GLWindow", &argc, argv);
|
||||
display = XOpenDisplay("");
|
||||
screen = WMCreateScreen(display, DefaultScreen(display));
|
||||
|
||||
if(!glXQueryExtension(display, NULL, NULL)){wwarning("X server does not have GLX\n"); return 0; }
|
||||
|
||||
window = WMCreateWindow(screen, "Main");
|
||||
WMResizeWidget(window, CONTENTW+2*CONTENTMARGIN, CONTENTH+2*CONTENTMARGIN*CONTENTH/CONTENTW);
|
||||
WMSetWindowAspectRatio(window, CONTENTW,CONTENTH,CONTENTW,CONTENTH);
|
||||
WMSetWindowCloseAction(window, closeAll, NULL);
|
||||
WMSetWindowTitle(window,"GL Frame");
|
||||
WMRealizeWidget(window);
|
||||
datacouple.window=window;
|
||||
WMSetViewNotifySizeChanges(WMWidgetView(window), True);
|
||||
WMAddNotificationObserver(resizeHandler, &datacouple, WMViewSizeDidChangeNotification, WMWidgetView(window));
|
||||
|
||||
|
||||
glframe = WMCreateFrame(window);
|
||||
datacouple.frame=glframe;
|
||||
WMResizeWidget(glframe, CONTENTW, CONTENTH);
|
||||
WMMoveWidget(glframe, CONTENTMARGIN,CONTENTMARGIN);
|
||||
WMRealizeWidget(glframe);
|
||||
|
||||
Button=WMCreateButton(window, WBTMomentaryPush);
|
||||
WMSetButtonAction(Button, DoRotate,&win);
|
||||
WMSetButtonText(Button,"Turn");
|
||||
WMMoveWidget(Button, CONTENTMARGIN,2);
|
||||
WMRealizeWidget(Button);
|
||||
WMMapWidget(Button);
|
||||
|
||||
/* get the frame's X window value */
|
||||
win =W_VIEW_DRAWABLE(WMWidgetView(glframe));
|
||||
WMCreateEventHandler(WMWidgetView(glframe), ExposureMask|StructureNotifyMask,redo,&win);
|
||||
|
||||
xvVisualInfo = glXChooseVisual(display, DefaultScreen(display), Attr);
|
||||
if(xvVisualInfo == NULL) {wwarning("No visualinfo\n");return 0;}
|
||||
|
||||
cmColorMap = XCreateColormap(display,RootWindow(display, DefaultScreen(display)), xvVisualInfo->visual, AllocNone);
|
||||
|
||||
winAttr.colormap = cmColorMap;
|
||||
winAttr.border_pixel = 0;
|
||||
winAttr.background_pixel = 0;
|
||||
winAttr.event_mask = ExposureMask | ButtonPressMask |StructureNotifyMask| KeyPressMask;
|
||||
|
||||
XChangeWindowAttributes(display,win,CWBorderPixel | CWColormap | CWEventMask,&winAttr);
|
||||
glXContext = glXCreateContext(display, xvVisualInfo, None, True);
|
||||
if(!glXContext) {wwarning("glX cannot create rendering context\n");return 0;}
|
||||
|
||||
glXMakeCurrent(display, win, glXContext);
|
||||
|
||||
WMMapWidget(glframe);
|
||||
init();
|
||||
setsize(CONTENTW,CONTENTH);
|
||||
WMMapWidget(window);
|
||||
|
||||
WMScreenMainLoop(screen);
|
||||
|
||||
return 0;
|
||||
}
|
||||
119
dev/index.html
Normal file
@@ -0,0 +1,119 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Window Maker: Development</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="/style.css" media="screen">
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, minimumscale=1.0, maximum-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<header>
|
||||
<h1>
|
||||
<a href="/">
|
||||
<span class="first">Window</span><span class="second">Maker</span>
|
||||
</a>
|
||||
</h1>
|
||||
</header>
|
||||
<aside>
|
||||
<nav class="menu">
|
||||
<ul>
|
||||
<li id="dock">
|
||||
<a href="#"></a>
|
||||
</li>
|
||||
<li id="home" title="Home">
|
||||
<a href="/">Home</a>
|
||||
</li>
|
||||
<li id="news" title="News">
|
||||
<a href="/news">News</a>
|
||||
</li>
|
||||
<li id="docs" title="Documentation">
|
||||
<a href="/docs">Documentation</a>
|
||||
</li>
|
||||
<li id="mail" title="Mailing lists">
|
||||
<a href="/lists">Mailing</a>
|
||||
</li>
|
||||
<li id="devel" title="Development">
|
||||
<a href="/dev">Development</a>
|
||||
</li>
|
||||
<li id="screenshots" title="Screenshots">
|
||||
<a href="/screenshots">Screenshots</a>
|
||||
</li>
|
||||
<li id="themes" title="Themes">
|
||||
<a href="/themes">Themes</a>
|
||||
</li>
|
||||
<li id="links" title="Links">
|
||||
<a href="/links">Links</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</aside>
|
||||
<article>
|
||||
<h1 id="development">Development</h1>
|
||||
|
||||
<p>Here are some pieces of information regarding development in Window Maker.</p>
|
||||
|
||||
<h2 id="source-code-versioning-system">Source code versioning system</h2>
|
||||
|
||||
<p>The source code for Window Maker is contained in a <a href="http://git-scm.com/">git</a>
|
||||
repository located <a href="http://repo.or.cz/w/wmaker-crm.git">here</a>. To obtain a
|
||||
full-fledged copy of the repository do this:</p>
|
||||
|
||||
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>git clone git://repo.or.cz/wmaker-crm.git
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>There are two main branches in the repository, called ‘master’ and ‘next’. The
|
||||
purpose of the ‘next’ branch is to add and extra layer of testing before the
|
||||
patches hit the ‘master’ branch. It is rebased when needed. The ‘master’ branch
|
||||
should ideally never be rebased – if it is, run to the nearest
|
||||
anti-nuclear bunker.</p>
|
||||
|
||||
<h2 id="submitting-patches">Submitting patches</h2>
|
||||
|
||||
<p>The Window Maker source code follows the
|
||||
<a href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst">coding style of the linux kernel</a>.
|
||||
Respect it when submitting patches.</p>
|
||||
|
||||
<p>If you are not familiar with git, take a look at the
|
||||
<a href="http://git-scm.com/">git homepage</a> – it contains the kind of documentation you
|
||||
need to get started. You should also read the file contained in the Window Maker
|
||||
repository <a href="http://repo.or.cz/w/wmaker-crm.git/blob/HEAD:/The-perfect-Window-Maker-patch.txt">The perfect Window Maker
|
||||
patch</a>
|
||||
which gives you further details about patches to Window Maker.</p>
|
||||
|
||||
<p>Patches not submitted according to the above guidelines will not be accepted.</p>
|
||||
|
||||
<p>Last but not least, patches doing code cleanups are <strong>STRONGLY</strong> encouraged.</p>
|
||||
|
||||
<h2 id="git-repository-for-dockapps">Git repository for dockapps</h2>
|
||||
|
||||
<p>There is also a <a href="http://repo.or.cz/w/dockapps.git">git repository</a> containing a
|
||||
few dockapps which apparently have no maintainers anymore. Patches for those
|
||||
dockapps (or to include more apps) can also be sent to
|
||||
<a href="mailto:wmaker-dev@googlegroups.com">wmaker-dev@googlegroups.com</a>.</p>
|
||||
|
||||
<h2 id="some-sources-of-information">Some sources of information</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="/docs/wings.html">The Window Maker WINGs library</a>.</li>
|
||||
<li><a href="http://tronche.com/gui/x/xlib/">The Xlib Manual</a></li>
|
||||
</ul>
|
||||
|
||||
</article>
|
||||
<div id="titlebar">
|
||||
<div id="minimize"></div>
|
||||
<div id="titlebar-inner">Window Maker: Development</div>
|
||||
<div id="close"></div>
|
||||
</div>
|
||||
<div id="resizebar">
|
||||
<div id="resizel"></div>
|
||||
<div id="resizebar-inner">
|
||||
</div>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
10
dockapps/index.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Window Maker: Dockapps</title>
|
||||
<meta http-equiv="refresh" content="0; URL=https://www.dockapps.net">
|
||||
</head>
|
||||
<body>
|
||||
Dockapps have moved to <a href="https://www.dockapps.net">dockapps.net</a>.
|
||||
</body>
|
||||
</html>
|
||||
1864
docs/FAQ.html
Normal file
2313
docs/FAQ.rst
Normal file
120
docs/chap1.html
Normal file
@@ -0,0 +1,120 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Window Maker: User Guide - Introduction</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="/style.css" media="screen">
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, minimumscale=1.0, maximum-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<header>
|
||||
<h1>
|
||||
<a href="/">
|
||||
<span class="first">Window</span><span class="second">Maker</span>
|
||||
</a>
|
||||
</h1>
|
||||
</header>
|
||||
<aside>
|
||||
<nav class="menu">
|
||||
<ul>
|
||||
<li id="dock">
|
||||
<a href="#"></a>
|
||||
</li>
|
||||
<li id="home" title="Home">
|
||||
<a href="/">Home</a>
|
||||
</li>
|
||||
<li id="news" title="News">
|
||||
<a href="/news">News</a>
|
||||
</li>
|
||||
<li id="docs" title="Documentation">
|
||||
<a href="/docs">Documentation</a>
|
||||
</li>
|
||||
<li id="mail" title="Mailing lists">
|
||||
<a href="/lists">Mailing</a>
|
||||
</li>
|
||||
<li id="devel" title="Development">
|
||||
<a href="/dev">Development</a>
|
||||
</li>
|
||||
<li id="screenshots" title="Screenshots">
|
||||
<a href="/screenshots">Screenshots</a>
|
||||
</li>
|
||||
<li id="themes" title="Themes">
|
||||
<a href="/themes">Themes</a>
|
||||
</li>
|
||||
<li id="links" title="Links">
|
||||
<a href="/links">Links</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</aside>
|
||||
<article>
|
||||
|
||||
<div class="document" id="introduction">
|
||||
<h1 class="title">Introduction</h1>
|
||||
|
||||
<p>This manual describes the usage and configuration of the Window Maker window
|
||||
manager. It is intended for both users who never used the X Window System and
|
||||
for users who have experience with other window managers.</p>
|
||||
<p>How to Read this guide If you never have used a X window manager, you should
|
||||
read all of this guide, as it contains detailed instructions for new users.</p>
|
||||
<p>Text in sans serif font, indicate instructions you must follow to accomplish a
|
||||
given task. If you're out of time (or patience), you should at least read text
|
||||
in these parts.</p>
|
||||
<p>You can ignore the text in Extra Bindings boxes while you're getting familiar
|
||||
with Window Maker. Once you've got familiar with it, you can read the text in
|
||||
these boxes to learn more ways to accomplish tasks.</p>
|
||||
<div class="section" id="what-is-a-window-manager">
|
||||
<h1>What is a window manager?</h1>
|
||||
<p>If you come from the Windows or MacOS world, you might be confused about all
|
||||
these things like window managers, X windows etc.</p>
|
||||
<p>In the Unix world, the task of providing a graphical user interface (GUI) is
|
||||
normally divided by 3 different components:</p>
|
||||
<p>the window server; the window manager and the user interface toolkit. The
|
||||
window server is standard and is usually the X Window System or some vendor
|
||||
provided compatible version of it. The X Window System, or X for short, is a
|
||||
window server. It's function is to provide a portable and high-level access to
|
||||
devices like keyboard, mouse and video display. It allows applications to show
|
||||
graphical information on the display through rectangular areas called windows.</p>
|
||||
<p>Most user interface objects, like buttons, menus and scrollers are made of
|
||||
windows. The top level windows displayed by applications are named windows as
|
||||
well. These objects are not provided by the window server. These must be made
|
||||
by the application program or by the user interface toolkit.</p>
|
||||
<p>For more information, read the manual page for X(1) and the documentation for
|
||||
Xlib.</p>
|
||||
<p>The primary function of the window manager is to control the layout of top
|
||||
level windows on screen. Window Maker is a window manager. It provides a
|
||||
titlebar and a resizebar to change window layout, application menus to launch
|
||||
applications and execute special commands, application icons, miniwindows and
|
||||
an application dock. They will be explained in more detail in the following
|
||||
chapters.</p>
|
||||
<p>The user interface toolkit is a library or collection of libraries that provide
|
||||
an API for application developers to program the interfaces for their
|
||||
applications. Toolkits generally provide controls like buttons, menus,
|
||||
radio-buttons etc to be used for program interaction. There are currently many
|
||||
of these toolkits available for X. Motif, OpenLook, and Athena are examples of
|
||||
toolkits.</p>
|
||||
<p>All other features normally found in other operating systems, like file
|
||||
managers, are implemented as separate programs and are not directly related to
|
||||
the window manager.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</article>
|
||||
<div id="titlebar">
|
||||
<div id="minimize"></div>
|
||||
<div id="titlebar-inner">Window Maker: User Guide - Introduction</div>
|
||||
<div id="close"></div>
|
||||
</div>
|
||||
<div id="resizebar">
|
||||
<div id="resizel"></div>
|
||||
<div id="resizebar-inner">
|
||||
</div>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
129
docs/chap1.rst
Normal file
@@ -0,0 +1,129 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Window Maker: User Guide - Introduction</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="/style.css" media="screen">
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, minimumscale=1.0, maximum-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<header>
|
||||
<h1>
|
||||
<a href="/">
|
||||
<span class="first">Window</span><span class="second">Maker</span>
|
||||
</a>
|
||||
</h1>
|
||||
</header>
|
||||
<aside>
|
||||
<nav class="menu">
|
||||
<ul>
|
||||
<li id="dock">
|
||||
<a href="#"></a>
|
||||
</li>
|
||||
<li id="home" title="Home">
|
||||
<a href="/">Home</a>
|
||||
</li>
|
||||
<li id="news" title="News">
|
||||
<a href="/news">News</a>
|
||||
</li>
|
||||
<li id="docs" title="Documentation">
|
||||
<a href="/docs">Documentation</a>
|
||||
</li>
|
||||
<li id="mail" title="Mailing lists">
|
||||
<a href="/lists">Mailing</a>
|
||||
</li>
|
||||
<li id="devel" title="Development">
|
||||
<a href="/dev">Development</a>
|
||||
</li>
|
||||
<li id="screenshots" title="Screenshots">
|
||||
<a href="/screenshots">Screenshots</a>
|
||||
</li>
|
||||
<li id="themes" title="Themes">
|
||||
<a href="/themes">Themes</a>
|
||||
</li>
|
||||
<li id="links" title="Links">
|
||||
<a href="/links">Links</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</aside>
|
||||
<article>
|
||||
Introduction
|
||||
============
|
||||
|
||||
This manual describes the usage and configuration of the Window Maker window
|
||||
manager. It is intended for both users who never used the X Window System and
|
||||
for users who have experience with other window managers.
|
||||
|
||||
How to Read this guide If you never have used a X window manager, you should
|
||||
read all of this guide, as it contains detailed instructions for new users.
|
||||
|
||||
Text in sans serif font, indicate instructions you must follow to accomplish a
|
||||
given task. If you're out of time (or patience), you should at least read text
|
||||
in these parts.
|
||||
|
||||
You can ignore the text in Extra Bindings boxes while you're getting familiar
|
||||
with Window Maker. Once you've got familiar with it, you can read the text in
|
||||
these boxes to learn more ways to accomplish tasks.
|
||||
|
||||
What is a window manager?
|
||||
-------------------------
|
||||
|
||||
If you come from the Windows or MacOS world, you might be confused about all
|
||||
these things like window managers, X windows etc.
|
||||
|
||||
In the Unix world, the task of providing a graphical user interface (GUI) is
|
||||
normally divided by 3 different components:
|
||||
|
||||
the window server; the window manager and the user interface toolkit. The
|
||||
window server is standard and is usually the X Window System or some vendor
|
||||
provided compatible version of it. The X Window System, or X for short, is a
|
||||
window server. It's function is to provide a portable and high-level access to
|
||||
devices like keyboard, mouse and video display. It allows applications to show
|
||||
graphical information on the display through rectangular areas called windows.
|
||||
|
||||
Most user interface objects, like buttons, menus and scrollers are made of
|
||||
windows. The top level windows displayed by applications are named windows as
|
||||
well. These objects are not provided by the window server. These must be made
|
||||
by the application program or by the user interface toolkit.
|
||||
|
||||
For more information, read the manual page for X(1) and the documentation for
|
||||
Xlib.
|
||||
|
||||
The primary function of the window manager is to control the layout of top
|
||||
level windows on screen. Window Maker is a window manager. It provides a
|
||||
titlebar and a resizebar to change window layout, application menus to launch
|
||||
applications and execute special commands, application icons, miniwindows and
|
||||
an application dock. They will be explained in more detail in the following
|
||||
chapters.
|
||||
|
||||
The user interface toolkit is a library or collection of libraries that provide
|
||||
an API for application developers to program the interfaces for their
|
||||
applications. Toolkits generally provide controls like buttons, menus,
|
||||
radio-buttons etc to be used for program interaction. There are currently many
|
||||
of these toolkits available for X. Motif, OpenLook, and Athena are examples of
|
||||
toolkits.
|
||||
|
||||
All other features normally found in other operating systems, like file
|
||||
managers, are implemented as separate programs and are not directly related to
|
||||
the window manager.
|
||||
|
||||
</article>
|
||||
<div id="titlebar">
|
||||
<div id="minimize"></div>
|
||||
<div id="titlebar-inner">Window Maker: User Guide - Introduction</div>
|
||||
<div id="close"></div>
|
||||
</div>
|
||||
<div id="resizebar">
|
||||
<div id="resizel"></div>
|
||||
<div id="resizebar-inner">
|
||||
</div>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
578
docs/chap2.html
Normal file
@@ -0,0 +1,578 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Window Maker: User Guide - Windows</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="/style.css" media="screen">
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, minimumscale=1.0, maximum-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<header>
|
||||
<h1>
|
||||
<a href="/">
|
||||
<span class="first">Window</span><span class="second">Maker</span>
|
||||
</a>
|
||||
</h1>
|
||||
</header>
|
||||
<aside>
|
||||
<nav class="menu">
|
||||
<ul>
|
||||
<li id="dock">
|
||||
<a href="#"></a>
|
||||
</li>
|
||||
<li id="home" title="Home">
|
||||
<a href="/">Home</a>
|
||||
</li>
|
||||
<li id="news" title="News">
|
||||
<a href="/news">News</a>
|
||||
</li>
|
||||
<li id="docs" title="Documentation">
|
||||
<a href="/docs">Documentation</a>
|
||||
</li>
|
||||
<li id="mail" title="Mailing lists">
|
||||
<a href="/lists">Mailing</a>
|
||||
</li>
|
||||
<li id="devel" title="Development">
|
||||
<a href="/dev">Development</a>
|
||||
</li>
|
||||
<li id="screenshots" title="Screenshots">
|
||||
<a href="/screenshots">Screenshots</a>
|
||||
</li>
|
||||
<li id="themes" title="Themes">
|
||||
<a href="/themes">Themes</a>
|
||||
</li>
|
||||
<li id="links" title="Links">
|
||||
<a href="/links">Links</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</aside>
|
||||
<article>
|
||||
|
||||
<div class="document" id="windows">
|
||||
<h1 class="title">Windows</h1>
|
||||
|
||||
<div class="section" id="anatomy-of-a-window">
|
||||
<h1>Anatomy of a Window</h1>
|
||||
<p>Generally an application will have the following layout:</p>
|
||||
<div class="borderless figure">
|
||||
<img alt="Anatomy of a Window" src="guide/images/anatomy.gif">
|
||||
</div>
|
||||
<dl class="simple">
|
||||
<dt>Titlebar</dt>
|
||||
<dd>
|
||||
<p>The titlebar presents the name of the application, document or window. It's
|
||||
color indicates the keyboard focus state and type of the window. You can use
|
||||
it to move, activate, raise, lower and access the window commands menu.</p>
|
||||
</dd>
|
||||
<dt>Miniaturize button</dt>
|
||||
<dd>
|
||||
<p>You can click on the miniaturize button to miniaturize/iconify a window or
|
||||
click it with the <strong>Meta</strong> key pressed to hide the application.</p>
|
||||
</dd>
|
||||
<dt>Close Button</dt>
|
||||
<dd>
|
||||
<p>The close button can be used to close a window or kill the application, if
|
||||
the application can't understand the close message.</p>
|
||||
</dd>
|
||||
<dt>Resizebar</dt>
|
||||
<dd>
|
||||
<p>You use the resizebar to (surprise!) resize a window.</p>
|
||||
</dd>
|
||||
<dt>Client Area</dt>
|
||||
<dd>
|
||||
<p>The client area is where the application show it's information. If the
|
||||
window if inactive, you can click on it to activate it.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="section" id="working-with-windows">
|
||||
<h1>Working With Windows</h1>
|
||||
<div class="section" id="focusing-a-window">
|
||||
<h2>Focusing a Window</h2>
|
||||
<p>Windows can be in two states: <em>focused</em>, or <em>unfocused.</em> The focused window
|
||||
(also called the key or active window) has a black titlebar and is the window
|
||||
that receives keyboard input, ie: where you can type text. Usually it's the
|
||||
window where you work on. Only one window may be focused at a time. Unfocused
|
||||
windows have a light gray titlebar. Some applications have a special type of
|
||||
window, called dialog windows transient windows or panels. When these windows
|
||||
are active, the window that owns them (the main window) get a dark gray
|
||||
titlebar. As soon as the dialog window is closed, the focus is returned to the
|
||||
owner window.</p>
|
||||
<p>The image below shows an active Open File panel and it's owner window.</p>
|
||||
<div class="borderless figure">
|
||||
<img alt="Focused, Unfocused, and Parent Window" src="guide/images/focus.gif">
|
||||
</div>
|
||||
<p>There are three styles of window focusing:</p>
|
||||
<p><strong>Click-to-Focus</strong>, or manual focus mode. In click-to-focus mode, you
|
||||
explicitly choose the window that should be focused. This is the default mode.</p>
|
||||
<p><strong>Focus-Follow-Mouse</strong>, or auto-focus mode. In this mode, the focused window is
|
||||
chosen based on the position of the mouse pointer. The window below the mouse
|
||||
pointer is always the focused window.</p>
|
||||
<p><strong>Sloppy-Focus</strong>, or semi-auto-focus mode. This is similar to the
|
||||
focus-follow-mouse mode, but if you move the pointer from a window to the root
|
||||
window, the window will not loose focus.</p>
|
||||
<p>You can choose between these modes with the <em>FocusMode</em> option.</p>
|
||||
<p>To focus a window in <strong>Click-To-Focus</strong> mode:</p>
|
||||
<ul class="simple">
|
||||
<li><p>Click on the titlebar, resizebar or in the client area of the window with the
|
||||
left or right mouse button.</p></li>
|
||||
</ul>
|
||||
<p>OR</p>
|
||||
<ul class="simple">
|
||||
<li><p>Click on the titlebar with the middle mouse button. This will focus the
|
||||
window without bringing it to the front.</p></li>
|
||||
</ul>
|
||||
<p>OR</p>
|
||||
<ul class="simple">
|
||||
<li><p>Open the window list menu and select the window to focus.</p></li>
|
||||
</ul>
|
||||
<p>When you click in the client area of an inactive window to set the focus, the
|
||||
click is normally processed by the application. If you find this behaviour a
|
||||
little confusing, you can make the application ignore this click by using the
|
||||
<em>IgnoreFocusClick</em> option.</p>
|
||||
<p>To focus a window in <strong>Focus-Follow-Mouse</strong> mode:</p>
|
||||
<ul class="simple">
|
||||
<li><p>Move the pointer over the window you want to focus.</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="reordering-overlapping-windows">
|
||||
<h2>Reordering Overlapping Windows</h2>
|
||||
<p>Windows can overlap other windows, making some windows be over or in front of
|
||||
others.</p>
|
||||
<p>To bring a window to the front:</p>
|
||||
<ul class="simple">
|
||||
<li><p>Click on the titlebar or resizebar of the desired window with the left mouse
|
||||
button.</p></li>
|
||||
</ul>
|
||||
<p>OR</p>
|
||||
<ul class="simple">
|
||||
<li><p>Select the desired window from the Window List menu.</p></li>
|
||||
</ul>
|
||||
<p>Dialog/transient windows are always placed over their owner windows, unless the
|
||||
<em>OnTopTransients</em> option is disabled. Some windows have a special attribute
|
||||
that allow them be permanently over normal windows. You can make specific
|
||||
windows have this attribute use the <em>AlwaysOnTop</em> window option or set it in
|
||||
the Window Inspector panel.</p>
|
||||
<p><strong>Extra Bindings</strong></p>
|
||||
<table>
|
||||
<colgroup>
|
||||
<col style="width: 49%">
|
||||
<col style="width: 51%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="head"><p>Action</p></th>
|
||||
<th class="head"><p>Effect</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><p>Meta-Click on the window titlebar,
|
||||
with the left mouse button</p></td>
|
||||
<td><p>Sends the window to the
|
||||
back.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Meta-Click on the Client Area of
|
||||
the window with the left mouse
|
||||
button.</p></td>
|
||||
<td><p>Brings the window to the front and
|
||||
focuses it.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Hold the Meta key and press the Up
|
||||
Arrow key</p></td>
|
||||
<td><p>Brings the current focused window to
|
||||
the front.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Hold the Meta key and press the
|
||||
Down Arrow key</p></td>
|
||||
<td><p>Sends the current focused window to
|
||||
the back.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="section" id="moving-a-window">
|
||||
<h2>Moving a Window</h2>
|
||||
<p>To move the window around the screen, drag the window through it's titlebar
|
||||
with the left mouse button pressed. This will also bring the window to the
|
||||
front and focus the window.</p>
|
||||
<p>To move a window:</p>
|
||||
<ul class="simple">
|
||||
<li><p>Click on the titlebar of the window you want to move with the left mouse
|
||||
button and drag it with the button pressed.</p></li>
|
||||
</ul>
|
||||
<p>While you move the window, a little box will appear in the screen, indicating
|
||||
the current window position in pixels, relative to the top left corner of the
|
||||
screen. You can change the location of this position box by hitting the Shift
|
||||
key during the move operation.</p>
|
||||
<p>In some rare occasions, it is possible for a window to be placed off screen.
|
||||
This can happen with some buggy applications. To bring a window back to the
|
||||
visible screen area, select the window in the Window List menu. You can prevent
|
||||
windows from doing that with the <em>DontMoveOff</em> window attribute.</p>
|
||||
<p><strong>Extra Bindings</strong></p>
|
||||
<table>
|
||||
<colgroup>
|
||||
<col style="width: 49%">
|
||||
<col style="width: 51%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="head"><p>Action</p></th>
|
||||
<th class="head"><p>Effect</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><p>Drag the titlebar with the middle
|
||||
mouse button</p></td>
|
||||
<td><p>Move the window without changing it's
|
||||
stacking order.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Drag the titlebar while holding the
|
||||
Control key</p></td>
|
||||
<td><p>Move the window without focusing it.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Drag the client area or resizebar
|
||||
while holding the Meta key</p></td>
|
||||
<td><p>Move the window.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="section" id="resizing-a-window">
|
||||
<h2>Resizing a Window</h2>
|
||||
<p>The size of a window can be adjusted by dragging the resizebar.</p>
|
||||
<div class="borderless figure">
|
||||
<img alt="A Resizebar" src="guide/images/resizebar.gif">
|
||||
</div>
|
||||
<p>Depending on the place you click to drag the resizebar, the resize operation is
|
||||
constrained to a direction.</p>
|
||||
<p>To resize a window:</p>
|
||||
<ul class="simple">
|
||||
<li><p>To change the window's height, click in the middle region of the resizebar
|
||||
and drag it vertically.</p></li>
|
||||
<li><p>To change the window's width, click in either end regions of the resizebar
|
||||
and drag it horizontally.</p></li>
|
||||
<li><p>To change both height and width at the same time, click in either end regions
|
||||
of the resizebar and drag it diagonally.</p></li>
|
||||
</ul>
|
||||
<p><strong>Extra Bindings</strong></p>
|
||||
<table>
|
||||
<colgroup>
|
||||
<col style="width: 50%">
|
||||
<col style="width: 50%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="head"><p>Action</p></th>
|
||||
<th class="head"><p>Effect</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><p>Drag the window in the client area
|
||||
with the Right mouse button, while
|
||||
holding the Meta key</p></td>
|
||||
<td><p>Resizes the window.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Drag the resizebar with the middle
|
||||
mouse button</p></td>
|
||||
<td><p>Resize the window without bringing
|
||||
it to the front</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Drag the resizebar while holding
|
||||
the Control key</p></td>
|
||||
<td><p>Resize the window without focusing
|
||||
it.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="section" id="miniaturizing-a-window">
|
||||
<h2>Miniaturizing a Window</h2>
|
||||
<p>If you want to temporarily get rid of a window, you can miniaturize it.</p>
|
||||
<div class="borderless figure">
|
||||
<img alt="A Titlebar" src="guide/images/title.gif">
|
||||
</div>
|
||||
<p>When miniaturizing a window, it will shrink into a miniwindow with a icon and a
|
||||
title that is placed at the bottom of the screen.</p>
|
||||
<div class="borderless figure">
|
||||
<img alt="A Mini-window" src="guide/images/mini.gif">
|
||||
<p class="caption">A mini-window</p>
|
||||
</div>
|
||||
<p>You can move the miniwindow around the screen by dragging it. Unlike
|
||||
application icons, miniwindows cannot be docked.</p>
|
||||
<p>To restore a window from it's miniwindow, double click the miniwindow. The
|
||||
window will be restored in the current workspace, with the same position, size
|
||||
and contents as it had before miniaturization.</p>
|
||||
<p>To miniaturize a window:</p>
|
||||
<ul class="simple">
|
||||
<li><p>Click on the miniaturize button</p></li>
|
||||
</ul>
|
||||
<p>OR</p>
|
||||
<ul class="simple">
|
||||
<li><p>Use the keyboard shortcut assigned to this action, Meta+m in the default
|
||||
configuration.</p></li>
|
||||
</ul>
|
||||
<p>You can also restore all miniaturized and hidden windows of a given application
|
||||
by double clicking in it's application icon with the middle mouse button.</p>
|
||||
</div>
|
||||
<div class="section" id="shading-a-window">
|
||||
<h2>Shading a Window</h2>
|
||||
<p>If you want to temporarily get rid of a window, an option for it's
|
||||
miniaturization is to <em>shade</em> it. When you shade a window, the window rolls up
|
||||
to it's titlebar. You can do almost everything you do with a normal window with
|
||||
shaded windows, like miniaturizing or closing it.</p>
|
||||
<p>To shade a window:</p>
|
||||
<ul class="simple">
|
||||
<li><p>Double Click on the titlebar of the window.</p></li>
|
||||
</ul>
|
||||
<div class="borderless figure">
|
||||
<img alt="A Shaded window" src="guide/images/shade.gif">
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="closing-a-window">
|
||||
<h2>Closing a Window</h2>
|
||||
<p>After finishing work in a window, you can close it to completely get rid of it.
|
||||
When you close a window, it is removed from the screen and can no longer be
|
||||
restored. So, before closing a window, be sure you have saved any work you were
|
||||
doing on it.</p>
|
||||
<div class="borderless figure">
|
||||
<img alt="A Titlebar with a close button" src="guide/images/imagtitle2.gif">
|
||||
</div>
|
||||
<p>Some windows will have a close button with some dots around it. These windows
|
||||
can't be closed normally and the only way to get rid of them is by exiting the
|
||||
application. You should try exiting from inside the application (through it's
|
||||
menus or buttons) when possible. Otherwise you can force WindowMaker to
|
||||
<span class="docutils literal">kill</span> the application.</p>
|
||||
<p>To force the closure of a window (by killing the application):</p>
|
||||
<ul class="simple">
|
||||
<li><p>Hold the Control key and click on the close button.</p></li>
|
||||
</ul>
|
||||
<p>OR</p>
|
||||
<ul class="simple">
|
||||
<li><p>Double click the close button.</p></li>
|
||||
</ul>
|
||||
<p>It is also possible to kill applications that can be normally closed by
|
||||
clicking the close button while holding the Control key.</p>
|
||||
</div>
|
||||
<div class="section" id="maximizing-a-window">
|
||||
<h2>Maximizing a Window</h2>
|
||||
<p>If you want to resize a window to occupy the whole screen, you can maximize the
|
||||
window. When you unmaximize it, the window will be restored to the same
|
||||
position and size it was before maximized.</p>
|
||||
<p>To maximize a window:</p>
|
||||
<ul class="simple">
|
||||
<li><p>Hold the Control key and double click on the window titlebar to resize the
|
||||
window's height to full screen.</p></li>
|
||||
</ul>
|
||||
<p>OR</p>
|
||||
<ul class="simple">
|
||||
<li><p>Hold the Shift key and double click on the window titlebar to resize the
|
||||
window's width to full screen.</p></li>
|
||||
</ul>
|
||||
<p>OR</p>
|
||||
<ul class="simple">
|
||||
<li><p>Hold both the Control and Shift keys and double click on the window titlebar
|
||||
to resize both window's height and width to full screen.</p></li>
|
||||
</ul>
|
||||
<p>To restore the size of a maximized window:</p>
|
||||
<ul class="simple">
|
||||
<li><p>Hold the Control OR Shift key and double click on the window titlebar.</p></li>
|
||||
</ul>
|
||||
<p>You can select whether the window should be maximized to the whole screen or if
|
||||
the position of the Dock should be accounted for by setting the <em>WinDock</em>
|
||||
option.</p>
|
||||
</div>
|
||||
<div class="section" id="the-window-commands-menu">
|
||||
<h2>The Window Commands Menu</h2>
|
||||
<p>Clicking on the titlebar of a window with the right mouse button will open a
|
||||
menu containing commands that will apply to that window. The menu can also be
|
||||
opened through the keyboard with the Control+Escape key, by default.</p>
|
||||
<dl class="simple">
|
||||
<dt>(Un)Maximize</dt>
|
||||
<dd>
|
||||
<p>Will either maximize the window horizontally and vertically, or, if the
|
||||
window is already maximized, restore the window to the size it was prior to
|
||||
being maximized.</p>
|
||||
</dd>
|
||||
<dt>Miniaturize</dt>
|
||||
<dd>
|
||||
<p>Will miniaturize the window.</p>
|
||||
</dd>
|
||||
<dt>(Un)Shade</dt>
|
||||
<dd>
|
||||
<p>Will shade the window, or unshade it if it is already shaded.</p>
|
||||
</dd>
|
||||
<dt>Hide</dt>
|
||||
<dd>
|
||||
<p>Will hide all the windows of the application</p>
|
||||
</dd>
|
||||
<dt>Hide Others</dt>
|
||||
<dd>
|
||||
<p>Will hide all current applications except the current one</p>
|
||||
</dd>
|
||||
<dt>Move To</dt>
|
||||
<dd>
|
||||
<p>Allows you to move the window to a different workspace</p>
|
||||
</dd>
|
||||
<dt>Attributes...</dt>
|
||||
<dd>
|
||||
<p>Opens the Window Attributes Inspector (see section <cite>2.3 <#2.3></cite>)</p>
|
||||
</dd>
|
||||
<dt>Close</dt>
|
||||
<dd>
|
||||
<p>Will close the window</p>
|
||||
</dd>
|
||||
<dt>Kill</dt>
|
||||
<dd>
|
||||
<p>Will kill the application. Use this option only if the application does not
|
||||
provide means to close it normally, or in extreme cases.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="the-window-attributes-inspector">
|
||||
<h1>The Window Attributes Inspector</h1>
|
||||
<div class="section" id="window-specification">
|
||||
<h2>Window Specification</h2>
|
||||
<p>This panel Allows you to specify the WM_CLASS that WindowMaker should use to
|
||||
identify the window whose attributes you are setting.</p>
|
||||
<div class="borderless figure">
|
||||
<img alt="Window Attributes Inspector: Window Specification" src="guide/images/wiaspec.gif">
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="window-attributes">
|
||||
<h2>Window Attributes</h2>
|
||||
<p>This panel lets you set the attributes for the selected window.</p>
|
||||
<div class="borderless figure">
|
||||
<img alt="Window Attributes Inspector: Window Attributes" src="guide/images/wiaattrib.gif">
|
||||
</div>
|
||||
<dl class="simple">
|
||||
<dt>Disable titlebar</dt>
|
||||
<dd>
|
||||
<p>Causes the titlebar for the selected window not to be displayed</p>
|
||||
</dd>
|
||||
<dt>Disable resizebar</dt>
|
||||
<dd>
|
||||
<p>Causes the resizebar for the selected window not to be displayed</p>
|
||||
</dd>
|
||||
<dt>Disable close button</dt>
|
||||
<dd>
|
||||
<p>Causes the close button for the selected window not to be displayed</p>
|
||||
</dd>
|
||||
<dt>Disable miniaturize button</dt>
|
||||
<dd>
|
||||
<p>Causes the miniaturize button for the selected window not to be displayed</p>
|
||||
</dd>
|
||||
<dt>Keep on Top</dt>
|
||||
<dd>
|
||||
<p>Causes the selected window to stay on top of all other windows</p>
|
||||
</dd>
|
||||
<dt>Omnipresent</dt>
|
||||
<dd>
|
||||
<p>Causes the selected window to be displayed in all workspaces</p>
|
||||
</dd>
|
||||
<dt>Start miniaturized</dt>
|
||||
<dd>
|
||||
<p>Causes the selected window to start miniaturized</p>
|
||||
</dd>
|
||||
<dt>Skip window list</dt>
|
||||
<dd>
|
||||
<p>Causes the select window to be skipped when cycling through the window list.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="section" id="advanced-options">
|
||||
<h2>Advanced Options</h2>
|
||||
<div class="borderless figure">
|
||||
<img alt="Window Attributes Inspector: Advanced Options" src="guide/images/wiaadvanced.gif">
|
||||
</div>
|
||||
<dl class="simple">
|
||||
<dt>Ignore HideOthers</dt>
|
||||
<dd>
|
||||
<p>Causes the selected window to remain visible when <strong>HideOthers</strong> is selected
|
||||
from the <a class="reference external" href="#2.2.9">Window Commands Menu</a></p>
|
||||
</dd>
|
||||
<dt>Don't bind keyboard shortcuts</dt>
|
||||
<dd>
|
||||
<p>Causes the selected window to receive ALL keyboard events</p>
|
||||
</dd>
|
||||
<dt>Don't bind mouse clicks</dt>
|
||||
<dd>
|
||||
<p>Causes the selected window to receive all mouse-click events</p>
|
||||
</dd>
|
||||
<dt>Keep Inside Screen</dt>
|
||||
<dd>
|
||||
<p>Causes the selected window not to be able to place itself off the screen</p>
|
||||
</dd>
|
||||
<dt>Don't let it take focus</dt>
|
||||
<dd>
|
||||
<p>Causes the selected window not to be able to take input focus</p>
|
||||
</dd>
|
||||
<dt>Don't Save Session</dt>
|
||||
<dd>
|
||||
<p>Causes the state of the selected window not to be saved when a session is
|
||||
saved. (either when quitting WindowMaker, or when done manually.)</p>
|
||||
</dd>
|
||||
<dt>Emulate Application Icon</dt>
|
||||
<dd>
|
||||
<p>Emulates an Application Icon for "broken" applications</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="section" id="icon-and-initial-workspace">
|
||||
<h2>Icon and Initial Workspace</h2>
|
||||
<p>This panel allows you to <strong>browse</strong> for, and <strong>update</strong> the <strong>mini-window
|
||||
image</strong> for the selected window, as well as setting the <strong>initial workspace</strong>.</p>
|
||||
<div class="borderless figure">
|
||||
<img alt="Window Attributes Inspector: Icon and Initia Workspace" src="guide/images/wiaiandiw.gif">
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="application-specific">
|
||||
<h2>Application Specific</h2>
|
||||
<p>Attributes specific to the selected application</p>
|
||||
<div class="borderless figure">
|
||||
<img alt="Window Attributes Inspector: Icon and Initia Workspace" src="guide/images/wiaappspec.gif">
|
||||
</div>
|
||||
<dl class="simple">
|
||||
<dt>Start hidden</dt>
|
||||
<dd>
|
||||
<p>Starts the selected application in a hidden state</p>
|
||||
</dd>
|
||||
<dt>No application icon</dt>
|
||||
<dd>
|
||||
<p>Disables the application icon for the selected application</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</article>
|
||||
<div id="titlebar">
|
||||
<div id="minimize"></div>
|
||||
<div id="titlebar-inner">Window Maker: User Guide - Windows</div>
|
||||
<div id="close"></div>
|
||||
</div>
|
||||
<div id="resizebar">
|
||||
<div id="resizel"></div>
|
||||
<div id="resizebar-inner">
|
||||
</div>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
539
docs/chap2.rst
Normal file
@@ -0,0 +1,539 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Window Maker: User Guide - Windows</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="/style.css" media="screen">
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, minimumscale=1.0, maximum-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<header>
|
||||
<h1>
|
||||
<a href="/">
|
||||
<span class="first">Window</span><span class="second">Maker</span>
|
||||
</a>
|
||||
</h1>
|
||||
</header>
|
||||
<aside>
|
||||
<nav class="menu">
|
||||
<ul>
|
||||
<li id="dock">
|
||||
<a href="#"></a>
|
||||
</li>
|
||||
<li id="home" title="Home">
|
||||
<a href="/">Home</a>
|
||||
</li>
|
||||
<li id="news" title="News">
|
||||
<a href="/news">News</a>
|
||||
</li>
|
||||
<li id="docs" title="Documentation">
|
||||
<a href="/docs">Documentation</a>
|
||||
</li>
|
||||
<li id="mail" title="Mailing lists">
|
||||
<a href="/lists">Mailing</a>
|
||||
</li>
|
||||
<li id="devel" title="Development">
|
||||
<a href="/dev">Development</a>
|
||||
</li>
|
||||
<li id="screenshots" title="Screenshots">
|
||||
<a href="/screenshots">Screenshots</a>
|
||||
</li>
|
||||
<li id="themes" title="Themes">
|
||||
<a href="/themes">Themes</a>
|
||||
</li>
|
||||
<li id="links" title="Links">
|
||||
<a href="/links">Links</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</aside>
|
||||
<article>
|
||||
Windows
|
||||
=======
|
||||
|
||||
Anatomy of a Window
|
||||
-------------------
|
||||
|
||||
Generally an application will have the following layout:
|
||||
|
||||
.. figure:: guide/images/anatomy.gif
|
||||
:figclass: borderless
|
||||
:alt: Anatomy of a Window
|
||||
|
||||
Titlebar
|
||||
The titlebar presents the name of the application, document or window. It's
|
||||
color indicates the keyboard focus state and type of the window. You can use
|
||||
it to move, activate, raise, lower and access the window commands menu.
|
||||
|
||||
Miniaturize button
|
||||
You can click on the miniaturize button to miniaturize/iconify a window or
|
||||
click it with the **Meta** key pressed to hide the application.
|
||||
|
||||
Close Button
|
||||
The close button can be used to close a window or kill the application, if
|
||||
the application can't understand the close message.
|
||||
|
||||
Resizebar
|
||||
You use the resizebar to (surprise!) resize a window.
|
||||
|
||||
Client Area
|
||||
The client area is where the application show it's information. If the
|
||||
window if inactive, you can click on it to activate it.
|
||||
|
||||
|
||||
Working With Windows
|
||||
--------------------
|
||||
|
||||
Focusing a Window
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
Windows can be in two states: *focused*, or *unfocused.* The focused window
|
||||
(also called the key or active window) has a black titlebar and is the window
|
||||
that receives keyboard input, ie: where you can type text. Usually it's the
|
||||
window where you work on. Only one window may be focused at a time. Unfocused
|
||||
windows have a light gray titlebar. Some applications have a special type of
|
||||
window, called dialog windows transient windows or panels. When these windows
|
||||
are active, the window that owns them (the main window) get a dark gray
|
||||
titlebar. As soon as the dialog window is closed, the focus is returned to the
|
||||
owner window.
|
||||
|
||||
The image below shows an active Open File panel and it's owner window.
|
||||
|
||||
.. figure:: guide/images/focus.gif
|
||||
:figclass: borderless
|
||||
:alt: Focused, Unfocused, and Parent Window
|
||||
|
||||
There are three styles of window focusing:
|
||||
|
||||
**Click-to-Focus**, or manual focus mode. In click-to-focus mode, you
|
||||
explicitly choose the window that should be focused. This is the default mode.
|
||||
|
||||
**Focus-Follow-Mouse**, or auto-focus mode. In this mode, the focused window is
|
||||
chosen based on the position of the mouse pointer. The window below the mouse
|
||||
pointer is always the focused window.
|
||||
|
||||
**Sloppy-Focus**, or semi-auto-focus mode. This is similar to the
|
||||
focus-follow-mouse mode, but if you move the pointer from a window to the root
|
||||
window, the window will not loose focus.
|
||||
|
||||
You can choose between these modes with the *FocusMode* option.
|
||||
|
||||
To focus a window in **Click-To-Focus** mode:
|
||||
|
||||
- Click on the titlebar, resizebar or in the client area of the window with the
|
||||
left or right mouse button.
|
||||
|
||||
OR
|
||||
|
||||
- Click on the titlebar with the middle mouse button. This will focus the
|
||||
window without bringing it to the front.
|
||||
|
||||
OR
|
||||
|
||||
- Open the window list menu and select the window to focus.
|
||||
|
||||
When you click in the client area of an inactive window to set the focus, the
|
||||
click is normally processed by the application. If you find this behaviour a
|
||||
little confusing, you can make the application ignore this click by using the
|
||||
*IgnoreFocusClick* option.
|
||||
|
||||
To focus a window in **Focus-Follow-Mouse** mode:
|
||||
|
||||
- Move the pointer over the window you want to focus.
|
||||
|
||||
|
||||
Reordering Overlapping Windows
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Windows can overlap other windows, making some windows be over or in front of
|
||||
others.
|
||||
|
||||
To bring a window to the front:
|
||||
|
||||
- Click on the titlebar or resizebar of the desired window with the left mouse
|
||||
button.
|
||||
|
||||
OR
|
||||
|
||||
- Select the desired window from the Window List menu.
|
||||
|
||||
Dialog/transient windows are always placed over their owner windows, unless the
|
||||
*OnTopTransients* option is disabled. Some windows have a special attribute
|
||||
that allow them be permanently over normal windows. You can make specific
|
||||
windows have this attribute use the *AlwaysOnTop* window option or set it in
|
||||
the Window Inspector panel.
|
||||
|
||||
**Extra Bindings**
|
||||
|
||||
+------------------------------------+--------------------------------------+
|
||||
| Action | Effect |
|
||||
+====================================+======================================+
|
||||
| Meta-Click on the window titlebar, | Sends the window to the |
|
||||
| with the left mouse button | back. |
|
||||
+------------------------------------+--------------------------------------+
|
||||
| Meta-Click on the Client Area of | Brings the window to the front and |
|
||||
| the window with the left mouse | focuses it. |
|
||||
| button. | |
|
||||
+------------------------------------+--------------------------------------+
|
||||
| Hold the Meta key and press the Up | Brings the current focused window to |
|
||||
| Arrow key | the front. |
|
||||
+------------------------------------+--------------------------------------+
|
||||
| Hold the Meta key and press the | Sends the current focused window to |
|
||||
| Down Arrow key | the back. |
|
||||
+------------------------------------+--------------------------------------+
|
||||
|
||||
|
||||
Moving a Window
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
To move the window around the screen, drag the window through it's titlebar
|
||||
with the left mouse button pressed. This will also bring the window to the
|
||||
front and focus the window.
|
||||
|
||||
To move a window:
|
||||
|
||||
- Click on the titlebar of the window you want to move with the left mouse
|
||||
button and drag it with the button pressed.
|
||||
|
||||
While you move the window, a little box will appear in the screen, indicating
|
||||
the current window position in pixels, relative to the top left corner of the
|
||||
screen. You can change the location of this position box by hitting the Shift
|
||||
key during the move operation.
|
||||
|
||||
In some rare occasions, it is possible for a window to be placed off screen.
|
||||
This can happen with some buggy applications. To bring a window back to the
|
||||
visible screen area, select the window in the Window List menu. You can prevent
|
||||
windows from doing that with the *DontMoveOff* window attribute.
|
||||
|
||||
**Extra Bindings**
|
||||
|
||||
+-------------------------------------+---------------------------------------+
|
||||
| Action | Effect |
|
||||
+=====================================+=======================================+
|
||||
| Drag the titlebar with the middle | Move the window without changing it's |
|
||||
| mouse button | stacking order. |
|
||||
+-------------------------------------+---------------------------------------+
|
||||
| Drag the titlebar while holding the | Move the window without focusing it. |
|
||||
| Control key | |
|
||||
+-------------------------------------+---------------------------------------+
|
||||
| Drag the client area or resizebar | Move the window. |
|
||||
| while holding the Meta key | |
|
||||
+-------------------------------------+---------------------------------------+
|
||||
|
||||
|
||||
Resizing a Window
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
The size of a window can be adjusted by dragging the resizebar.
|
||||
|
||||
.. figure:: guide/images/resizebar.gif
|
||||
:figclass: borderless
|
||||
:alt: A Resizebar
|
||||
|
||||
Depending on the place you click to drag the resizebar, the resize operation is
|
||||
constrained to a direction.
|
||||
|
||||
To resize a window:
|
||||
|
||||
- To change the window's height, click in the middle region of the resizebar
|
||||
and drag it vertically.
|
||||
- To change the window's width, click in either end regions of the resizebar
|
||||
and drag it horizontally.
|
||||
- To change both height and width at the same time, click in either end regions
|
||||
of the resizebar and drag it diagonally.
|
||||
|
||||
**Extra Bindings**
|
||||
|
||||
+------------------------------------+------------------------------------+
|
||||
| Action | Effect |
|
||||
+====================================+====================================+
|
||||
| Drag the window in the client area | Resizes the window. |
|
||||
| with the Right mouse button, while | |
|
||||
| holding the Meta key | |
|
||||
+------------------------------------+------------------------------------+
|
||||
| Drag the resizebar with the middle | Resize the window without bringing |
|
||||
| mouse button | it to the front |
|
||||
+------------------------------------+------------------------------------+
|
||||
| Drag the resizebar while holding | Resize the window without focusing |
|
||||
| the Control key | it. |
|
||||
+------------------------------------+------------------------------------+
|
||||
|
||||
|
||||
Miniaturizing a Window
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
If you want to temporarily get rid of a window, you can miniaturize it.
|
||||
|
||||
.. figure:: guide/images/title.gif
|
||||
:figclass: borderless
|
||||
:alt: A Titlebar
|
||||
|
||||
When miniaturizing a window, it will shrink into a miniwindow with a icon and a
|
||||
title that is placed at the bottom of the screen.
|
||||
|
||||
.. figure:: guide/images/mini.gif
|
||||
:figclass: borderless
|
||||
:alt: A Mini-window
|
||||
|
||||
A mini-window
|
||||
|
||||
You can move the miniwindow around the screen by dragging it. Unlike
|
||||
application icons, miniwindows cannot be docked.
|
||||
|
||||
To restore a window from it's miniwindow, double click the miniwindow. The
|
||||
window will be restored in the current workspace, with the same position, size
|
||||
and contents as it had before miniaturization.
|
||||
|
||||
To miniaturize a window:
|
||||
|
||||
- Click on the miniaturize button
|
||||
|
||||
OR
|
||||
|
||||
- Use the keyboard shortcut assigned to this action, Meta+m in the default
|
||||
configuration.
|
||||
|
||||
You can also restore all miniaturized and hidden windows of a given application
|
||||
by double clicking in it's application icon with the middle mouse button.
|
||||
|
||||
|
||||
Shading a Window
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
If you want to temporarily get rid of a window, an option for it's
|
||||
miniaturization is to *shade* it. When you shade a window, the window rolls up
|
||||
to it's titlebar. You can do almost everything you do with a normal window with
|
||||
shaded windows, like miniaturizing or closing it.
|
||||
|
||||
To shade a window:
|
||||
|
||||
- Double Click on the titlebar of the window.
|
||||
|
||||
.. figure:: guide/images/shade.gif
|
||||
:figclass: borderless
|
||||
:alt: A Shaded window
|
||||
|
||||
|
||||
Closing a Window
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
After finishing work in a window, you can close it to completely get rid of it.
|
||||
When you close a window, it is removed from the screen and can no longer be
|
||||
restored. So, before closing a window, be sure you have saved any work you were
|
||||
doing on it.
|
||||
|
||||
.. figure:: guide/images/imagtitle2.gif
|
||||
:figclass: borderless
|
||||
:alt: A Titlebar with a close button
|
||||
|
||||
Some windows will have a close button with some dots around it. These windows
|
||||
can't be closed normally and the only way to get rid of them is by exiting the
|
||||
application. You should try exiting from inside the application (through it's
|
||||
menus or buttons) when possible. Otherwise you can force WindowMaker to
|
||||
``kill`` the application.
|
||||
|
||||
To force the closure of a window (by killing the application):
|
||||
|
||||
- Hold the Control key and click on the close button.
|
||||
|
||||
OR
|
||||
|
||||
- Double click the close button.
|
||||
|
||||
It is also possible to kill applications that can be normally closed by
|
||||
clicking the close button while holding the Control key.
|
||||
|
||||
|
||||
Maximizing a Window
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
If you want to resize a window to occupy the whole screen, you can maximize the
|
||||
window. When you unmaximize it, the window will be restored to the same
|
||||
position and size it was before maximized.
|
||||
|
||||
To maximize a window:
|
||||
|
||||
- Hold the Control key and double click on the window titlebar to resize the
|
||||
window's height to full screen.
|
||||
|
||||
OR
|
||||
|
||||
- Hold the Shift key and double click on the window titlebar to resize the
|
||||
window's width to full screen.
|
||||
|
||||
OR
|
||||
|
||||
- Hold both the Control and Shift keys and double click on the window titlebar
|
||||
to resize both window's height and width to full screen.
|
||||
|
||||
To restore the size of a maximized window:
|
||||
|
||||
- Hold the Control OR Shift key and double click on the window titlebar.
|
||||
|
||||
You can select whether the window should be maximized to the whole screen or if
|
||||
the position of the Dock should be accounted for by setting the *WinDock*
|
||||
option.
|
||||
|
||||
|
||||
The Window Commands Menu
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Clicking on the titlebar of a window with the right mouse button will open a
|
||||
menu containing commands that will apply to that window. The menu can also be
|
||||
opened through the keyboard with the Control+Escape key, by default.
|
||||
|
||||
(Un)Maximize
|
||||
Will either maximize the window horizontally and vertically, or, if the
|
||||
window is already maximized, restore the window to the size it was prior to
|
||||
being maximized.
|
||||
|
||||
Miniaturize
|
||||
Will miniaturize the window.
|
||||
|
||||
(Un)Shade
|
||||
Will shade the window, or unshade it if it is already shaded.
|
||||
|
||||
Hide
|
||||
Will hide all the windows of the application
|
||||
|
||||
Hide Others
|
||||
Will hide all current applications except the current one
|
||||
|
||||
Move To
|
||||
Allows you to move the window to a different workspace
|
||||
|
||||
Attributes...
|
||||
Opens the Window Attributes Inspector (see section `2.3 <#2.3>`)
|
||||
|
||||
Close
|
||||
Will close the window
|
||||
|
||||
Kill
|
||||
Will kill the application. Use this option only if the application does not
|
||||
provide means to close it normally, or in extreme cases.
|
||||
|
||||
|
||||
The Window Attributes Inspector
|
||||
-------------------------------
|
||||
|
||||
Window Specification
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
This panel Allows you to specify the WM_CLASS that WindowMaker should use to
|
||||
identify the window whose attributes you are setting.
|
||||
|
||||
.. figure:: guide/images/wiaspec.gif
|
||||
:figclass: borderless
|
||||
:alt: Window Attributes Inspector: Window Specification
|
||||
|
||||
|
||||
Window Attributes
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
This panel lets you set the attributes for the selected window.
|
||||
|
||||
.. figure:: guide/images/wiaattrib.gif
|
||||
:figclass: borderless
|
||||
:alt: Window Attributes Inspector: Window Attributes
|
||||
|
||||
Disable titlebar
|
||||
Causes the titlebar for the selected window not to be displayed
|
||||
|
||||
Disable resizebar
|
||||
Causes the resizebar for the selected window not to be displayed
|
||||
|
||||
Disable close button
|
||||
Causes the close button for the selected window not to be displayed
|
||||
|
||||
Disable miniaturize button
|
||||
Causes the miniaturize button for the selected window not to be displayed
|
||||
|
||||
Keep on Top
|
||||
Causes the selected window to stay on top of all other windows
|
||||
|
||||
Omnipresent
|
||||
Causes the selected window to be displayed in all workspaces
|
||||
|
||||
Start miniaturized
|
||||
Causes the selected window to start miniaturized
|
||||
|
||||
Skip window list
|
||||
Causes the select window to be skipped when cycling through the window list.
|
||||
|
||||
|
||||
Advanced Options
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
.. figure:: guide/images/wiaadvanced.gif
|
||||
:figclass: borderless
|
||||
:alt: Window Attributes Inspector: Advanced Options
|
||||
|
||||
Ignore HideOthers
|
||||
Causes the selected window to remain visible when **HideOthers** is selected
|
||||
from the `Window Commands Menu <#2.2.9>`_
|
||||
|
||||
Don't bind keyboard shortcuts
|
||||
Causes the selected window to receive ALL keyboard events
|
||||
|
||||
Don't bind mouse clicks
|
||||
Causes the selected window to receive all mouse-click events
|
||||
|
||||
Keep Inside Screen
|
||||
Causes the selected window not to be able to place itself off the screen
|
||||
|
||||
Don't let it take focus
|
||||
Causes the selected window not to be able to take input focus
|
||||
|
||||
Don't Save Session
|
||||
Causes the state of the selected window not to be saved when a session is
|
||||
saved. (either when quitting WindowMaker, or when done manually.)
|
||||
|
||||
Emulate Application Icon
|
||||
Emulates an Application Icon for "broken" applications
|
||||
|
||||
|
||||
Icon and Initial Workspace
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
This panel allows you to **browse** for, and **update** the **mini-window
|
||||
image** for the selected window, as well as setting the **initial workspace**.
|
||||
|
||||
.. figure:: guide/images/wiaiandiw.gif
|
||||
:figclass: borderless
|
||||
:alt: Window Attributes Inspector: Icon and Initia Workspace
|
||||
|
||||
|
||||
Application Specific
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Attributes specific to the selected application
|
||||
|
||||
.. figure:: guide/images/wiaappspec.gif
|
||||
:figclass: borderless
|
||||
:alt: Window Attributes Inspector: Icon and Initia Workspace
|
||||
|
||||
Start hidden
|
||||
Starts the selected application in a hidden state
|
||||
|
||||
No application icon
|
||||
Disables the application icon for the selected application
|
||||
|
||||
</article>
|
||||
<div id="titlebar">
|
||||
<div id="minimize"></div>
|
||||
<div id="titlebar-inner">Window Maker: User Guide - Windows</div>
|
||||
<div id="close"></div>
|
||||
</div>
|
||||
<div id="resizebar">
|
||||
<div id="resizel"></div>
|
||||
<div id="resizebar-inner">
|
||||
</div>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
370
docs/chap3.html
Normal file
@@ -0,0 +1,370 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Window Maker: User Guide - Workspace</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="/style.css" media="screen">
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, minimumscale=1.0, maximum-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<header>
|
||||
<h1>
|
||||
<a href="/">
|
||||
<span class="first">Window</span><span class="second">Maker</span>
|
||||
</a>
|
||||
</h1>
|
||||
</header>
|
||||
<aside>
|
||||
<nav class="menu">
|
||||
<ul>
|
||||
<li id="dock">
|
||||
<a href="#"></a>
|
||||
</li>
|
||||
<li id="home" title="Home">
|
||||
<a href="/">Home</a>
|
||||
</li>
|
||||
<li id="news" title="News">
|
||||
<a href="/news">News</a>
|
||||
</li>
|
||||
<li id="docs" title="Documentation">
|
||||
<a href="/docs">Documentation</a>
|
||||
</li>
|
||||
<li id="mail" title="Mailing lists">
|
||||
<a href="/lists">Mailing</a>
|
||||
</li>
|
||||
<li id="devel" title="Development">
|
||||
<a href="/dev">Development</a>
|
||||
</li>
|
||||
<li id="screenshots" title="Screenshots">
|
||||
<a href="/screenshots">Screenshots</a>
|
||||
</li>
|
||||
<li id="themes" title="Themes">
|
||||
<a href="/themes">Themes</a>
|
||||
</li>
|
||||
<li id="links" title="Links">
|
||||
<a href="/links">Links</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</aside>
|
||||
<article>
|
||||
|
||||
<div class="document" id="the-workspace">
|
||||
<h1 class="title">The Workspace</h1>
|
||||
|
||||
<div class="section" id="working-with-menus">
|
||||
<h1>Working with Menus</h1>
|
||||
<p>Menus provide a list of commands that you can execute.</p>
|
||||
<div class="borderless figure">
|
||||
<img alt="An Example Menu" src="guide/images/menu.gif">
|
||||
</div>
|
||||
<p>To execute a command listed in a menu, click in the corresponding item. The
|
||||
item will blink telling that the command is going to be executed.</p>
|
||||
<p>Grayed commands are disabled and cannot be executed at that moment. If you
|
||||
click on them nothing will happen.</p>
|
||||
<p>Some menu entries have a little triangular indicator at the right. Selecting
|
||||
these entries will open a submenu, with a new list of commands.</p>
|
||||
<p>You can use the keyboard to traverse and execute commands in some of the menus.
|
||||
First you must hit the key used to open the menu - like F12 for the root menu -
|
||||
to enable keyboard traversal of it. Then you can use the Up and Down arrow keys
|
||||
to change the current selected item and the Left and Right arrow keys to jump
|
||||
between submenus and parent menus. To execute the current selected item press
|
||||
Return. To close the menu or stop menu traversal, press Escape. Additionally,
|
||||
pressing the first letter for an menu item, will jump the current selection to
|
||||
that item.</p>
|
||||
<p>You can make frequently used menus "stick" to the workspace by dragging the
|
||||
titlebar of the menu. This will make a close button appear in the menu
|
||||
titlebar. If you want to close the menu, just click in that button.</p>
|
||||
<p>Menus are normally placed on top of other windows and cannot be obscured by
|
||||
them. If you want the menus to be able to be obscured by lowering them, double
|
||||
click the menu titlebar while holding the Meta key. Repeat this to make the
|
||||
menus not obscurable again.</p>
|
||||
<div class="section" id="the-root-window-menu">
|
||||
<h2>The Root Window Menu</h2>
|
||||
<p>The <em>Root Window Menu</em> or <em>Applications Menu</em> has items that allow you to
|
||||
quickly launch applications and do some workspace management.</p>
|
||||
<p>To open this menu, click on the workspace (root window) with the 3rd mouse
|
||||
button or hit the key bound to it (F12 by default).</p>
|
||||
<p>The contents of the applications menu can be configured to hold the
|
||||
applications installed on your system. To learn how to configure it, read the
|
||||
section on application menu configuration.</p>
|
||||
</div>
|
||||
<div class="section" id="the-window-list-menu">
|
||||
<h2>The Window List Menu</h2>
|
||||
<p>Clicking in the workspace with the middle mouse button will open a menu listing
|
||||
all windows that currently exist, with the workspace in which the window is
|
||||
located to its right. The current focused window is marked by a diamond sign
|
||||
next to its name. Clicking in an entry in this menu will focus the window,
|
||||
raise it, and change to the workspace where it is located.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="working-with-applications">
|
||||
<h1>Working with Applications</h1>
|
||||
<p>In WindowMaker the instance of a running application is represented by an
|
||||
application icon. Do not confuse it with the icons (miniwindows in WindowMaker)
|
||||
displayed by other window managers when a window is iconified. Application
|
||||
icons and miniwindows can be differentiated in that miniwindows have titlebars,
|
||||
application icons do not.</p>
|
||||
<p>WindowMaker identifies a group of windows as belonging to a single instance of
|
||||
an application through some standard hints that the application sets in its
|
||||
windows. Unfortunately, not all applications that exist set these hints,
|
||||
preventing some application-specific features from working. These hints are
|
||||
<strong>WM.CLASS</strong>, <strong>WM.COMMAND</strong>, and <strong>WM.CLIENT.LEADER</strong> or the group leader in
|
||||
<strong>WM.HINTS</strong>.</p>
|
||||
<p>Note: The information about applications contained in this section only applies
|
||||
to versions of WindowMaker built without the --enable-single-icon compile time
|
||||
option. This option is unsupported and behaviour when it's enabled will not be
|
||||
covered in this text.</p>
|
||||
<div class="section" id="hiding-an-application">
|
||||
<h2>Hiding an Application</h2>
|
||||
<p>If you want to close and application but intend to use it later you can <em>hide</em>
|
||||
it. When you hide an application all windows and miniwindows that belong to
|
||||
that application will be removed from the screen and hidden into its
|
||||
application icon.</p>
|
||||
<p>To hide an application:</p>
|
||||
<ul class="simple">
|
||||
<li><p>Click the miniaturize button of any of the windows that belong to the
|
||||
application while holding the Control key.</p></li>
|
||||
</ul>
|
||||
<p>OR</p>
|
||||
<ul class="simple">
|
||||
<li><p>Press the keyboard shortcut assigned to it, which is Meta+h in the default
|
||||
configuration.</p></li>
|
||||
</ul>
|
||||
<p>OR</p>
|
||||
<ul class="simple">
|
||||
<li><p>User the hide command in the <a class="reference external" href="chap2.html#the-window-commands-menu">window commands menu</a> brought up when the window titlebar
|
||||
is clicked with the right mouse button.</p></li>
|
||||
</ul>
|
||||
<p>OR</p>
|
||||
<ul class="simple">
|
||||
<li><p>Use the (Un)Hide command in the application icon commands menu brought up
|
||||
when the application icon is clicked with the right mouse button.</p></li>
|
||||
</ul>
|
||||
<p>To unhide an application</p>
|
||||
<ul class="simple">
|
||||
<li><p>Double click the application icon with the left mouse button.</p></li>
|
||||
</ul>
|
||||
<p>OR</p>
|
||||
<ul class="simple">
|
||||
<li><p>Use the (Un)Hide command in the application icon commands menu brought up
|
||||
when the application icon is clicked with the right mouse button.</p></li>
|
||||
</ul>
|
||||
<p>When you unhide an application, all it's windows and miniwindows will brought
|
||||
back, and you will be taken to the last workspace in which you worked with that
|
||||
application.</p>
|
||||
<p><strong>Extra Bindings</strong></p>
|
||||
<table>
|
||||
<colgroup>
|
||||
<col style="width: 49%">
|
||||
<col style="width: 51%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="head"><p>Action</p></th>
|
||||
<th class="head"><p>Effect</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><p>Double-click the application icon
|
||||
while holding the Meta key</p></td>
|
||||
<td><p>Unhide the clicked application,
|
||||
and hide all other applications
|
||||
that are present in the current
|
||||
workspace.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Double-click the application icon
|
||||
while holding the Shift key</p></td>
|
||||
<td><p>Unhide the clicked application in
|
||||
the current workspace</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Double-click the application icon
|
||||
with the middle mouse button</p></td>
|
||||
<td><p>Unhide the clicked application and
|
||||
deminiaturize all its windows.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Double-click the window titlebar
|
||||
with the right mouse button while
|
||||
holding the Meta key.</p></td>
|
||||
<td><p>Hide all applications in the
|
||||
current workspace except for the
|
||||
clicked one.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>There are two other commands in the applications menu related to application
|
||||
hiding:</p>
|
||||
<dl class="simple">
|
||||
<dt>Hide others</dt>
|
||||
<dd>
|
||||
<p>Hide all applications in the current workspace, except for the currently
|
||||
active one.</p>
|
||||
</dd>
|
||||
<dt>Show All</dt>
|
||||
<dd>
|
||||
<p>Unhide all applications that were hidden from the current workspace</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="section" id="the-application-icon-menu">
|
||||
<h2>The Application Icon Menu</h2>
|
||||
<p>A menu with commands that will apply to the application can be brought up by
|
||||
clicking the application icon with the right mouse button.</p>
|
||||
<p>The commands available in this menu are:</p>
|
||||
<dl class="simple">
|
||||
<dt>Unhide Here</dt>
|
||||
<dd>
|
||||
<p>Unhides the application in the current workspace.</p>
|
||||
</dd>
|
||||
<dt>(Un)Hide</dt>
|
||||
<dd>
|
||||
<p>Hides the application. Unless the application is already hidden, in which
|
||||
case it will unhide the application and take you to its workspace.</p>
|
||||
</dd>
|
||||
<dt>Set Icon...</dt>
|
||||
<dd>
|
||||
<p>Opens the icon image selection panel for the application icon.</p>
|
||||
</dd>
|
||||
<dt>Kill</dt>
|
||||
<dd>
|
||||
<p>Will kill the application.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="section" id="the-application-dock">
|
||||
<h2>The Application Dock</h2>
|
||||
<p>The application dock is a place where you can store frequently used
|
||||
applications for easy and fast access. It is located, by default, on the right
|
||||
side of the screen.</p>
|
||||
<p>You can click the top icon (the one with the GNUstep logo) and drag it downward
|
||||
to remove most of the dock from view. You can also drag it sideways to move
|
||||
the entire dock from side of the screen to the other.</p>
|
||||
<p>A menu similar to the <a class="reference external" href="#the-application-icon-menu">application icon menu</a> is
|
||||
brought up when you click a docked icon with the right mouse button.</p>
|
||||
<p>To make the dock <em>float</em> over windows (not be coverable by windows), either
|
||||
double-click the top dock icon while holding the Meta key, or select the
|
||||
"Floating Dock" option in the dock menu.</p>
|
||||
<div class="section" id="starting-a-docked-application">
|
||||
<h3>Starting a docked application</h3>
|
||||
<p>To start an application that is docked, double-click its icon. The icon will be
|
||||
briefly highlighted and the application will start.</p>
|
||||
<p>While an application is not running an ellipsis is present in the lower
|
||||
left-hand corner of the icon. This ellipsis will disappear when the application
|
||||
is started and reappear when the application is exited.</p>
|
||||
<p>While the application is running the docked icon will behave just like a
|
||||
normal, undocked application icon, except for some extra actions specific to
|
||||
the dock.</p>
|
||||
<p>To start a docked application:</p>
|
||||
<ul class="simple">
|
||||
<li><p>Double-click the application icon with the left mouse button.</p></li>
|
||||
</ul>
|
||||
<p>OR</p>
|
||||
<ul class="simple">
|
||||
<li><p>Use the "Launch" command in the dock menu for the icon. If the application is
|
||||
already running it will start another instance.</p></li>
|
||||
</ul>
|
||||
<p>OR</p>
|
||||
<ul class="simple">
|
||||
<li><p>Hold the Control key while double-clicking the icon to start another instance
|
||||
of the application.</p></li>
|
||||
</ul>
|
||||
<p>If a new instance of an already running application is started it will get a
|
||||
new application icon.</p>
|
||||
</div>
|
||||
<div class="section" id="customizing-the-dock">
|
||||
<h3>Customizing the dock</h3>
|
||||
<p>To add new applications to the dock, you can click an application icon and drag
|
||||
it onto the dock. When a ghost image of the icon appears you can release the
|
||||
mouse button and the icon will be docked.</p>
|
||||
<p>To reorder the docked applications, drag an icon to an empty slot and move the
|
||||
icons around as you want.</p>
|
||||
<p>To remove a docked application, drag it from the dock and release the mouse
|
||||
button when the ghost image disappears. To remove the icon of an application
|
||||
that is running, hold the Meta key while dragging it.</p>
|
||||
</div>
|
||||
<div class="section" id="configuring-the-docked-application">
|
||||
<h3>Configuring the docked application</h3>
|
||||
<p>To change the settings of a docked application, select the "Settings..." item
|
||||
in the dock menu for that icon. A settings panel for that icon will appear.</p>
|
||||
<div class="borderless figure">
|
||||
<img alt="Docked Application Settings Panel" src="guide/images/dockapppanel.gif">
|
||||
</div>
|
||||
<p>In the <em>Application path and arguments</em> field, the path for the application and
|
||||
its arguments can be changed. Note that you can't change the application that
|
||||
is represented in the icon or change anything that would cause the application
|
||||
name to be changed. For example, if the icon is for <span class="docutils literal">xterm</span> you can't change
|
||||
the field's value to <strong>ghostview</strong>; or if the icon is for <span class="docutils literal">xterm <span class="pre">-name</span> vi</span>,
|
||||
you can't change it to <span class="docutils literal">xterm <span class="pre">-name</span> pine</span>. Also note that you cannot use
|
||||
shell commands, such as output redirectors. (<span class="docutils literal">></span>, <span class="docutils literal">>></span>; etc.)</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="working-with-workspaces">
|
||||
<h1>Working with Workspaces</h1>
|
||||
<div class="section" id="the-workspaces-menu">
|
||||
<h2>The Workspaces Menu</h2>
|
||||
<p>The <em>Workspaces Menu</em> allows you to create, switch, destroy and rename
|
||||
workspaces.</p>
|
||||
<p>It has the following items:</p>
|
||||
<dl class="simple">
|
||||
<dt>New</dt>
|
||||
<dd>
|
||||
<p>Creates a new workspace and automatically switches to it</p>
|
||||
</dd>
|
||||
<dt>Destroy Last</dt>
|
||||
<dd>
|
||||
<p>Destroys the last workspace unless it is occupied</p>
|
||||
</dd>
|
||||
<dt>Workspaces</dt>
|
||||
<dd>
|
||||
<p>Each workspace has a corresponding item in the Workspaces menu. Clicking in
|
||||
one of these entries will switch from the current workspace to the selected
|
||||
workspace.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>The current active workspace is indicated by a small indicator at the left of
|
||||
the workspace item.</p>
|
||||
<div class="borderless figure">
|
||||
<img alt="Workspace Menu" src="guide/images/wsmenu.gif">
|
||||
</div>
|
||||
<p>To change the name of a workspace you must first "stick" the menu. Then Control
|
||||
click in the item corresponding to the workspace you want to rename. The item
|
||||
will turn into a editable text field where you can edit the workspace name. To
|
||||
finish editing the workspace name, press Return; to cancel it, press Escape.</p>
|
||||
<p>There is a limit of 16 characters on the length of the workspace name.</p>
|
||||
<p>An example Workspace menu being edited:</p>
|
||||
<div class="borderless figure">
|
||||
<img alt="Workspace Menu: Editing a Workspace name" src="guide/images/wsmenued.gif">
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="the-workspace-clip">
|
||||
<h2>The workspace clip</h2>
|
||||
<!-- WTF is that?? -->
|
||||
<p>[This section was unavailable in the original, and thus is not here]</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</article>
|
||||
<div id="titlebar">
|
||||
<div id="minimize"></div>
|
||||
<div id="titlebar-inner">Window Maker: User Guide - Workspace</div>
|
||||
<div id="close"></div>
|
||||
</div>
|
||||
<div id="resizebar">
|
||||
<div id="resizel"></div>
|
||||
<div id="resizebar-inner">
|
||||
</div>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
387
docs/chap3.rst
Normal file
@@ -0,0 +1,387 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Window Maker: User Guide - Workspace</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="/style.css" media="screen">
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, minimumscale=1.0, maximum-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<header>
|
||||
<h1>
|
||||
<a href="/">
|
||||
<span class="first">Window</span><span class="second">Maker</span>
|
||||
</a>
|
||||
</h1>
|
||||
</header>
|
||||
<aside>
|
||||
<nav class="menu">
|
||||
<ul>
|
||||
<li id="dock">
|
||||
<a href="#"></a>
|
||||
</li>
|
||||
<li id="home" title="Home">
|
||||
<a href="/">Home</a>
|
||||
</li>
|
||||
<li id="news" title="News">
|
||||
<a href="/news">News</a>
|
||||
</li>
|
||||
<li id="docs" title="Documentation">
|
||||
<a href="/docs">Documentation</a>
|
||||
</li>
|
||||
<li id="mail" title="Mailing lists">
|
||||
<a href="/lists">Mailing</a>
|
||||
</li>
|
||||
<li id="devel" title="Development">
|
||||
<a href="/dev">Development</a>
|
||||
</li>
|
||||
<li id="screenshots" title="Screenshots">
|
||||
<a href="/screenshots">Screenshots</a>
|
||||
</li>
|
||||
<li id="themes" title="Themes">
|
||||
<a href="/themes">Themes</a>
|
||||
</li>
|
||||
<li id="links" title="Links">
|
||||
<a href="/links">Links</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</aside>
|
||||
<article>
|
||||
The Workspace
|
||||
=============
|
||||
|
||||
Working with Menus
|
||||
------------------
|
||||
|
||||
Menus provide a list of commands that you can execute.
|
||||
|
||||
.. figure:: guide/images/menu.gif
|
||||
:figclass: borderless
|
||||
:alt: An Example Menu
|
||||
|
||||
To execute a command listed in a menu, click in the corresponding item. The
|
||||
item will blink telling that the command is going to be executed.
|
||||
|
||||
Grayed commands are disabled and cannot be executed at that moment. If you
|
||||
click on them nothing will happen.
|
||||
|
||||
Some menu entries have a little triangular indicator at the right. Selecting
|
||||
these entries will open a submenu, with a new list of commands.
|
||||
|
||||
You can use the keyboard to traverse and execute commands in some of the menus.
|
||||
First you must hit the key used to open the menu - like F12 for the root menu -
|
||||
to enable keyboard traversal of it. Then you can use the Up and Down arrow keys
|
||||
to change the current selected item and the Left and Right arrow keys to jump
|
||||
between submenus and parent menus. To execute the current selected item press
|
||||
Return. To close the menu or stop menu traversal, press Escape. Additionally,
|
||||
pressing the first letter for an menu item, will jump the current selection to
|
||||
that item.
|
||||
|
||||
You can make frequently used menus "stick" to the workspace by dragging the
|
||||
titlebar of the menu. This will make a close button appear in the menu
|
||||
titlebar. If you want to close the menu, just click in that button.
|
||||
|
||||
Menus are normally placed on top of other windows and cannot be obscured by
|
||||
them. If you want the menus to be able to be obscured by lowering them, double
|
||||
click the menu titlebar while holding the Meta key. Repeat this to make the
|
||||
menus not obscurable again.
|
||||
|
||||
|
||||
The Root Window Menu
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The *Root Window Menu* or *Applications Menu* has items that allow you to
|
||||
quickly launch applications and do some workspace management.
|
||||
|
||||
To open this menu, click on the workspace (root window) with the 3rd mouse
|
||||
button or hit the key bound to it (F12 by default).
|
||||
|
||||
The contents of the applications menu can be configured to hold the
|
||||
applications installed on your system. To learn how to configure it, read the
|
||||
section on application menu configuration.
|
||||
|
||||
|
||||
The Window List Menu
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Clicking in the workspace with the middle mouse button will open a menu listing
|
||||
all windows that currently exist, with the workspace in which the window is
|
||||
located to its right. The current focused window is marked by a diamond sign
|
||||
next to its name. Clicking in an entry in this menu will focus the window,
|
||||
raise it, and change to the workspace where it is located.
|
||||
|
||||
|
||||
Working with Applications
|
||||
-------------------------
|
||||
|
||||
In WindowMaker the instance of a running application is represented by an
|
||||
application icon. Do not confuse it with the icons (miniwindows in WindowMaker)
|
||||
displayed by other window managers when a window is iconified. Application
|
||||
icons and miniwindows can be differentiated in that miniwindows have titlebars,
|
||||
application icons do not.
|
||||
|
||||
WindowMaker identifies a group of windows as belonging to a single instance of
|
||||
an application through some standard hints that the application sets in its
|
||||
windows. Unfortunately, not all applications that exist set these hints,
|
||||
preventing some application-specific features from working. These hints are
|
||||
**WM.CLASS**, **WM.COMMAND**, and **WM.CLIENT.LEADER** or the group leader in
|
||||
**WM.HINTS**.
|
||||
|
||||
Note: The information about applications contained in this section only applies
|
||||
to versions of WindowMaker built without the --enable-single-icon compile time
|
||||
option. This option is unsupported and behaviour when it's enabled will not be
|
||||
covered in this text.
|
||||
|
||||
|
||||
Hiding an Application
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
If you want to close and application but intend to use it later you can *hide*
|
||||
it. When you hide an application all windows and miniwindows that belong to
|
||||
that application will be removed from the screen and hidden into its
|
||||
application icon.
|
||||
|
||||
To hide an application:
|
||||
|
||||
- Click the miniaturize button of any of the windows that belong to the
|
||||
application while holding the Control key.
|
||||
|
||||
OR
|
||||
|
||||
- Press the keyboard shortcut assigned to it, which is Meta+h in the default
|
||||
configuration.
|
||||
|
||||
OR
|
||||
|
||||
- User the hide command in the `window commands menu
|
||||
<chap2.html#the-window-commands-menu>`_ brought up when the window titlebar
|
||||
is clicked with the right mouse button.
|
||||
|
||||
OR
|
||||
|
||||
- Use the (Un)Hide command in the application icon commands menu brought up
|
||||
when the application icon is clicked with the right mouse button.
|
||||
|
||||
To unhide an application
|
||||
|
||||
- Double click the application icon with the left mouse button.
|
||||
|
||||
OR
|
||||
|
||||
- Use the (Un)Hide command in the application icon commands menu brought up
|
||||
when the application icon is clicked with the right mouse button.
|
||||
|
||||
When you unhide an application, all it's windows and miniwindows will brought
|
||||
back, and you will be taken to the last workspace in which you worked with that
|
||||
application.
|
||||
|
||||
**Extra Bindings**
|
||||
|
||||
+-----------------------------------+------------------------------------+
|
||||
| Action | Effect |
|
||||
+===================================+====================================+
|
||||
| Double-click the application icon | Unhide the clicked application, |
|
||||
| while holding the Meta key | and hide all other applications |
|
||||
| | that are present in the current |
|
||||
| | workspace. |
|
||||
+-----------------------------------+------------------------------------+
|
||||
| Double-click the application icon | Unhide the clicked application in |
|
||||
| while holding the Shift key | the current workspace |
|
||||
+-----------------------------------+------------------------------------+
|
||||
| Double-click the application icon | Unhide the clicked application and |
|
||||
| with the middle mouse button | deminiaturize all its windows. |
|
||||
+-----------------------------------+------------------------------------+
|
||||
| Double-click the window titlebar | Hide all applications in the |
|
||||
| with the right mouse button while | current workspace except for the |
|
||||
| holding the Meta key. | clicked one. |
|
||||
+-----------------------------------+------------------------------------+
|
||||
|
||||
|
||||
There are two other commands in the applications menu related to application
|
||||
hiding:
|
||||
|
||||
Hide others
|
||||
Hide all applications in the current workspace, except for the currently
|
||||
active one.
|
||||
|
||||
Show All
|
||||
Unhide all applications that were hidden from the current workspace
|
||||
|
||||
|
||||
The Application Icon Menu
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
A menu with commands that will apply to the application can be brought up by
|
||||
clicking the application icon with the right mouse button.
|
||||
|
||||
The commands available in this menu are:
|
||||
|
||||
Unhide Here
|
||||
Unhides the application in the current workspace.
|
||||
|
||||
(Un)Hide
|
||||
Hides the application. Unless the application is already hidden, in which
|
||||
case it will unhide the application and take you to its workspace.
|
||||
|
||||
Set Icon...
|
||||
Opens the icon image selection panel for the application icon.
|
||||
|
||||
Kill
|
||||
Will kill the application.
|
||||
|
||||
|
||||
The Application Dock
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The application dock is a place where you can store frequently used
|
||||
applications for easy and fast access. It is located, by default, on the right
|
||||
side of the screen.
|
||||
|
||||
You can click the top icon (the one with the GNUstep logo) and drag it downward
|
||||
to remove most of the dock from view. You can also drag it sideways to move
|
||||
the entire dock from side of the screen to the other.
|
||||
|
||||
A menu similar to the `application icon menu <#the-application-icon-menu>`_ is
|
||||
brought up when you click a docked icon with the right mouse button.
|
||||
|
||||
To make the dock *float* over windows (not be coverable by windows), either
|
||||
double-click the top dock icon while holding the Meta key, or select the
|
||||
"Floating Dock" option in the dock menu.
|
||||
|
||||
|
||||
Starting a docked application
|
||||
.............................
|
||||
|
||||
To start an application that is docked, double-click its icon. The icon will be
|
||||
briefly highlighted and the application will start.
|
||||
|
||||
While an application is not running an ellipsis is present in the lower
|
||||
left-hand corner of the icon. This ellipsis will disappear when the application
|
||||
is started and reappear when the application is exited.
|
||||
|
||||
While the application is running the docked icon will behave just like a
|
||||
normal, undocked application icon, except for some extra actions specific to
|
||||
the dock.
|
||||
|
||||
To start a docked application:
|
||||
|
||||
- Double-click the application icon with the left mouse button.
|
||||
|
||||
OR
|
||||
|
||||
- Use the "Launch" command in the dock menu for the icon. If the application is
|
||||
already running it will start another instance.
|
||||
|
||||
OR
|
||||
|
||||
- Hold the Control key while double-clicking the icon to start another instance
|
||||
of the application.
|
||||
|
||||
If a new instance of an already running application is started it will get a
|
||||
new application icon.
|
||||
|
||||
|
||||
Customizing the dock
|
||||
....................
|
||||
|
||||
To add new applications to the dock, you can click an application icon and drag
|
||||
it onto the dock. When a ghost image of the icon appears you can release the
|
||||
mouse button and the icon will be docked.
|
||||
|
||||
To reorder the docked applications, drag an icon to an empty slot and move the
|
||||
icons around as you want.
|
||||
|
||||
To remove a docked application, drag it from the dock and release the mouse
|
||||
button when the ghost image disappears. To remove the icon of an application
|
||||
that is running, hold the Meta key while dragging it.
|
||||
|
||||
|
||||
Configuring the docked application
|
||||
..................................
|
||||
|
||||
To change the settings of a docked application, select the "Settings..." item
|
||||
in the dock menu for that icon. A settings panel for that icon will appear.
|
||||
|
||||
.. figure:: guide/images/dockapppanel.gif
|
||||
:figclass: borderless
|
||||
:alt: Docked Application Settings Panel
|
||||
|
||||
In the *Application path and arguments* field, the path for the application and
|
||||
its arguments can be changed. Note that you can't change the application that
|
||||
is represented in the icon or change anything that would cause the application
|
||||
name to be changed. For example, if the icon is for ``xterm`` you can't change
|
||||
the field's value to **ghostview**; or if the icon is for ``xterm -name vi``,
|
||||
you can't change it to ``xterm -name pine``. Also note that you cannot use
|
||||
shell commands, such as output redirectors. (``>``, ``>>``; etc.)
|
||||
|
||||
|
||||
Working with Workspaces
|
||||
-----------------------
|
||||
|
||||
The Workspaces Menu
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The *Workspaces Menu* allows you to create, switch, destroy and rename
|
||||
workspaces.
|
||||
|
||||
It has the following items:
|
||||
|
||||
New
|
||||
Creates a new workspace and automatically switches to it
|
||||
|
||||
Destroy Last
|
||||
Destroys the last workspace unless it is occupied
|
||||
|
||||
Workspaces
|
||||
Each workspace has a corresponding item in the Workspaces menu. Clicking in
|
||||
one of these entries will switch from the current workspace to the selected
|
||||
workspace.
|
||||
|
||||
The current active workspace is indicated by a small indicator at the left of
|
||||
the workspace item.
|
||||
|
||||
.. figure:: guide/images/wsmenu.gif
|
||||
:figclass: borderless
|
||||
:alt: Workspace Menu
|
||||
|
||||
To change the name of a workspace you must first "stick" the menu. Then Control
|
||||
click in the item corresponding to the workspace you want to rename. The item
|
||||
will turn into a editable text field where you can edit the workspace name. To
|
||||
finish editing the workspace name, press Return; to cancel it, press Escape.
|
||||
|
||||
There is a limit of 16 characters on the length of the workspace name.
|
||||
|
||||
An example Workspace menu being edited:
|
||||
|
||||
.. figure:: guide/images/wsmenued.gif
|
||||
:figclass: borderless
|
||||
:alt: Workspace Menu: Editing a Workspace name
|
||||
|
||||
|
||||
The workspace clip
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. WTF is that??
|
||||
|
||||
[This section was unavailable in the original, and thus is not here]
|
||||
|
||||
</article>
|
||||
<div id="titlebar">
|
||||
<div id="minimize"></div>
|
||||
<div id="titlebar-inner">Window Maker: User Guide - Workspace</div>
|
||||
<div id="close"></div>
|
||||
</div>
|
||||
<div id="resizebar">
|
||||
<div id="resizel"></div>
|
||||
<div id="resizebar-inner">
|
||||
</div>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
1271
docs/chap4.html
Normal file
843
docs/chap4.rst
Normal file
@@ -0,0 +1,843 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Window Maker: User Guide - Configuration</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="/style.css" media="screen">
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, minimumscale=1.0, maximum-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<header>
|
||||
<h1>
|
||||
<a href="/">
|
||||
<span class="first">Window</span><span class="second">Maker</span>
|
||||
</a>
|
||||
</h1>
|
||||
</header>
|
||||
<aside>
|
||||
<nav class="menu">
|
||||
<ul>
|
||||
<li id="dock">
|
||||
<a href="#"></a>
|
||||
</li>
|
||||
<li id="home" title="Home">
|
||||
<a href="/">Home</a>
|
||||
</li>
|
||||
<li id="news" title="News">
|
||||
<a href="/news">News</a>
|
||||
</li>
|
||||
<li id="docs" title="Documentation">
|
||||
<a href="/docs">Documentation</a>
|
||||
</li>
|
||||
<li id="mail" title="Mailing lists">
|
||||
<a href="/lists">Mailing</a>
|
||||
</li>
|
||||
<li id="devel" title="Development">
|
||||
<a href="/dev">Development</a>
|
||||
</li>
|
||||
<li id="screenshots" title="Screenshots">
|
||||
<a href="/screenshots">Screenshots</a>
|
||||
</li>
|
||||
<li id="themes" title="Themes">
|
||||
<a href="/themes">Themes</a>
|
||||
</li>
|
||||
<li id="links" title="Links">
|
||||
<a href="/links">Links</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</aside>
|
||||
<article>
|
||||
Configuring Window Maker
|
||||
========================
|
||||
|
||||
.. contents::
|
||||
:backlinks: none
|
||||
:local:
|
||||
|
||||
The Defaults System
|
||||
-------------------
|
||||
|
||||
WindowMaker uses a defaults database for storing various information, like
|
||||
configurations and other data that must be kept between sessions (like the list
|
||||
of applications of a saved session). The defaults database is stored as
|
||||
*property lists* in the $(HOME)/GNUstep/Defaults directory. Each file in the
|
||||
$(HOME)/GNUstep/Defaults directory contains data that belongs to a specific
|
||||
*domain*.
|
||||
|
||||
Any application can use the defaults database to store its information.
|
||||
Generally an application will have one or more *domains* that belong to it.
|
||||
|
||||
Property list File Format
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The syntax of the property list is simple, but, if you need to change it
|
||||
manually you must take care not to leave any syntax errors.
|
||||
|
||||
The EBNF for the property list is the following:
|
||||
|
||||
**Description of the syntax of a property list in the Bacchus Naur Form (BNF)**
|
||||
|
||||
.. code::
|
||||
:class: highlight
|
||||
|
||||
<object> ::= <string> | <data> | <array> | <dictionary>
|
||||
<string> ::= text with non-alphanumeric characters | alphanumeric text
|
||||
<array> ::= `(' [ <object> { `,' <object> }* ] `)'
|
||||
<dictionary> ::= `{' [ <keyval_pair> { `,' <keyval_pair> }* ] `}'
|
||||
<keyval_pair> ::= <string> `=' <object> `;'
|
||||
|
||||
|
||||
**Example property list file**
|
||||
|
||||
.. code::
|
||||
:class: highlight
|
||||
|
||||
{
|
||||
"*" = {
|
||||
Icon = "defaultAppIcon.xpm";
|
||||
};
|
||||
"xterm.XTerm" = {
|
||||
Icon = "xterm.xpm";
|
||||
};
|
||||
xconsole = {
|
||||
Omnipresent = YES;
|
||||
NoTitlebar = YES;
|
||||
KeepOnTop = NO;
|
||||
};
|
||||
}
|
||||
|
||||
The property list above is a dictionary with 3 dictionaries inside. The first
|
||||
is keyed by "*", the second by "XTerm.xterm" and the last by "xconsole".
|
||||
|
||||
Note that all strings that have non-alphabetic or numeric characters (like a
|
||||
dot "." or the asterisk "*" are enclosed by double quotes. Strings with only
|
||||
alphanumeric characters may or may not be enclosed in double quotes, as they
|
||||
will not make any difference.
|
||||
|
||||
Here is another example:
|
||||
|
||||
.. code::
|
||||
:class: highlight
|
||||
|
||||
{
|
||||
FTitleBack = ( hgradient, gray, "#112233" );
|
||||
}
|
||||
|
||||
|
||||
The property list in the example above contains an array with 3 elements with a
|
||||
key named "FTitleBack".
|
||||
|
||||
Except for cases like file names and paths, all value strings are case
|
||||
insensitive, i.e.: YES = Yes = yes = yEs.
|
||||
|
||||
|
||||
Value Types
|
||||
~~~~~~~~~~~
|
||||
|
||||
Here is a description of some of the types of values that an option might have:
|
||||
|
||||
+------------------+--------------------------------------------+
|
||||
| Type | Value |
|
||||
+==================+============================================+
|
||||
| boolean | YES or NO |
|
||||
+------------------+--------------------------------------------+
|
||||
| integer | any integer number, usually limited |
|
||||
| | by a range that will be indicated |
|
||||
+------------------+--------------------------------------------+
|
||||
| positive integer | any integer number greater than or |
|
||||
| | equal to zero (0) a |
|
||||
+------------------+--------------------------------------------+
|
||||
| speed | UltraFast, Fast, Medium, Slow, or VerySlow |
|
||||
+------------------+--------------------------------------------+
|
||||
| mouse button | Left, Middle, Right, Button1, Button2, |
|
||||
| | Button3, Button4, or Button5 |
|
||||
+------------------+--------------------------------------------+
|
||||
|
||||
|
||||
Preferences
|
||||
~~~~~~~~~~~
|
||||
|
||||
General preference options are stored in the *WindowMaker* domain; i.e. the
|
||||
$(HOME)/GNUstep/Defaults/WindowMaker file.
|
||||
|
||||
Changes in preference options will automatically affect the current WindowMaker
|
||||
session, without a restart. Some options, however, require a restart of
|
||||
WindowMaker before they take effect. Such options are marked with a * .
|
||||
|
||||
Note that values marked as *Default* are values that are assumed if the option
|
||||
is not specified, instead of *factory default* values that are set in the
|
||||
preference file.
|
||||
|
||||
.. TODO there is no point for describing all of the options. There is a lot of
|
||||
them added, some of the changed and possibly removed. Let's treat them as
|
||||
the advanced configuration and point to the right sources, where one can
|
||||
easily figure out which options take which values
|
||||
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| Option | Value | Description |
|
||||
+============================+=====================+======================================+
|
||||
| PixmapPath | list of directories | A list of directories where pixmaps |
|
||||
| | separated by ":" | can be found. The pixmaps for things |
|
||||
| | (default: depends | like icons, are searched in these |
|
||||
| | on the system) | paths in order of appearance. |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| `*NoDithering` | boolean | Disable internal dithering of |
|
||||
| | (default: NO) | images. Not recommended for displays |
|
||||
| | | with less than 8 bits per pixel. |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| `*ColormapSize` | integer number > 1 | Number of colors for each of the |
|
||||
| | (default: 4) | red, green and blue components to be |
|
||||
| | | used for the dithering colormap. |
|
||||
| | | This value must be greater than 1 |
|
||||
| | | and smaller than 6 for 8bpp |
|
||||
| | | displays. It only makes sense on |
|
||||
| | | PseudoColor displays. This option |
|
||||
| | | has not effect on TrueColor |
|
||||
| | | displays. Larger values result in |
|
||||
| | | better appearance, but leaves less |
|
||||
| | | colors for other applications. |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| `*ModifierKey` | modifier key name | The key to use as the modifier being |
|
||||
| | (default: Mod1) | referred as Meta in this manual, |
|
||||
| | | like Meta dragging a window to move |
|
||||
| | | it. Valid values are Alt, Meta, |
|
||||
| | | Super, Hyper, Mod1, Mod2, Mod3, |
|
||||
| | | Mod4, Mod5. |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| UseSaveUnders | boolean | Use *saveunders* in WindowMaker |
|
||||
| | (default: NO) | windows. This can improve |
|
||||
| | | performance but increases memory |
|
||||
| | | usage. It also can cause problems |
|
||||
| | | with refreshing in some |
|
||||
| | | applications. |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| DisableClip | boolean | Will remove the application Clip |
|
||||
| | (default: NO) | from the workspace. |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| DisableDock | boolean | Will remove the application Dock |
|
||||
| | (default: NO) | from the workspace |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| Superfluous | boolean | Enable extra animations and other |
|
||||
| | (default: NO) | cosmetic things that might increase |
|
||||
| | | peak memory and CPU usage. |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| SaveSessionOnExit | boolean | Automatically save the state of the |
|
||||
| | (default: NO) | session when exiting WindowMaker. |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| `*IconSize` | integer > 4 | The size of application icons and |
|
||||
| | (default: 64) | miniwindows. |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| OpaqueMove | boolean | Whether the whole window should be |
|
||||
| | (default: NO) | moved while dragging it, or, if only |
|
||||
| | | it's frame should be dragged. |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| FocusMode | Manual or | The mode of input focus setting. |
|
||||
| | ClickToFocus, Auto | Refer to section `Focusing a Window |
|
||||
| | or | <chap2.html#focusing-a-window>`_ |
|
||||
| | FocusFollowsMouse, | |
|
||||
| | SemiAuto or Sloppy | |
|
||||
| | (default: | |
|
||||
| | ClickToFocus) | |
|
||||
| | | |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| IgnoreFocusClick | boolean | Whether the mouse click use to focus |
|
||||
| | (default: NO) | a window should be ignore or treated |
|
||||
| | | normally. |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| AutoFocus | boolean | Whether newly created windows should |
|
||||
| | (default: NO) | receive input focus. Do not confuse |
|
||||
| | | with FocusMode=Auto. |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| RaiseDelay | integer number | How many tenths of a second to wait |
|
||||
| | (default: 0) | before raising a window in Auto or |
|
||||
| | | Semi-Auto focus mode. 0 disables |
|
||||
| | | this feature. |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| DoubleClickTime | integer number | If two mouse clicks occur in this |
|
||||
| | (default: 250) | interval of time, it will be |
|
||||
| | | considered a double click. |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| ColorMapMode | Manual or | The mode of colormap setting. In |
|
||||
| | ClickToFocus, | *Manual* or *ClickToFocus* mode, the |
|
||||
| | Auto or | colormap is set to the one belonging |
|
||||
| | FocusFollowsMouse | to the current focused window. In |
|
||||
| | (default: auto) | *Auto* or *FocusFollowsMouse* mode, |
|
||||
| | | the colormap is set to the one |
|
||||
| | | belonging to the window under the |
|
||||
| | | pointer. |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| CirculateRaise | boolean | Whether the window should be raised |
|
||||
| | (default: NO) | when circulating. (focus the next or |
|
||||
| | | previous window through the |
|
||||
| | | keyboard) |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| OnTopTransients | boolean | Whether transient windows should |
|
||||
| | (default: NO) | always be placed over their owners |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| WindowPlacement | auto, cascade, | Sets placement mode for new windows. |
|
||||
| | manual, or | *Auto* places the window |
|
||||
| | random | automatically in the first open |
|
||||
| | (default: cascade) | space found in the workspace. |
|
||||
| | | *Cascade* places the window in |
|
||||
| | | incrementing positions starting from |
|
||||
| | | the the top-left corner of the |
|
||||
| | | workspace. *Manual* allows you to |
|
||||
| | | place the window interactively with |
|
||||
| | | the mouse. *Random* paces the window |
|
||||
| | | randomly in the workspace. |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| WindowPlaceOrigin | (X,Y) where X | Sets the offset, from the top-left |
|
||||
| | and Y are integer | corner of the screen, to place |
|
||||
| | numbers | windows. In non-manual |
|
||||
| | (default: (0,0)) | WindowPlacement modes windows will |
|
||||
| | | not be placed above or to the left |
|
||||
| | | of this point. |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| AutoArrangeIcons | boolean | Whether icons should be |
|
||||
| | (default: NO) | automatically arranged |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| ResizeDisplay | center, corner, | Selects the type or position of the |
|
||||
| | floating, or | box that shows the window size when |
|
||||
| | line | a window is being resized. *center* |
|
||||
| | (default: corner) | places the box in the center of the |
|
||||
| | | workspace, *corner* places it in the |
|
||||
| | | top-left corner of the workspace, |
|
||||
| | | *floating* places it in the center |
|
||||
| | | of the window being resized and |
|
||||
| | | *line* draws the current window size |
|
||||
| | | over the workspace, like in a |
|
||||
| | | technical drawing. |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| MoveDisplay | center, corner | Selects the type or position of the |
|
||||
| | or floating | box that shows the window position |
|
||||
| | (default: corner) | when a window is being moved. The |
|
||||
| | | value meanings are the same as for |
|
||||
| | | the ResizeDisplay option. |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| AlignSubmenus | boolean | Whether submenus should be aligned |
|
||||
| | (default: NO) | vertically with their parent menus. |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| WrapMenus | boolean | Whether submenus should be placed to |
|
||||
| | (default: NO) | the right of their parent menus when |
|
||||
| | | they don't fit the screen. Note that |
|
||||
| | | menus placed off the screen can be |
|
||||
| | | scrolled. |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| ScrollableMenus | boolean | Whether menus that are not fully |
|
||||
| | (default: NO) | inside the screen should |
|
||||
| | | automatically scroll when the |
|
||||
| | | pointer is over them and near the |
|
||||
| | | border of the screen. |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| MenuScrollSpeed | speed | The scrolling speed of menus. |
|
||||
| | (default: medium) | |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| DontLinkWorkspaces | boolean | Do not automatically switch to the |
|
||||
| | (default: NO) | next or previous workspace when a |
|
||||
| | | window is dragged to the edge of the |
|
||||
| | | screen. |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| NoWindowUnderDock | boolean | When maximizing windows, limit their |
|
||||
| | (default: NO) | sizes so that they will not be |
|
||||
| | | covered by the dock. |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| NoWindowOverIcons | boolean | When maximizing windows, limit their |
|
||||
| | (default: NO) | sizes so that they will cover |
|
||||
| | | miniwindows and application icons. |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| StickyIcons | boolean | Whether miniwindows should be |
|
||||
| | (default: NO) | present in all workspaces. |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| CycleWorkspaces | boolean | Set to YES if you want windows that |
|
||||
| | (default: NO) | are dragged past the last workspace |
|
||||
| | | to be moved to the first workspace, |
|
||||
| | | and vice-versa. |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| AdvanceToNewWorkspace | boolean | Whether windows dragged past the |
|
||||
| | (default: NO) | last workspace should create a new |
|
||||
| | | workspace. |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| DisableAnimations | boolean | Whether animations, like the one |
|
||||
| | (default: NO) | done during minimization, should be |
|
||||
| | | disabled. |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| IconSlideSpeed | speed | The speed of icons when they are |
|
||||
| | (default: medium) | being slid across the workspace. |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| ShadeSpeed | speed | The speed of the shading animation. |
|
||||
| | (default: medium) | |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| DisableSound | boolean | Whether sound support in WindowMaker |
|
||||
| | (default: NO) | should be disabled |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| `*DisableWSMouseActions` | boolean | Whether actions in the workspace |
|
||||
| | (default: NO) | triggered by mouse-clicks should be |
|
||||
| | | disabled. This allows the use of |
|
||||
| | | file and desktop managers that place |
|
||||
| | | icons on the root window (such as |
|
||||
| | | KDE). |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| SelectWindowMouseButton | mouse button | The mouse button that activates |
|
||||
| | (default: left) | selection of multiple windows in the |
|
||||
| | | workspace. |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| WindowListMouseButton | mouse button | The mouse button that opens the |
|
||||
| | (default: middle) | window list menu in the workspace. |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
| ApplicationMenuMouseButton | mouse button | The mouse button that opens the |
|
||||
| | (default: right) | applications menu in the workspace. |
|
||||
+----------------------------+---------------------+--------------------------------------+
|
||||
|
||||
|
||||
Appearance Options
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Fonts are specified in the X Logical Font Description format. You can cut and
|
||||
paste these names from programs like ``xfontsel``.
|
||||
|
||||
Colors are specified as color names in the standard X format. This can be any
|
||||
color name shown by the ``showrgb`` program (like black, white or gray) or a
|
||||
color value in the #rrggbb format, where rr, gg and bb is the intensity of the
|
||||
color component (like #ff0000 for pure red or #000080 for medium blue). Note
|
||||
that color names in the #rrggbb format must be enclosed with double quotes.
|
||||
|
||||
Textures are specified as an array, where the first element specifies the
|
||||
texture type followed by a variable number of arguments.
|
||||
|
||||
Valid texture types are:
|
||||
|
||||
(solid, color)
|
||||
the texture is a simple solid color.
|
||||
|
||||
|
||||
(dgradient, color1, color2)
|
||||
the texture is a diagonal gradient rendered from the top-left corner to the
|
||||
bottom-right corner. The first argument (color1) is the color for the
|
||||
top-left corner and the second (color2) is for the bottom-right corner.
|
||||
|
||||
(hgradient, color1, color2)
|
||||
the texture is a horizontal gradient rendered from the left edge to the
|
||||
right edge. The first argument (color1) is the color for the left edge and
|
||||
the second (color2) is for the right edge.
|
||||
|
||||
(vgradient, color1, color2)
|
||||
the texture is a vertical gradient rendered from the top edge to the bottom
|
||||
edge. The first argument (color1) is the color for the top edge and the
|
||||
second (color2) is for the bottom edge.
|
||||
|
||||
|
||||
(mdgradient, color1, color2,...,color*n*)
|
||||
this is equivalent to drgadient, but you can specify more than two colors
|
||||
|
||||
(mhgradient, color1, color2,...,color*n*)
|
||||
this is equivalent to hrgadient, but you can specify more than two colors
|
||||
|
||||
|
||||
(mvgradient, color1, color2,...,color<i>n</i>)
|
||||
this is equivalent to vrgadient, but you can specify more than two colors
|
||||
|
||||
**Examples**:
|
||||
|
||||
.. figure:: guide/images/texsolid.gif
|
||||
:figclass: borderless
|
||||
:alt: Solid Color
|
||||
|
||||
(solid, gray)
|
||||
|
||||
.. figure:: guide/images/texdgrad.gif
|
||||
:figclass: borderless
|
||||
:alt: Diagoonal Gradient
|
||||
|
||||
(dgradient, gray80, gray20)
|
||||
|
||||
.. figure:: guide/images/texhgrad.gif
|
||||
:figclass: borderless
|
||||
:alt: Horizontal Gradient
|
||||
|
||||
(hgradient, gray80, gray20)
|
||||
|
||||
.. figure:: guide/images/texvgrad.gif
|
||||
:figclass: borderless
|
||||
:alt: Vertical Gradient
|
||||
|
||||
(vgradient, gray80, gray20)
|
||||
|
||||
|
||||
+--------------------+----------------------+----------------------------------------+
|
||||
| Option | Value | Description |
|
||||
+====================+======================+========================================+
|
||||
| `*NewStyle` | boolean | Selects between N*XTSTEP style buttons |
|
||||
| | (default: NO) | in the titlebar and a newer style of |
|
||||
| | | buttons. |
|
||||
+--------------------+----------------------+----------------------------------------+
|
||||
| WidgetColor | (solid, color) | Chooses the color to be used in |
|
||||
| | where color is a | titlebar buttons if NewStyle=No; |
|
||||
| | color name | |
|
||||
| | (default: | |
|
||||
| | (solid, grey)) | |
|
||||
+--------------------+----------------------+----------------------------------------+
|
||||
| WorkspaceBack | a texture or | Default texture for the workspace |
|
||||
| | none | background. Note the *dgradient* and |
|
||||
| | (default: none) | *mdgradient* textures can take a lot |
|
||||
| | | of time to be rendered. |
|
||||
+--------------------+----------------------+----------------------------------------+
|
||||
| IconBack | texture | Texture for the background of icons |
|
||||
| | (default: | and miniwindows. |
|
||||
| | (solid, grey)) | |
|
||||
+--------------------+----------------------+----------------------------------------+
|
||||
| FTitleBack | texture | Texture for the focused window |
|
||||
| | (default: | titlebar. |
|
||||
| | (solid, black)) | |
|
||||
+--------------------+----------------------+----------------------------------------+
|
||||
| PTitleBack | texture | Texture for the titlebar of the parent |
|
||||
| | (default: | window of the currently focused |
|
||||
| | (solid, "#616161")) | transient window |
|
||||
+--------------------+----------------------+----------------------------------------+
|
||||
| UTitleBack | texture | Texture for unfocused window |
|
||||
| | (default: | titlebars. |
|
||||
| | (solid, gray)) | |
|
||||
+--------------------+----------------------+----------------------------------------+
|
||||
| MenuTitleBack | texture | Texture for menu titlebars. |
|
||||
| | (default: | |
|
||||
| | (solid, black)) | |
|
||||
+--------------------+----------------------+----------------------------------------+
|
||||
| MenuTextBack | texture | Texture for menu items |
|
||||
| | (default: | |
|
||||
| | (solid, gray)) | |
|
||||
| | | |
|
||||
+--------------------+----------------------+----------------------------------------+
|
||||
| FTitleColor | color | The color of the text in the focused |
|
||||
| | (default: white) | window titlebar. |
|
||||
+--------------------+----------------------+----------------------------------------+
|
||||
| PTitleColor | color | Color for the text in the titlebar of |
|
||||
| | (default: white) | the parent window of the currently |
|
||||
| | | focused transient. |
|
||||
+--------------------+----------------------+----------------------------------------+
|
||||
| UTitleColor | color | The color for the text in the titlebar |
|
||||
| | (default: black) | of unfocused windows. |
|
||||
+--------------------+----------------------+----------------------------------------+
|
||||
| MenuTitleColor | color | Color for the text in menu titlebars |
|
||||
| | (default: white) | |
|
||||
+--------------------+----------------------+----------------------------------------+
|
||||
| MenuTextColor | color | Color for the text in menu items |
|
||||
| | (default: black) | |
|
||||
+--------------------+----------------------+----------------------------------------+
|
||||
| HighlightColor | color | Color for the highlighted item in |
|
||||
| | (default: white) | menus. |
|
||||
+--------------------+----------------------+----------------------------------------+
|
||||
| HighlightTextColor | color | Color for the highlighted item text in |
|
||||
| | (default: black) | menus. |
|
||||
+--------------------+----------------------+----------------------------------------+
|
||||
| MenuDisabledColor | color | Color for the text of disabled menu |
|
||||
| | (default: "#616161") | items. |
|
||||
+--------------------+----------------------+----------------------------------------+
|
||||
| ClipTitleColor | color | Color for the text in the clip. |
|
||||
| | (default: black) | |
|
||||
+--------------------+----------------------+----------------------------------------+
|
||||
| CClipTitleColor | color | Color for the text in the collapsed |
|
||||
| | (default: "#454045") | clip. |
|
||||
+--------------------+----------------------+----------------------------------------+
|
||||
| WindowTitleFont | font (default: | Font for the text in window |
|
||||
| | Helvetica bold 12) | titlebars. |
|
||||
+--------------------+----------------------+----------------------------------------+
|
||||
| MenuTitleFont | font (default: | Font for the text in menu titlebars) |
|
||||
| | Helvetica bold 12) | |
|
||||
+--------------------+----------------------+----------------------------------------+
|
||||
| MenuTextFont | font (default: | Font for the text in menu items |
|
||||
| | Helvetica medium 12) | |
|
||||
+--------------------+----------------------+----------------------------------------+
|
||||
| IconTitleFont | font (default: | Font for the text in miniwindow |
|
||||
| | Helvetica medium 8) | titlebars. |
|
||||
+--------------------+----------------------+----------------------------------------+
|
||||
| ClipTitleFont | font (default: | Font for the text in the clip. |
|
||||
| | Helvetica bold 10) | |
|
||||
+--------------------+----------------------+----------------------------------------+
|
||||
| Displayfont | font (default: | Font for the text information in |
|
||||
| | Helvetica medium 12) | windows, like the size of windows |
|
||||
| | | during resize. |
|
||||
+--------------------+----------------------+----------------------------------------+
|
||||
| TitleJustify | center, left, | Justification of the text in window |
|
||||
| | or right | titlebars. |
|
||||
| | (default: center) | |
|
||||
+--------------------+----------------------+----------------------------------------+
|
||||
|
||||
|
||||
Keyboard Bindings
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
Keyboard shortcut specifications are in the form:
|
||||
|
||||
.. code::
|
||||
:class: highlight
|
||||
|
||||
[<modifier key names> + ] <key name>
|
||||
|
||||
Where *modifier key names* specify an optional modifier key, like Meta or
|
||||
Shift. Any number of modifier keys might be specified. The *key name* is the
|
||||
actual key that will trigger the action bound to the option.
|
||||
|
||||
Examples:
|
||||
|
||||
[F10]
|
||||
Means the F10 key.
|
||||
|
||||
Meta+TAB
|
||||
Means the TAB key with the Meta modifier key pressed at the same time.
|
||||
|
||||
Meta+Shift+TAB
|
||||
Means the TAB key with the Meta and Shift modifier keys pressed at the same
|
||||
time.
|
||||
|
||||
Key names can be found at /usr/X11R6/include/X11/keysymdef.h The *XK_* prefixes
|
||||
must be ignored (if key name is *XK_Return* use *Return*).
|
||||
|
||||
+-----------------------+---------------+-----------------------------------------+
|
||||
| Option | Default Value | Description |
|
||||
+=======================+===============+=========================================+
|
||||
| RootMenuKey | None | Opens the `root window menu |
|
||||
| | | <chap3.html#the-root-window-menu>`_ |
|
||||
| | | at the current position of the |
|
||||
| | | mouse pointer. |
|
||||
+-----------------------+---------------+-----------------------------------------+
|
||||
| WindowListKey | None | Opens the `window list menu`_ |
|
||||
| | | menu at the current position of the |
|
||||
| | | mouse pointer. |
|
||||
+-----------------------+---------------+-----------------------------------------+
|
||||
| WindowMenuKey | None | Opens the `window commands menu |
|
||||
| | | <chap2.html#the-window-commands-menu>`_ |
|
||||
| | | for the currently focused window. |
|
||||
+-----------------------+---------------+-----------------------------------------+
|
||||
| MiniaturizeKey | None | Miniaturizes the currently focused |
|
||||
| | | window. |
|
||||
+-----------------------+---------------+-----------------------------------------+
|
||||
| HideKey | None | Hides the currently active |
|
||||
| | | application. |
|
||||
+-----------------------+---------------+-----------------------------------------+
|
||||
| CloseKey | None | Closes the current focused window |
|
||||
+-----------------------+---------------+-----------------------------------------+
|
||||
| MaximizeKey | None | Maxmizes the currently focused window. |
|
||||
+-----------------------+---------------+-----------------------------------------+
|
||||
| VMaximizeKey | None | Vertically Maximizes the currently |
|
||||
| | | focused window. |
|
||||
+-----------------------+---------------+-----------------------------------------+
|
||||
| RaiseKey | Meta+Up | Raises the currently focused window. |
|
||||
+-----------------------+---------------+-----------------------------------------+
|
||||
| LowerKey | Meta+Down | Lowers the currently focused window. |
|
||||
+-----------------------+---------------+-----------------------------------------+
|
||||
| RaiseLowerKey | None | Raises the window under the pointer, |
|
||||
| | | or lowers it if it is already raised. |
|
||||
+-----------------------+---------------+-----------------------------------------+
|
||||
| ShadeKey | None | Shades the currently focused window. |
|
||||
+-----------------------+---------------+-----------------------------------------+
|
||||
| SelectKey | None | Selects current focused window. |
|
||||
+-----------------------+---------------+-----------------------------------------+
|
||||
| FocusNextKey | None | Switch focus to next window. |
|
||||
+-----------------------+---------------+-----------------------------------------+
|
||||
| FocusPrevKey | None | Switch focus to previous window. |
|
||||
+-----------------------+---------------+-----------------------------------------+
|
||||
| NextWorkspaceKey | None | Switches to next workspace. |
|
||||
+-----------------------+---------------+-----------------------------------------+
|
||||
| PrevWorkspaceKey | None | Switches to previous workspace. |
|
||||
+-----------------------+---------------+-----------------------------------------+
|
||||
| NextWorkspaceLayerKey | None | Switches to the next group of 10 |
|
||||
| | | workspaces. |
|
||||
+-----------------------+---------------+-----------------------------------------+
|
||||
| PrevWorkspaceLayerKey | None | Switches to the previous group of |
|
||||
| | | 10 workspaces. |
|
||||
+-----------------------+---------------+-----------------------------------------+
|
||||
| Workspace1Key | None | Switches to workspace 1. |
|
||||
+-----------------------+---------------+-----------------------------------------+
|
||||
| Workspace2Key | None | Switches to workspace 2, creating |
|
||||
| | | it if it does not exist. |
|
||||
+-----------------------+---------------+-----------------------------------------+
|
||||
| Workspace3Key | None | Switches to workspace 3, creating |
|
||||
| | | it if it does not exist. |
|
||||
+-----------------------+---------------+-----------------------------------------+
|
||||
| Workspace4Key | None | Switches to workspace 4, creating |
|
||||
| | | it if it does not exist. |
|
||||
+-----------------------+---------------+-----------------------------------------+
|
||||
| Workspace5Key | None | Switches to workspace 5, creating |
|
||||
| | | it if it does not exist. |
|
||||
+-----------------------+---------------+-----------------------------------------+
|
||||
| Workspace6Key | None | Switches to workspace 6, creating |
|
||||
| | | it if it does not exist. |
|
||||
+-----------------------+---------------+-----------------------------------------+
|
||||
| Workspace7Key | None | Switches to workspace 7, creating |
|
||||
| | | it if it does not exist. |
|
||||
+-----------------------+---------------+-----------------------------------------+
|
||||
| Workspace8Key | None | Switches to workspace 8, creating |
|
||||
| | | it if it does not exist. |
|
||||
+-----------------------+---------------+-----------------------------------------+
|
||||
| Workspace9Key | None | Switches to workspace 9, creating |
|
||||
| | | it if it does not exist. |
|
||||
+-----------------------+---------------+-----------------------------------------+
|
||||
| | | |
|
||||
| Workspace10Key | None | Switches to workspace 10, creating |
|
||||
| | | it if it does not exist. |
|
||||
+-----------------------+---------------+-----------------------------------------+
|
||||
| ClipLowerKey | None | Lowers the clip. |
|
||||
+-----------------------+---------------+-----------------------------------------+
|
||||
| ClipRaiseLowerKEy | None | Raises the clip, or lowers it if |
|
||||
| | | it is already raised. |
|
||||
+-----------------------+---------------+-----------------------------------------+
|
||||
|
||||
|
||||
Window Attributes
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
Window attributes are stored in the $(HOME)/GNUstep/Defaults/WMWindowAttributes
|
||||
file.
|
||||
|
||||
The contents of this file is a dictionary of attribute dictionaries keyed by
|
||||
window names. Like this:
|
||||
|
||||
.. code::
|
||||
:class: highlight
|
||||
|
||||
{
|
||||
"*" = {
|
||||
Icon = "defaultAppIcon.xpm";
|
||||
};
|
||||
"xterm.XTerm" = {
|
||||
Icon = "xterm.xpm";
|
||||
};
|
||||
xconsole = {
|
||||
Omnipresent = YES;
|
||||
NoTitlebar = YES;
|
||||
KeepOnTop = NO;
|
||||
};
|
||||
}
|
||||
|
||||
Window names are in the form [1]_ :
|
||||
|
||||
- <window instance name>.<window class name>
|
||||
|
||||
OR
|
||||
|
||||
- <window instance name>
|
||||
|
||||
OR
|
||||
|
||||
- <window class name>
|
||||
|
||||
Placing an asterisk as the window name means that the values set for that key
|
||||
are to be used as default values for all windows. So, since xconsole does not
|
||||
specify an Icon attribute, it will use the default value, which in the above
|
||||
example is defaultAppIcon.xpm.
|
||||
|
||||
|
||||
**Options:**
|
||||
|
||||
The default is NO for all options
|
||||
|
||||
+---------------------+------------------+-------------------------------------+
|
||||
| Option | Value | Description |
|
||||
+=====================+==================+=====================================+
|
||||
| Icon | pixmap file name | Assigns a pixmap image to be |
|
||||
| | | used as the icon for that window. |
|
||||
+---------------------+------------------+-------------------------------------+
|
||||
| NoTitleBar | boolean | Disables the titlebar in the |
|
||||
| | | window. |
|
||||
+---------------------+------------------+-------------------------------------+
|
||||
| NoResizeBar | boolean | Disables the resizebar in the |
|
||||
| | | window. |
|
||||
+---------------------+------------------+-------------------------------------+
|
||||
| NoMiniaturizeButton | boolean | Remove the miniaturize |
|
||||
| | | button. |
|
||||
+---------------------+------------------+-------------------------------------+
|
||||
| NoCloseButton | boolean | Remove the close button. |
|
||||
+---------------------+------------------+-------------------------------------+
|
||||
| NoHideOthers | boolean | Do not hide the window, or the |
|
||||
| | | application to which the window |
|
||||
| | | belongs when a *Hide Others* |
|
||||
| | | command is issued. |
|
||||
+---------------------+------------------+-------------------------------------+
|
||||
| NoMouseBindings | boolean | Do not grab mouse buttons in that |
|
||||
| | | window. This means that actions |
|
||||
| | | like a Meta-click on the window |
|
||||
| | | will be caught by the application |
|
||||
| | | instead of WindowMaker. |
|
||||
+---------------------+------------------+-------------------------------------+
|
||||
| NoKeyBindings | boolean | Do not grab keys in that window. |
|
||||
| | | This means that keystrokes that |
|
||||
| | | would normally be intercepted by |
|
||||
| | | WindowMaker (because they are |
|
||||
| | | bound to some action), like |
|
||||
| | | Meta+Up, will be passed to the |
|
||||
| | | application. |
|
||||
+---------------------+------------------+-------------------------------------+
|
||||
| NoAppIcon | boolean | Do not create application icon for |
|
||||
| | | the window. This is useful for some |
|
||||
| | | applications that incorrectly get |
|
||||
| | | more than one application icon. |
|
||||
+---------------------+------------------+-------------------------------------+
|
||||
| KeepOnTop | boolean | Always keep the window over other |
|
||||
| | | normal windows. |
|
||||
+---------------------+------------------+-------------------------------------+
|
||||
| Omnipresent | boolean | Make the window be present in all |
|
||||
| | | workspaces, AKA sticky window. |
|
||||
+---------------------+------------------+-------------------------------------+
|
||||
| | | |
|
||||
| SkipWindowList | boolean | Do not list the window in the |
|
||||
| | | `window list menu`_ |
|
||||
+---------------------+------------------+-------------------------------------+
|
||||
| | | |
|
||||
| KeepInsideScreen | boolean | Always keep the window inside the |
|
||||
| | | visible are of the screen. |
|
||||
+---------------------+------------------+-------------------------------------+
|
||||
| Unfocusable | boolean | Do not let the window be focused. |
|
||||
+---------------------+------------------+-------------------------------------+
|
||||
| StartWorkspace | Workspace number | Make the window always be initially |
|
||||
| | or name | shown in the indicated workspace. |
|
||||
+---------------------+------------------+-------------------------------------+
|
||||
|
||||
|
||||
Applications Menu
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
The applications menu (AKA: Root Menu) can be defined in one of two distinct
|
||||
ways:
|
||||
|
||||
- In the form of an array in property list format, in
|
||||
$(HOME)/GNUstep/Defaults/WMRootMenu
|
||||
- In the form of a text file, whose location is present in
|
||||
$(HOME)/GNUstep/Defaults/WMRootMenu
|
||||
|
||||
|
||||
----
|
||||
|
||||
.. [1] You can get the values for these information by running the ``xprop``
|
||||
utility on the desired window. When you do that, it will show the following
|
||||
line, among other things:
|
||||
|
||||
.. code::
|
||||
:class: highlight
|
||||
|
||||
WM_CLASS(STRING) = "xterm", "XTerm"
|
||||
|
||||
The first string (xterm) is the window instance name and the second (XTerm)
|
||||
the window class name.
|
||||
|
||||
|
||||
.. _window list menu: chap3.html#3.12
|
||||
|
||||
</article>
|
||||
<div id="titlebar">
|
||||
<div id="minimize"></div>
|
||||
<div id="titlebar-inner">Window Maker: User Guide - Configuration</div>
|
||||
<div id="close"></div>
|
||||
</div>
|
||||
<div id="resizebar">
|
||||
<div id="resizel"></div>
|
||||
<div id="resizebar-inner">
|
||||
</div>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
87
docs/chap5.html
Normal file
@@ -0,0 +1,87 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Window Maker: User Guide - Tips</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="/style.css" media="screen">
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, minimumscale=1.0, maximum-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<header>
|
||||
<h1>
|
||||
<a href="/">
|
||||
<span class="first">Window</span><span class="second">Maker</span>
|
||||
</a>
|
||||
</h1>
|
||||
</header>
|
||||
<aside>
|
||||
<nav class="menu">
|
||||
<ul>
|
||||
<li id="dock">
|
||||
<a href="#"></a>
|
||||
</li>
|
||||
<li id="home" title="Home">
|
||||
<a href="/">Home</a>
|
||||
</li>
|
||||
<li id="news" title="News">
|
||||
<a href="/news">News</a>
|
||||
</li>
|
||||
<li id="docs" title="Documentation">
|
||||
<a href="/docs">Documentation</a>
|
||||
</li>
|
||||
<li id="mail" title="Mailing lists">
|
||||
<a href="/lists">Mailing</a>
|
||||
</li>
|
||||
<li id="devel" title="Development">
|
||||
<a href="/dev">Development</a>
|
||||
</li>
|
||||
<li id="screenshots" title="Screenshots">
|
||||
<a href="/screenshots">Screenshots</a>
|
||||
</li>
|
||||
<li id="themes" title="Themes">
|
||||
<a href="/themes">Themes</a>
|
||||
</li>
|
||||
<li id="links" title="Links">
|
||||
<a href="/links">Links</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</aside>
|
||||
<article>
|
||||
|
||||
<div class="document" id="tips">
|
||||
<h1 class="title">Tips</h1>
|
||||
|
||||
<ul class="simple">
|
||||
<li><p>If the size of a window gets so large that it doesn't fit on the screen and
|
||||
you can't manipulate it, you can simply hold the Meta key while dragging the
|
||||
window in the client area. This way you can move the window up or down and
|
||||
resize it, if you want.</p></li>
|
||||
<li><p>If you want windows to be able to cover the dock, you can make the dock
|
||||
lowerable by double clicking the first dock icon while holding the Meta key.
|
||||
Then, you can raise and lower the dock through the first icon, just like you
|
||||
do with windows.</p></li>
|
||||
<li><p>If you want windows to be able to cover menus, you can make them lowerable
|
||||
just like the dock by double clicking the titlebar with the Meta key pressed.</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</article>
|
||||
<div id="titlebar">
|
||||
<div id="minimize"></div>
|
||||
<div id="titlebar-inner">Window Maker: User Guide - Tips</div>
|
||||
<div id="close"></div>
|
||||
</div>
|
||||
<div id="resizebar">
|
||||
<div id="resizel"></div>
|
||||
<div id="resizebar-inner">
|
||||
</div>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
85
docs/chap5.rst
Normal file
@@ -0,0 +1,85 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Window Maker: User Guide - Tips</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="/style.css" media="screen">
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, minimumscale=1.0, maximum-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<header>
|
||||
<h1>
|
||||
<a href="/">
|
||||
<span class="first">Window</span><span class="second">Maker</span>
|
||||
</a>
|
||||
</h1>
|
||||
</header>
|
||||
<aside>
|
||||
<nav class="menu">
|
||||
<ul>
|
||||
<li id="dock">
|
||||
<a href="#"></a>
|
||||
</li>
|
||||
<li id="home" title="Home">
|
||||
<a href="/">Home</a>
|
||||
</li>
|
||||
<li id="news" title="News">
|
||||
<a href="/news">News</a>
|
||||
</li>
|
||||
<li id="docs" title="Documentation">
|
||||
<a href="/docs">Documentation</a>
|
||||
</li>
|
||||
<li id="mail" title="Mailing lists">
|
||||
<a href="/lists">Mailing</a>
|
||||
</li>
|
||||
<li id="devel" title="Development">
|
||||
<a href="/dev">Development</a>
|
||||
</li>
|
||||
<li id="screenshots" title="Screenshots">
|
||||
<a href="/screenshots">Screenshots</a>
|
||||
</li>
|
||||
<li id="themes" title="Themes">
|
||||
<a href="/themes">Themes</a>
|
||||
</li>
|
||||
<li id="links" title="Links">
|
||||
<a href="/links">Links</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</aside>
|
||||
<article>
|
||||
Tips
|
||||
====
|
||||
|
||||
- If the size of a window gets so large that it doesn't fit on the screen and
|
||||
you can't manipulate it, you can simply hold the Meta key while dragging the
|
||||
window in the client area. This way you can move the window up or down and
|
||||
resize it, if you want.
|
||||
|
||||
- If you want windows to be able to cover the dock, you can make the dock
|
||||
lowerable by double clicking the first dock icon while holding the Meta key.
|
||||
Then, you can raise and lower the dock through the first icon, just like you
|
||||
do with windows.
|
||||
|
||||
- If you want windows to be able to cover menus, you can make them lowerable
|
||||
just like the dock by double clicking the titlebar with the Meta key pressed.
|
||||
|
||||
</article>
|
||||
<div id="titlebar">
|
||||
<div id="minimize"></div>
|
||||
<div id="titlebar-inner">Window Maker: User Guide - Tips</div>
|
||||
<div id="close"></div>
|
||||
</div>
|
||||
<div id="resizebar">
|
||||
<div id="resizel"></div>
|
||||
<div id="resizebar-inner">
|
||||
</div>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
83
docs/chap6.html
Normal file
@@ -0,0 +1,83 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Window Maker: User Guide - Glossary</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="/style.css" media="screen">
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, minimumscale=1.0, maximum-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<header>
|
||||
<h1>
|
||||
<a href="/">
|
||||
<span class="first">Window</span><span class="second">Maker</span>
|
||||
</a>
|
||||
</h1>
|
||||
</header>
|
||||
<aside>
|
||||
<nav class="menu">
|
||||
<ul>
|
||||
<li id="dock">
|
||||
<a href="#"></a>
|
||||
</li>
|
||||
<li id="home" title="Home">
|
||||
<a href="/">Home</a>
|
||||
</li>
|
||||
<li id="news" title="News">
|
||||
<a href="/news">News</a>
|
||||
</li>
|
||||
<li id="docs" title="Documentation">
|
||||
<a href="/docs">Documentation</a>
|
||||
</li>
|
||||
<li id="mail" title="Mailing lists">
|
||||
<a href="/lists">Mailing</a>
|
||||
</li>
|
||||
<li id="devel" title="Development">
|
||||
<a href="/dev">Development</a>
|
||||
</li>
|
||||
<li id="screenshots" title="Screenshots">
|
||||
<a href="/screenshots">Screenshots</a>
|
||||
</li>
|
||||
<li id="themes" title="Themes">
|
||||
<a href="/themes">Themes</a>
|
||||
</li>
|
||||
<li id="links" title="Links">
|
||||
<a href="/links">Links</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</aside>
|
||||
<article>
|
||||
|
||||
<div class="document" id="glossary">
|
||||
<h1 class="title">Glossary</h1>
|
||||
|
||||
<ul class="simple">
|
||||
<li><p>[drag] to click in an object with the mouse and move the mouse while holding
|
||||
the mouse button.</p></li>
|
||||
<li><p>[miniaturize] (iconify, minimize) to temporarily put a window aside,
|
||||
replacing the window with a miniature representation of it.</p></li>
|
||||
<li><p>[Meta key] depending on the system and keyboard types, this can mean
|
||||
different keys. Under Linux, it is usually the Alt or Alternate key.</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</article>
|
||||
<div id="titlebar">
|
||||
<div id="minimize"></div>
|
||||
<div id="titlebar-inner">Window Maker: User Guide - Glossary</div>
|
||||
<div id="close"></div>
|
||||
</div>
|
||||
<div id="resizebar">
|
||||
<div id="resizel"></div>
|
||||
<div id="resizebar-inner">
|
||||
</div>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
81
docs/chap6.rst
Normal file
@@ -0,0 +1,81 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Window Maker: User Guide - Glossary</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="/style.css" media="screen">
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, minimumscale=1.0, maximum-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<header>
|
||||
<h1>
|
||||
<a href="/">
|
||||
<span class="first">Window</span><span class="second">Maker</span>
|
||||
</a>
|
||||
</h1>
|
||||
</header>
|
||||
<aside>
|
||||
<nav class="menu">
|
||||
<ul>
|
||||
<li id="dock">
|
||||
<a href="#"></a>
|
||||
</li>
|
||||
<li id="home" title="Home">
|
||||
<a href="/">Home</a>
|
||||
</li>
|
||||
<li id="news" title="News">
|
||||
<a href="/news">News</a>
|
||||
</li>
|
||||
<li id="docs" title="Documentation">
|
||||
<a href="/docs">Documentation</a>
|
||||
</li>
|
||||
<li id="mail" title="Mailing lists">
|
||||
<a href="/lists">Mailing</a>
|
||||
</li>
|
||||
<li id="devel" title="Development">
|
||||
<a href="/dev">Development</a>
|
||||
</li>
|
||||
<li id="screenshots" title="Screenshots">
|
||||
<a href="/screenshots">Screenshots</a>
|
||||
</li>
|
||||
<li id="themes" title="Themes">
|
||||
<a href="/themes">Themes</a>
|
||||
</li>
|
||||
<li id="links" title="Links">
|
||||
<a href="/links">Links</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</aside>
|
||||
<article>
|
||||
Glossary
|
||||
========
|
||||
|
||||
- [drag] to click in an object with the mouse and move the mouse while holding
|
||||
the mouse button.
|
||||
|
||||
- [miniaturize] (iconify, minimize) to temporarily put a window aside,
|
||||
replacing the window with a miniature representation of it.
|
||||
|
||||
- [Meta key] depending on the system and keyboard types, this can mean
|
||||
different keys. Under Linux, it is usually the Alt or Alternate key.
|
||||
|
||||
</article>
|
||||
<div id="titlebar">
|
||||
<div id="minimize"></div>
|
||||
<div id="titlebar-inner">Window Maker: User Guide - Glossary</div>
|
||||
<div id="close"></div>
|
||||
</div>
|
||||
<div id="resizebar">
|
||||
<div id="resizel"></div>
|
||||
<div id="resizebar-inner">
|
||||
</div>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
78
docs/chap7.html
Normal file
@@ -0,0 +1,78 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Window Maker: User Guide - Credits</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="/style.css" media="screen">
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, minimumscale=1.0, maximum-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<header>
|
||||
<h1>
|
||||
<a href="/">
|
||||
<span class="first">Window</span><span class="second">Maker</span>
|
||||
</a>
|
||||
</h1>
|
||||
</header>
|
||||
<aside>
|
||||
<nav class="menu">
|
||||
<ul>
|
||||
<li id="dock">
|
||||
<a href="#"></a>
|
||||
</li>
|
||||
<li id="home" title="Home">
|
||||
<a href="/">Home</a>
|
||||
</li>
|
||||
<li id="news" title="News">
|
||||
<a href="/news">News</a>
|
||||
</li>
|
||||
<li id="docs" title="Documentation">
|
||||
<a href="/docs">Documentation</a>
|
||||
</li>
|
||||
<li id="mail" title="Mailing lists">
|
||||
<a href="/lists">Mailing</a>
|
||||
</li>
|
||||
<li id="devel" title="Development">
|
||||
<a href="/dev">Development</a>
|
||||
</li>
|
||||
<li id="screenshots" title="Screenshots">
|
||||
<a href="/screenshots">Screenshots</a>
|
||||
</li>
|
||||
<li id="themes" title="Themes">
|
||||
<a href="/themes">Themes</a>
|
||||
</li>
|
||||
<li id="links" title="Links">
|
||||
<a href="/links">Links</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</aside>
|
||||
<article>
|
||||
|
||||
<div class="document" id="credits">
|
||||
<h1 class="title">Credits</h1>
|
||||
|
||||
<p>The original TeX version of this document was written by Afredo K. Kojima.</p>
|
||||
<p>The HTML conversion was done primarily by Jeremy Crabtree, with assistance from
|
||||
Dan Olav Mikael Hultgren Gudmundsson.</p>
|
||||
</div>
|
||||
|
||||
</article>
|
||||
<div id="titlebar">
|
||||
<div id="minimize"></div>
|
||||
<div id="titlebar-inner">Window Maker: User Guide - Credits</div>
|
||||
<div id="close"></div>
|
||||
</div>
|
||||
<div id="resizebar">
|
||||
<div id="resizel"></div>
|
||||
<div id="resizebar-inner">
|
||||
</div>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
77
docs/chap7.rst
Normal file
@@ -0,0 +1,77 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Window Maker: User Guide - Credits</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="/style.css" media="screen">
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, minimumscale=1.0, maximum-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<header>
|
||||
<h1>
|
||||
<a href="/">
|
||||
<span class="first">Window</span><span class="second">Maker</span>
|
||||
</a>
|
||||
</h1>
|
||||
</header>
|
||||
<aside>
|
||||
<nav class="menu">
|
||||
<ul>
|
||||
<li id="dock">
|
||||
<a href="#"></a>
|
||||
</li>
|
||||
<li id="home" title="Home">
|
||||
<a href="/">Home</a>
|
||||
</li>
|
||||
<li id="news" title="News">
|
||||
<a href="/news">News</a>
|
||||
</li>
|
||||
<li id="docs" title="Documentation">
|
||||
<a href="/docs">Documentation</a>
|
||||
</li>
|
||||
<li id="mail" title="Mailing lists">
|
||||
<a href="/lists">Mailing</a>
|
||||
</li>
|
||||
<li id="devel" title="Development">
|
||||
<a href="/dev">Development</a>
|
||||
</li>
|
||||
<li id="screenshots" title="Screenshots">
|
||||
<a href="/screenshots">Screenshots</a>
|
||||
</li>
|
||||
<li id="themes" title="Themes">
|
||||
<a href="/themes">Themes</a>
|
||||
</li>
|
||||
<li id="links" title="Links">
|
||||
<a href="/links">Links</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</aside>
|
||||
<article>
|
||||
Credits
|
||||
=======
|
||||
|
||||
The original TeX version of this document was written by Afredo K. Kojima.
|
||||
|
||||
The HTML conversion was done primarily by Jeremy Crabtree, with assistance from
|
||||
Dan Olav Mikael Hultgren Gudmundsson.
|
||||
|
||||
</article>
|
||||
<div id="titlebar">
|
||||
<div id="minimize"></div>
|
||||
<div id="titlebar-inner">Window Maker: User Guide - Credits</div>
|
||||
<div id="close"></div>
|
||||
</div>
|
||||
<div id="resizebar">
|
||||
<div id="resizel"></div>
|
||||
<div id="resizebar-inner">
|
||||
</div>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
BIN
docs/guide/images/anatomy.gif
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
docs/guide/images/dockapppanel.gif
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
docs/guide/images/focus.gif
Normal file
|
After Width: | Height: | Size: 7.6 KiB |
BIN
docs/guide/images/menu.gif
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
docs/guide/images/mini.gif
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
docs/guide/images/resizebar.gif
Normal file
|
After Width: | Height: | Size: 818 B |
BIN
docs/guide/images/shade.gif
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
BIN
docs/guide/images/texdgrad.gif
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
docs/guide/images/texhgrad.gif
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
docs/guide/images/texsolid.gif
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
docs/guide/images/texvgrad.gif
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
docs/guide/images/title.gif
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
docs/guide/images/title2.gif
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
docs/guide/images/wiaadvanced.gif
Normal file
|
After Width: | Height: | Size: 8.4 KiB |
BIN
docs/guide/images/wiaappspec.gif
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
BIN
docs/guide/images/wiaattrib.gif
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
BIN
docs/guide/images/wiaiandiw.gif
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
docs/guide/images/wiaspec.gif
Normal file
|
After Width: | Height: | Size: 7.6 KiB |
BIN
docs/guide/images/wsmenu.gif
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
docs/guide/images/wsmenued.gif
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
84
docs/guide_toc.html
Normal file
@@ -0,0 +1,84 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Window Maker: User Guide</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="/style.css" media="screen">
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, minimumscale=1.0, maximum-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<header>
|
||||
<h1>
|
||||
<a href="/">
|
||||
<span class="first">Window</span><span class="second">Maker</span>
|
||||
</a>
|
||||
</h1>
|
||||
</header>
|
||||
<aside>
|
||||
<nav class="menu">
|
||||
<ul>
|
||||
<li id="dock">
|
||||
<a href="#"></a>
|
||||
</li>
|
||||
<li id="home" title="Home">
|
||||
<a href="/">Home</a>
|
||||
</li>
|
||||
<li id="news" title="News">
|
||||
<a href="/news">News</a>
|
||||
</li>
|
||||
<li id="docs" title="Documentation">
|
||||
<a href="/docs">Documentation</a>
|
||||
</li>
|
||||
<li id="mail" title="Mailing lists">
|
||||
<a href="/lists">Mailing</a>
|
||||
</li>
|
||||
<li id="devel" title="Development">
|
||||
<a href="/dev">Development</a>
|
||||
</li>
|
||||
<li id="screenshots" title="Screenshots">
|
||||
<a href="/screenshots">Screenshots</a>
|
||||
</li>
|
||||
<li id="themes" title="Themes">
|
||||
<a href="/themes">Themes</a>
|
||||
</li>
|
||||
<li id="links" title="Links">
|
||||
<a href="/links">Links</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</aside>
|
||||
<article>
|
||||
|
||||
<div class="document">
|
||||
|
||||
|
||||
<ul class="simple">
|
||||
<li><p><a class="reference external" href="chap1.html">Chapter 1: Introduction</a></p></li>
|
||||
<li><p><a class="reference external" href="chap2.html">Chapter 2: Windows</a></p></li>
|
||||
<li><p><a class="reference external" href="chap3.html">Chapter 3: The Workspace</a></p></li>
|
||||
<li><p><a class="reference external" href="chap4.html">Chapter 4: Configuring WindowMaker</a></p></li>
|
||||
<li><p><a class="reference external" href="chap5.html">Chapter 5: Tips</a></p></li>
|
||||
<li><p><a class="reference external" href="chap6.html">Chapter 6: Glossary</a></p></li>
|
||||
<li><p><a class="reference external" href="chap7.html">Chapter 7: Credits</a></p></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</article>
|
||||
<div id="titlebar">
|
||||
<div id="minimize"></div>
|
||||
<div id="titlebar-inner">Window Maker: User Guide</div>
|
||||
<div id="close"></div>
|
||||
</div>
|
||||
<div id="resizebar">
|
||||
<div id="resizel"></div>
|
||||
<div id="resizebar-inner">
|
||||
</div>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
77
docs/guide_toc.rst
Normal file
@@ -0,0 +1,77 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Window Maker: User Guide</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="/style.css" media="screen">
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, minimumscale=1.0, maximum-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<header>
|
||||
<h1>
|
||||
<a href="/">
|
||||
<span class="first">Window</span><span class="second">Maker</span>
|
||||
</a>
|
||||
</h1>
|
||||
</header>
|
||||
<aside>
|
||||
<nav class="menu">
|
||||
<ul>
|
||||
<li id="dock">
|
||||
<a href="#"></a>
|
||||
</li>
|
||||
<li id="home" title="Home">
|
||||
<a href="/">Home</a>
|
||||
</li>
|
||||
<li id="news" title="News">
|
||||
<a href="/news">News</a>
|
||||
</li>
|
||||
<li id="docs" title="Documentation">
|
||||
<a href="/docs">Documentation</a>
|
||||
</li>
|
||||
<li id="mail" title="Mailing lists">
|
||||
<a href="/lists">Mailing</a>
|
||||
</li>
|
||||
<li id="devel" title="Development">
|
||||
<a href="/dev">Development</a>
|
||||
</li>
|
||||
<li id="screenshots" title="Screenshots">
|
||||
<a href="/screenshots">Screenshots</a>
|
||||
</li>
|
||||
<li id="themes" title="Themes">
|
||||
<a href="/themes">Themes</a>
|
||||
</li>
|
||||
<li id="links" title="Links">
|
||||
<a href="/links">Links</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</aside>
|
||||
<article>
|
||||
- `Chapter 1: Introduction <chap1.html>`_
|
||||
- `Chapter 2: Windows <chap2.html>`_
|
||||
- `Chapter 3: The Workspace <chap3.html>`_
|
||||
- `Chapter 4: Configuring WindowMaker <chap4.html>`_
|
||||
- `Chapter 5: Tips <chap5.html>`_
|
||||
- `Chapter 6: Glossary <chap6.html>`_
|
||||
- `Chapter 7: Credits <chap7.html>`_
|
||||
|
||||
</article>
|
||||
<div id="titlebar">
|
||||
<div id="minimize"></div>
|
||||
<div id="titlebar-inner">Window Maker: User Guide</div>
|
||||
<div id="close"></div>
|
||||
</div>
|
||||
<div id="resizebar">
|
||||
<div id="resizel"></div>
|
||||
<div id="resizebar-inner">
|
||||
</div>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
173
docs/guidedtour/back.html
Normal file
@@ -0,0 +1,173 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Window Maker: Guided Tour - Backgrounds and Themes</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="/style.css" media="screen">
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, minimumscale=1.0, maximum-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<header>
|
||||
<h1>
|
||||
<a href="/">
|
||||
<span class="first">Window</span><span class="second">Maker</span>
|
||||
</a>
|
||||
</h1>
|
||||
</header>
|
||||
<aside>
|
||||
<nav class="menu">
|
||||
<ul>
|
||||
<li id="dock">
|
||||
<a href="#"></a>
|
||||
</li>
|
||||
<li id="home" title="Home">
|
||||
<a href="/">Home</a>
|
||||
</li>
|
||||
<li id="news" title="News">
|
||||
<a href="/news">News</a>
|
||||
</li>
|
||||
<li id="docs" title="Documentation">
|
||||
<a href="/docs">Documentation</a>
|
||||
</li>
|
||||
<li id="mail" title="Mailing lists">
|
||||
<a href="/lists">Mailing</a>
|
||||
</li>
|
||||
<li id="devel" title="Development">
|
||||
<a href="/dev">Development</a>
|
||||
</li>
|
||||
<li id="screenshots" title="Screenshots">
|
||||
<a href="/screenshots">Screenshots</a>
|
||||
</li>
|
||||
<li id="themes" title="Themes">
|
||||
<a href="/themes">Themes</a>
|
||||
</li>
|
||||
<li id="links" title="Links">
|
||||
<a href="/links">Links</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</aside>
|
||||
<article>
|
||||
|
||||
<div class="document" id="backgrounds-and-themes">
|
||||
<h1 class="title">Backgrounds and Themes</h1>
|
||||
|
||||
<!-- TODO: check for the dead links -->
|
||||
<div class="contents topic" id="contents">
|
||||
<p class="topic-title first">Contents</p>
|
||||
<ul class="simple">
|
||||
<li><p><a class="reference internal" href="#backgrounds" id="id1">Backgrounds</a></p></li>
|
||||
<li><p><a class="reference internal" href="#styles" id="id2">Styles</a></p></li>
|
||||
<li><p><a class="reference internal" href="#themes" id="id3">Themes</a></p></li>
|
||||
</ul>
|
||||
</div>
|
||||
<p>For the purposes of this guided tour, only those appearance options that are
|
||||
built-in to Window Maker will be considered. Crafting custom styles and themes
|
||||
is not terribly difficult, nor do you need any special knowledge of programming
|
||||
languages or other specialized skills, but this is outside the intended scope
|
||||
of the guided tour.</p>
|
||||
<p>The appearance of the Window Maker GUI can easily be customized from the
|
||||
applications menu item "Appearance".</p>
|
||||
<p>Themes, styles, icon sets, and backgrounds can be selected as soon as they are
|
||||
installed in the right directory.</p>
|
||||
<p>Themes should be installed in the directory
|
||||
<span class="docutils literal">~/GNUstep/Library/WindowMaker/Themes/</span></p>
|
||||
<p>Styles should be installed in the directory
|
||||
<span class="docutils literal">~/GNUstep/Library/WindowMaker/Styles/</span></p>
|
||||
<p>Backgrounds should be installed in the directory
|
||||
<span class="docutils literal">~/GNUstep/Library/WindowMaker/Backgrounds/</span></p>
|
||||
<p>If you are working within a freshly-installed instance of Window Maker, your
|
||||
Linux distribution probably provided some default themes, styles and
|
||||
backgrounds. Rarely, a distribution provides no additional themes, styles or
|
||||
backgrounds - expecting users to provide these on their own.</p>
|
||||
<p>Here is the "Appearance" menu and some of its associated sub-menus,
|
||||
including themes, styles and backgrounds:</p>
|
||||
<div class="borderless figure">
|
||||
<img alt="Appearance menu items" src="images/appearancemenu.png">
|
||||
</div>
|
||||
<p>In the screenshot above, most of the styles are default to the Debian GNU/Linux
|
||||
distribution, while most of the themes were user-installed. Many themes are
|
||||
available for download on the internet.</p>
|
||||
<div class="section" id="backgrounds">
|
||||
<h1>Backgrounds</h1>
|
||||
<p>Backgrounds may be system-generated solid or gradient colors, or they may be
|
||||
images from user or distribution-supplied image files. The easiest way to
|
||||
change a system-generated background color or color gradient is to select one
|
||||
from the "Appearance -> Background -> <Solid | Gradient>" menu. In most default
|
||||
configurations there will be six to eight selections in each category.</p>
|
||||
<p>Likewise, the easiest way to change to a background image is to select one from
|
||||
the "Appearance -&gt; Background -&gt; Images" menu. If you wish to install
|
||||
your own images for use as backgrounds, place the image file in your
|
||||
<span class="docutils literal">~/GNUstep/Library/WindowMaker/Backgrounds/</span> directory and they will be
|
||||
available from the menu immediately.</p>
|
||||
</div>
|
||||
<div class="section" id="styles">
|
||||
<h1>Styles</h1>
|
||||
<p>A style defines the look of the key components of the Window Maker desktop.
|
||||
These components include the window titlebar and resizebar, the menu title and
|
||||
text field, and the icon background.</p>
|
||||
<p>The characteristics defined in a style (or theme) are the color and "texture"
|
||||
of key GUI elements. Texture in this context means using multiple colors in
|
||||
various color gradients - you are not limited to solid colors only.</p>
|
||||
<p>The easiest method for changing the style is to select a style from the
|
||||
"Appearance -> Style" menu.</p>
|
||||
<p>A style may also be created using the <em>Appearance Preferences</em> tool in
|
||||
<em>WPrefs.app</em>. From this tool, you may configure the color and texture of
|
||||
window elements (titlebars, resizebars), menu elements (menu titlebar, menu
|
||||
item text colors, menu "style") and the color and texture of icon backgrounds.
|
||||
The location of titlebar text and the font and text color for window and menu
|
||||
text may also be configured here.</p>
|
||||
<div class="borderless figure">
|
||||
<img alt="Appearance preferences tool" src="images/prefs13.png">
|
||||
<p class="caption">Appearance preferences tool</p>
|
||||
</div>
|
||||
<p>More information on creating a style "from scratch" may be found <a class="reference external" href="/docs/chap4.html">in the Window
|
||||
Maker User's Guide</a>. (Scroll down to the
|
||||
section on "Appearance Options.")</p>
|
||||
<p>A step-by-step guide to crafting a custom style is available <a class="reference external" href="http://windowmakerandi.blogspot.com/search?updated-min=2011-01-01T00:00:00-06:00&amp;updated-max=2012-01-01T00:00:00-06:00&amp;max-results=4target=%22_blank%22">HERE</a>.</p>
|
||||
</div>
|
||||
<div class="section" id="themes">
|
||||
<h1>Themes</h1>
|
||||
<p>In its most basic form, a theme is simply a style that also includes a
|
||||
background. Some Linux distributions provide one or more default themes for use
|
||||
system-wide. You may install your own themes in the
|
||||
<span class="docutils literal">~/GNUstep/Library/WindowMaker/Themes/</span> directory. Themes installed in the
|
||||
correct directory will be available for selection in the "Appearance -&gt;
|
||||
Themes" menu. Selecting Themes from the Appearance menu runs the <em>setstyle</em>
|
||||
program to install the theme and record it in the
|
||||
<span class="docutils literal">~/GNUstep/Defaults/WindowMaker</span> file.</p>
|
||||
<p>Two sites providing preconfigured themes are <a class="reference external" href="http://lonelymachines.org/windowmaker-themes/">HERE</a> and <a class="reference external" href="http://www.jessanderson.org/wmthemes/">HERE</a>. An internet search for "Window
|
||||
Maker themes" will generate additional results, and you should also check your
|
||||
Linux distribution's repositories - some provide themes for installation using
|
||||
your distribution's package management system.</p>
|
||||
<p>Themes may include images in png, jpg, xpm, and other supported image file
|
||||
formats for key elements of the GUI such as titlebars, icon backgrounds, and
|
||||
the workspace background. Themes that include images cannot be stored as a
|
||||
single text file, and therefore must be stored in a directory. A theme
|
||||
directory must contain all of the image files needed for the theme along with a
|
||||
file named "style." The style file in a theme directory will specify all of the
|
||||
GUI elements including any image files used for those elements in lieu of rgb
|
||||
color specifications. A theme directory must use the suffix ".themed" after the
|
||||
theme name.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</article>
|
||||
<div id="titlebar">
|
||||
<div id="minimize"></div>
|
||||
<div id="titlebar-inner">Window Maker: Guided Tour - Backgrounds and Themes</div>
|
||||
<div id="close"></div>
|
||||
</div>
|
||||
<div id="resizebar">
|
||||
<div id="resizel"></div>
|
||||
<div id="resizebar-inner">
|
||||
</div>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
194
docs/guidedtour/back.rst
Normal file
@@ -0,0 +1,194 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Window Maker: Guided Tour - Backgrounds and Themes</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="/style.css" media="screen">
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, minimumscale=1.0, maximum-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<header>
|
||||
<h1>
|
||||
<a href="/">
|
||||
<span class="first">Window</span><span class="second">Maker</span>
|
||||
</a>
|
||||
</h1>
|
||||
</header>
|
||||
<aside>
|
||||
<nav class="menu">
|
||||
<ul>
|
||||
<li id="dock">
|
||||
<a href="#"></a>
|
||||
</li>
|
||||
<li id="home" title="Home">
|
||||
<a href="/">Home</a>
|
||||
</li>
|
||||
<li id="news" title="News">
|
||||
<a href="/news">News</a>
|
||||
</li>
|
||||
<li id="docs" title="Documentation">
|
||||
<a href="/docs">Documentation</a>
|
||||
</li>
|
||||
<li id="mail" title="Mailing lists">
|
||||
<a href="/lists">Mailing</a>
|
||||
</li>
|
||||
<li id="devel" title="Development">
|
||||
<a href="/dev">Development</a>
|
||||
</li>
|
||||
<li id="screenshots" title="Screenshots">
|
||||
<a href="/screenshots">Screenshots</a>
|
||||
</li>
|
||||
<li id="themes" title="Themes">
|
||||
<a href="/themes">Themes</a>
|
||||
</li>
|
||||
<li id="links" title="Links">
|
||||
<a href="/links">Links</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</aside>
|
||||
<article>
|
||||
.. TODO: check for the dead links
|
||||
|
||||
Backgrounds and Themes
|
||||
======================
|
||||
|
||||
.. contents::
|
||||
:backlinks: none
|
||||
|
||||
For the purposes of this guided tour, only those appearance options that are
|
||||
built-in to Window Maker will be considered. Crafting custom styles and themes
|
||||
is not terribly difficult, nor do you need any special knowledge of programming
|
||||
languages or other specialized skills, but this is outside the intended scope
|
||||
of the guided tour.
|
||||
|
||||
The appearance of the Window Maker GUI can easily be customized from the
|
||||
applications menu item "Appearance".
|
||||
|
||||
Themes, styles, icon sets, and backgrounds can be selected as soon as they are
|
||||
installed in the right directory.
|
||||
|
||||
Themes should be installed in the directory
|
||||
``~/GNUstep/Library/WindowMaker/Themes/``
|
||||
|
||||
Styles should be installed in the directory
|
||||
``~/GNUstep/Library/WindowMaker/Styles/``
|
||||
|
||||
Backgrounds should be installed in the directory
|
||||
``~/GNUstep/Library/WindowMaker/Backgrounds/``
|
||||
|
||||
If you are working within a freshly-installed instance of Window Maker, your
|
||||
Linux distribution probably provided some default themes, styles and
|
||||
backgrounds. Rarely, a distribution provides no additional themes, styles or
|
||||
backgrounds - expecting users to provide these on their own.
|
||||
|
||||
Here is the "Appearance" menu and some of its associated sub-menus,
|
||||
including themes, styles and backgrounds:
|
||||
|
||||
.. figure:: images/appearancemenu.png
|
||||
:alt: Appearance menu items
|
||||
:figclass: borderless
|
||||
|
||||
In the screenshot above, most of the styles are default to the Debian GNU/Linux
|
||||
distribution, while most of the themes were user-installed. Many themes are
|
||||
available for download on the internet.
|
||||
|
||||
Backgrounds
|
||||
-----------
|
||||
|
||||
Backgrounds may be system-generated solid or gradient colors, or they may be
|
||||
images from user or distribution-supplied image files. The easiest way to
|
||||
change a system-generated background color or color gradient is to select one
|
||||
from the "Appearance -> Background -> <Solid | Gradient>" menu. In most default
|
||||
configurations there will be six to eight selections in each category.
|
||||
|
||||
Likewise, the easiest way to change to a background image is to select one from
|
||||
the "Appearance -> Background -> Images" menu. If you wish to install
|
||||
your own images for use as backgrounds, place the image file in your
|
||||
``~/GNUstep/Library/WindowMaker/Backgrounds/`` directory and they will be
|
||||
available from the menu immediately.
|
||||
|
||||
Styles
|
||||
------
|
||||
|
||||
A style defines the look of the key components of the Window Maker desktop.
|
||||
These components include the window titlebar and resizebar, the menu title and
|
||||
text field, and the icon background.
|
||||
|
||||
The characteristics defined in a style (or theme) are the color and "texture"
|
||||
of key GUI elements. Texture in this context means using multiple colors in
|
||||
various color gradients - you are not limited to solid colors only.
|
||||
|
||||
The easiest method for changing the style is to select a style from the
|
||||
"Appearance -> Style" menu.
|
||||
|
||||
A style may also be created using the *Appearance Preferences* tool in
|
||||
*WPrefs.app*. From this tool, you may configure the color and texture of
|
||||
window elements (titlebars, resizebars), menu elements (menu titlebar, menu
|
||||
item text colors, menu "style") and the color and texture of icon backgrounds.
|
||||
The location of titlebar text and the font and text color for window and menu
|
||||
text may also be configured here.
|
||||
|
||||
|
||||
.. figure:: images/prefs13.png
|
||||
:figclass: borderless
|
||||
:alt: Appearance preferences tool
|
||||
|
||||
Appearance preferences tool
|
||||
|
||||
More information on creating a style "from scratch" may be found `in the Window
|
||||
Maker User's Guide </docs/chap4.html>`_. (Scroll down to the
|
||||
section on "Appearance Options.")
|
||||
|
||||
A step-by-step guide to crafting a custom style is available `HERE
|
||||
<http://windowmakerandi.blogspot.com/search?updated-min=2011-01-01T00:00:00-06:00&updated-max=2012-01-01T00:00:00-06:00&max-results=4
|
||||
target="_blank">`__.
|
||||
|
||||
Themes
|
||||
------
|
||||
|
||||
In its most basic form, a theme is simply a style that also includes a
|
||||
background. Some Linux distributions provide one or more default themes for use
|
||||
system-wide. You may install your own themes in the
|
||||
``~/GNUstep/Library/WindowMaker/Themes/`` directory. Themes installed in the
|
||||
correct directory will be available for selection in the "Appearance ->
|
||||
Themes" menu. Selecting Themes from the Appearance menu runs the *setstyle*
|
||||
program to install the theme and record it in the
|
||||
``~/GNUstep/Defaults/WindowMaker`` file.
|
||||
|
||||
Two sites providing preconfigured themes are `HERE
|
||||
<http://lonelymachines.org/windowmaker-themes/>`__ and `HERE
|
||||
<http://www.jessanderson.org/wmthemes/>`__. An internet search for "Window
|
||||
Maker themes" will generate additional results, and you should also check your
|
||||
Linux distribution's repositories - some provide themes for installation using
|
||||
your distribution's package management system.
|
||||
|
||||
Themes may include images in png, jpg, xpm, and other supported image file
|
||||
formats for key elements of the GUI such as titlebars, icon backgrounds, and
|
||||
the workspace background. Themes that include images cannot be stored as a
|
||||
single text file, and therefore must be stored in a directory. A theme
|
||||
directory must contain all of the image files needed for the theme along with a
|
||||
file named "style." The style file in a theme directory will specify all of the
|
||||
GUI elements including any image files used for those elements in lieu of rgb
|
||||
color specifications. A theme directory must use the suffix ".themed" after the
|
||||
theme name.
|
||||
|
||||
</article>
|
||||
<div id="titlebar">
|
||||
<div id="minimize"></div>
|
||||
<div id="titlebar-inner">Window Maker: Guided Tour - Backgrounds and Themes</div>
|
||||
<div id="close"></div>
|
||||
</div>
|
||||
<div id="resizebar">
|
||||
<div id="resizel"></div>
|
||||
<div id="resizebar-inner">
|
||||
</div>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
153
docs/guidedtour/clip.html
Normal file
@@ -0,0 +1,153 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Window Maker: Guided Tour - Clip</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="/style.css" media="screen">
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, minimumscale=1.0, maximum-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<header>
|
||||
<h1>
|
||||
<a href="/">
|
||||
<span class="first">Window</span><span class="second">Maker</span>
|
||||
</a>
|
||||
</h1>
|
||||
</header>
|
||||
<aside>
|
||||
<nav class="menu">
|
||||
<ul>
|
||||
<li id="dock">
|
||||
<a href="#"></a>
|
||||
</li>
|
||||
<li id="home" title="Home">
|
||||
<a href="/">Home</a>
|
||||
</li>
|
||||
<li id="news" title="News">
|
||||
<a href="/news">News</a>
|
||||
</li>
|
||||
<li id="docs" title="Documentation">
|
||||
<a href="/docs">Documentation</a>
|
||||
</li>
|
||||
<li id="mail" title="Mailing lists">
|
||||
<a href="/lists">Mailing</a>
|
||||
</li>
|
||||
<li id="devel" title="Development">
|
||||
<a href="/dev">Development</a>
|
||||
</li>
|
||||
<li id="screenshots" title="Screenshots">
|
||||
<a href="/screenshots">Screenshots</a>
|
||||
</li>
|
||||
<li id="themes" title="Themes">
|
||||
<a href="/themes">Themes</a>
|
||||
</li>
|
||||
<li id="links" title="Links">
|
||||
<a href="/links">Links</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</aside>
|
||||
<article>
|
||||
|
||||
<div class="document" id="clip">
|
||||
<h1 class="title">CLIP</h1>
|
||||
|
||||
<p>By default, The clip is represented by the icon on the top left of the screen
|
||||
containing a paperclip image.</p>
|
||||
<div class="borderless figure">
|
||||
<img alt="Clip icon" src="images/clip.png">
|
||||
</div>
|
||||
<p>The clip's primary function is to serve as a workspace-specific dock. In other
|
||||
words, applications may be attached to the clip just as they are to the dock,
|
||||
but the clip and its associated applications are specific to each individual
|
||||
workspace - not available on all workspaces as they are on the dock.</p>
|
||||
<p>The clip's secondary function is to act as a "pager" - a utility for changing
|
||||
from one workspace to another (paging). The arrows at the top right and bottom
|
||||
left corners of the clip icon allow you to switch from one workspace to the
|
||||
next workspace (top right) or previous workspace (bottom left).</p>
|
||||
<p>The current workspace name (if any) and number are displayed on the
|
||||
clip.</p>
|
||||
<p>The clip also has a number of menu-driven features.</p>
|
||||
<div class="section" id="clip-menu">
|
||||
<h1>Clip Menu</h1>
|
||||
<p>Right-clicking the clip displays a menu.</p>
|
||||
<div class="borderless figure">
|
||||
<img alt="Clip menu" src="images/menu_clip.png">
|
||||
<p class="caption">Clip menu</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="clip-options">
|
||||
<h1>Clip Options</h1>
|
||||
<p>The first menu item allows you to select clip options. The following options
|
||||
are available:</p>
|
||||
<ul class="simple">
|
||||
<li><p><em>Keep on top</em> - do not allow windows to cover the clip.</p></li>
|
||||
<li><p><em>Collapsed</em> - icons attached to the clip are hidden until you left-click the
|
||||
clip, which unhides them.</p></li>
|
||||
<li><p><em>Autocollapse</em> - same as the previous option, except that mouseing over the
|
||||
clip unhides application icons.</p></li>
|
||||
<li><p><em>Autoraise</em> - clicking an icon representing a window hidden under a larger
|
||||
window brings that window to the front.</p></li>
|
||||
<li><p><em>Autoattract icons</em> - selecting this option attracts the icon of any
|
||||
application launched on the current workspace. Closing the application
|
||||
removes the icon from the clip.</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="rename-workspace">
|
||||
<h1>Rename Workspace</h1>
|
||||
<p>This item gives you to ability to name (or rename) the current workspace.</p>
|
||||
<p>Some users tend to group certain applications by workspace and like to name the
|
||||
workspace to indicate the nature of the applications on the clip. For example,
|
||||
a user might have a browser, an IRC client, and a file transfer application
|
||||
clipped on a workspace, and might name that workspace "internet" to indicate
|
||||
the workspace's primary function. The user might have a seperate workspace with
|
||||
a vector graphics application, an image manipulation application, and an image
|
||||
viewer on the clip, and might name that workspace "graphics."</p>
|
||||
</div>
|
||||
<div class="section" id="other-options">
|
||||
<h1>Other Options</h1>
|
||||
<p>Right-clicking a clipped application's icon gives options specific to that
|
||||
application.</p>
|
||||
<ul class="simple">
|
||||
<li><p>You may make the application's icon <em>omnipresent</em> (clipped on all
|
||||
workspaces).</p></li>
|
||||
<li><p>You may <em>select</em> one or all clipped icons.</p></li>
|
||||
<li><p>You may <em>move</em> one or all icons to a different workspace.</p></li>
|
||||
<li><p>You may <em>remove</em> the icon.</p></li>
|
||||
<li><p>You may instruct Window Maker to have all icons <em>attracted</em> to the clip as
|
||||
soon as each application is launched, rather than placing them initially in
|
||||
the defined location on the display.</p></li>
|
||||
</ul>
|
||||
<p>The remaining clip menu items are similar to those of the <a class="reference external" href="dock.html#conf">Dock application
|
||||
icon menu</a>. As with the dock, clipped applications may be
|
||||
launched, hidden, or killed and their settings (icon used, application launch
|
||||
path/arguments, middle-click launch) may be modified.</p>
|
||||
<p>From version 0.80.0 on, the clip can "steal" appicons. This feature has nothing
|
||||
to do with autoattracting icons. When you start an application from somewhere
|
||||
other than either the clip or the dock (i.e., from the menu or a terminal), and
|
||||
the application is already either docked or clipped, a new application icon
|
||||
does not appear at the bottom of your screen. The icon that is already docked
|
||||
or clipped "steals" the icon function. As a result, the icon for the
|
||||
newly-launched application is the icon already on the clip or the dock.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</article>
|
||||
<div id="titlebar">
|
||||
<div id="minimize"></div>
|
||||
<div id="titlebar-inner">Window Maker: Guided Tour - Clip</div>
|
||||
<div id="close"></div>
|
||||
</div>
|
||||
<div id="resizebar">
|
||||
<div id="resizel"></div>
|
||||
<div id="resizebar-inner">
|
||||
</div>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
167
docs/guidedtour/clip.rst
Normal file
@@ -0,0 +1,167 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Window Maker: Guided Tour - Clip</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="/style.css" media="screen">
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, minimumscale=1.0, maximum-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<header>
|
||||
<h1>
|
||||
<a href="/">
|
||||
<span class="first">Window</span><span class="second">Maker</span>
|
||||
</a>
|
||||
</h1>
|
||||
</header>
|
||||
<aside>
|
||||
<nav class="menu">
|
||||
<ul>
|
||||
<li id="dock">
|
||||
<a href="#"></a>
|
||||
</li>
|
||||
<li id="home" title="Home">
|
||||
<a href="/">Home</a>
|
||||
</li>
|
||||
<li id="news" title="News">
|
||||
<a href="/news">News</a>
|
||||
</li>
|
||||
<li id="docs" title="Documentation">
|
||||
<a href="/docs">Documentation</a>
|
||||
</li>
|
||||
<li id="mail" title="Mailing lists">
|
||||
<a href="/lists">Mailing</a>
|
||||
</li>
|
||||
<li id="devel" title="Development">
|
||||
<a href="/dev">Development</a>
|
||||
</li>
|
||||
<li id="screenshots" title="Screenshots">
|
||||
<a href="/screenshots">Screenshots</a>
|
||||
</li>
|
||||
<li id="themes" title="Themes">
|
||||
<a href="/themes">Themes</a>
|
||||
</li>
|
||||
<li id="links" title="Links">
|
||||
<a href="/links">Links</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</aside>
|
||||
<article>
|
||||
CLIP
|
||||
====
|
||||
|
||||
By default, The clip is represented by the icon on the top left of the screen
|
||||
containing a paperclip image.
|
||||
|
||||
.. figure:: images/clip.png
|
||||
:alt: Clip icon
|
||||
:figclass: borderless
|
||||
|
||||
The clip's primary function is to serve as a workspace-specific dock. In other
|
||||
words, applications may be attached to the clip just as they are to the dock,
|
||||
but the clip and its associated applications are specific to each individual
|
||||
workspace - not available on all workspaces as they are on the dock.
|
||||
|
||||
The clip's secondary function is to act as a "pager" - a utility for changing
|
||||
from one workspace to another (paging). The arrows at the top right and bottom
|
||||
left corners of the clip icon allow you to switch from one workspace to the
|
||||
next workspace (top right) or previous workspace (bottom left).
|
||||
|
||||
The current workspace name (if any) and number are displayed on the
|
||||
clip.
|
||||
|
||||
The clip also has a number of menu-driven features.
|
||||
|
||||
Clip Menu
|
||||
---------
|
||||
|
||||
Right-clicking the clip displays a menu.
|
||||
|
||||
.. figure:: images/menu_clip.png
|
||||
:alt: Clip menu
|
||||
:figclass: borderless
|
||||
|
||||
Clip menu
|
||||
|
||||
Clip Options
|
||||
------------
|
||||
|
||||
The first menu item allows you to select clip options. The following options
|
||||
are available:
|
||||
|
||||
- *Keep on top* - do not allow windows to cover the clip.
|
||||
- *Collapsed* - icons attached to the clip are hidden until you left-click the
|
||||
clip, which unhides them.
|
||||
- *Autocollapse* - same as the previous option, except that mouseing over the
|
||||
clip unhides application icons.
|
||||
- *Autoraise* - clicking an icon representing a window hidden under a larger
|
||||
window brings that window to the front.
|
||||
- *Autoattract icons* - selecting this option attracts the icon of any
|
||||
application launched on the current workspace. Closing the application
|
||||
removes the icon from the clip.
|
||||
|
||||
Rename Workspace
|
||||
----------------
|
||||
|
||||
This item gives you to ability to name (or rename) the current workspace.
|
||||
|
||||
Some users tend to group certain applications by workspace and like to name the
|
||||
workspace to indicate the nature of the applications on the clip. For example,
|
||||
a user might have a browser, an IRC client, and a file transfer application
|
||||
clipped on a workspace, and might name that workspace "internet" to indicate
|
||||
the workspace's primary function. The user might have a seperate workspace with
|
||||
a vector graphics application, an image manipulation application, and an image
|
||||
viewer on the clip, and might name that workspace "graphics."
|
||||
|
||||
Other Options
|
||||
-------------
|
||||
|
||||
Right-clicking a clipped application's icon gives options specific to that
|
||||
application.
|
||||
|
||||
- You may make the application's icon *omnipresent* (clipped on all
|
||||
workspaces).
|
||||
|
||||
- You may *select* one or all clipped icons.
|
||||
|
||||
- You may *move* one or all icons to a different workspace.
|
||||
|
||||
- You may *remove* the icon.
|
||||
|
||||
- You may instruct Window Maker to have all icons *attracted* to the clip as
|
||||
soon as each application is launched, rather than placing them initially in
|
||||
the defined location on the display.
|
||||
|
||||
The remaining clip menu items are similar to those of the `Dock application
|
||||
icon menu <dock.html#conf>`_. As with the dock, clipped applications may be
|
||||
launched, hidden, or killed and their settings (icon used, application launch
|
||||
path/arguments, middle-click launch) may be modified.
|
||||
|
||||
From version 0.80.0 on, the clip can "steal" appicons. This feature has nothing
|
||||
to do with autoattracting icons. When you start an application from somewhere
|
||||
other than either the clip or the dock (i.e., from the menu or a terminal), and
|
||||
the application is already either docked or clipped, a new application icon
|
||||
does not appear at the bottom of your screen. The icon that is already docked
|
||||
or clipped "steals" the icon function. As a result, the icon for the
|
||||
newly-launched application is the icon already on the clip or the dock.
|
||||
|
||||
</article>
|
||||
<div id="titlebar">
|
||||
<div id="minimize"></div>
|
||||
<div id="titlebar-inner">Window Maker: Guided Tour - Clip</div>
|
||||
<div id="close"></div>
|
||||
</div>
|
||||
<div id="resizebar">
|
||||
<div id="resizel"></div>
|
||||
<div id="resizebar-inner">
|
||||
</div>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
177
docs/guidedtour/dock.html
Normal file
@@ -0,0 +1,177 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Window Maker: Guided Tour - Dock</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="/style.css" media="screen">
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, minimumscale=1.0, maximum-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<header>
|
||||
<h1>
|
||||
<a href="/">
|
||||
<span class="first">Window</span><span class="second">Maker</span>
|
||||
</a>
|
||||
</h1>
|
||||
</header>
|
||||
<aside>
|
||||
<nav class="menu">
|
||||
<ul>
|
||||
<li id="dock">
|
||||
<a href="#"></a>
|
||||
</li>
|
||||
<li id="home" title="Home">
|
||||
<a href="/">Home</a>
|
||||
</li>
|
||||
<li id="news" title="News">
|
||||
<a href="/news">News</a>
|
||||
</li>
|
||||
<li id="docs" title="Documentation">
|
||||
<a href="/docs">Documentation</a>
|
||||
</li>
|
||||
<li id="mail" title="Mailing lists">
|
||||
<a href="/lists">Mailing</a>
|
||||
</li>
|
||||
<li id="devel" title="Development">
|
||||
<a href="/dev">Development</a>
|
||||
</li>
|
||||
<li id="screenshots" title="Screenshots">
|
||||
<a href="/screenshots">Screenshots</a>
|
||||
</li>
|
||||
<li id="themes" title="Themes">
|
||||
<a href="/themes">Themes</a>
|
||||
</li>
|
||||
<li id="links" title="Links">
|
||||
<a href="/links">Links</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</aside>
|
||||
<article>
|
||||
|
||||
<div class="document" id="dock">
|
||||
<h1 class="title">Dock</h1>
|
||||
|
||||
<div class="contents topic" id="contents">
|
||||
<p class="topic-title first">Contents</p>
|
||||
<ul class="simple">
|
||||
<li><p><a class="reference internal" href="#application-dock" id="id1">Application dock</a></p></li>
|
||||
<li><p><a class="reference internal" href="#starting-an-application" id="id2">Starting an application</a></p></li>
|
||||
<li><p><a class="reference internal" href="#customizing" id="id3">Customizing</a></p></li>
|
||||
<li><p><a class="reference internal" href="#configuring" id="id4">Configuring</a></p></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="application-dock">
|
||||
<h1>Application dock</h1>
|
||||
<p>The dock is the column of icons located by default on the right side of the
|
||||
screen.</p>
|
||||
<p>Any application can be attached to the dock. To do this, open an application
|
||||
then simply left-click-and-drag the application's icon to the last position on
|
||||
the dock. The dock will "attract" the icon and it will remain on the dock until
|
||||
removed by the user (left-click-and-drag the icon off the dock - it will
|
||||
disappear.) If you have saved your Window Maker session prior to logout (or set
|
||||
Window Maker to autosave your session upon logout) any icons you docked will
|
||||
automatically reappear at your next - and each subsequent - session.</p>
|
||||
<p>The dock can be configured to remain on top of maximized windows. To do this,
|
||||
right-click on a dock or any docked icon then select appropriate option form
|
||||
<em>Dock position</em> submenu. Consult <a class="reference external" href="menu.html#application-icon-menu">Application icon menu</a> for details.</p>
|
||||
<p>The WMDock icon (by default, with the GNUstep logo) can be dragged sideways to
|
||||
switch the the entire dock from one side of the display to the other.</p>
|
||||
<p>Dragging the WMDock icon downward will move the dock off the display with the
|
||||
exception of the WMDock icon itself, which will remain visible. To restore dock
|
||||
visibility, left-click-and-drag the dock back on screen.</p>
|
||||
</div>
|
||||
<div class="section" id="starting-an-application">
|
||||
<h1>Starting an application</h1>
|
||||
<p>Double-clicking the icon of a docked application starts the application.</p>
|
||||
<p>An application that has not been launched normally has an elipsis (three dots)
|
||||
in the bottom-left-corner of the icon and appears in full color as shown below.</p>
|
||||
<div class="borderless figure">
|
||||
<img alt="Unlaunched application icon" src="images/unlaunched_app.png">
|
||||
<p class="caption">Unlaunched application icon</p>
|
||||
</div>
|
||||
<p>When the application is running, the elipsis disappears from the
|
||||
bottom-left-corner of the icon and the icon becomes highlited.</p>
|
||||
<div class="borderless figure">
|
||||
<img alt="Launched application icon" src="images/launched_app.png">
|
||||
<p class="caption">Launched application icon</p>
|
||||
</div>
|
||||
<p>Sometimes, when the application is running, instead of highlited icon, the icon
|
||||
becomes "greyed out", giving a visual cue that the application is already open,
|
||||
and cannot be launched again.</p>
|
||||
<div class="borderless figure">
|
||||
<img alt="Launched application icon" src="images/grayed_out_icon.png">
|
||||
<p class="caption">Grayed-out application icon</p>
|
||||
</div>
|
||||
<p>A docked icon that continues to show an elipsis and remains "full color" even
|
||||
after an instance of the application is running indicates that the
|
||||
application's settings have been modified to allow multiple launches from one
|
||||
docked icon. To do this you must open the application and modify the
|
||||
"application specific" settings in the <a class="reference external" href="win.html#menu">commands menu</a> of the
|
||||
application to allow "shared application icons".</p>
|
||||
<p>Using the "launch" command in the "application icon menu" for the icon is
|
||||
another way to start an application from the dock.</p>
|
||||
<p>From version 0.80.0 on, the dock can "steal" appicons. This feature has nothing
|
||||
to do with Autoattract Icons. When you start an application from somewhere else
|
||||
than either the clip or the dock (menu or terminal), and the appicon exists in
|
||||
one of them (clip or dock), this appicon doesn't appear at the bottom of your
|
||||
screen. The appicon existing in the clip or the dock "stole" it. As a result,
|
||||
the appicon is the same as the one used to start the application from the clip
|
||||
or the dock.</p>
|
||||
</div>
|
||||
<div class="section" id="customizing">
|
||||
<h1>Customizing</h1>
|
||||
<p>Left-clicking and dragging an application icon to the dock adds this
|
||||
application to the dock. Obviously, this means the application is running!</p>
|
||||
<p><em>Miniwindows</em> (windows of minimized applications) cannot be docked. The small
|
||||
titlebar on the miniwindow differentiates it from an application's icon.</p>
|
||||
<p>Dragging an icon off the dock removes the docked application.</p>
|
||||
</div>
|
||||
<div class="section" id="configuring">
|
||||
<h1>Configuring</h1>
|
||||
<p>There is a dock menu for each icon. Right-clicking the icon displays the
|
||||
"application icon menu". Select the "Settings..." option to configure the
|
||||
application.</p>
|
||||
<div class="borderless figure">
|
||||
<img alt="Launched application icon" src="images/docked_application_settings.png">
|
||||
<p class="caption">Launched application icon</p>
|
||||
</div>
|
||||
<p>The application's <em>path</em> and its arguments, the command for middle-click
|
||||
launch, and the icon employed can be changed in this panel.</p>
|
||||
<p>Shell commands such as redirection cannot be used in the command field.</p>
|
||||
<p>The desired icon must be in one of the directories displayed in the panel while
|
||||
browsing. New directories can be added from the <a class="reference external" href="prefs.html#search-path">Search path preferences</a>.</p>
|
||||
<p>A checkbox allows you to start the application when Window Maker is first
|
||||
started. (Note: <em>You want to be careful with this</em>. If you have, for example,
|
||||
your terminal emulator, your file manager, and your browser set to start when
|
||||
Window Maker is started you'll get an open terminal, an open file manager and
|
||||
an open browser <em>every time</em> you start a session! Normally you will only want
|
||||
to start certain dockapps - "regular" applications like a terminal emulator or
|
||||
browser can be started <em>after</em> your session is up and going.)</p>
|
||||
<p>From version 0.62.0 on, a checkbox can be used to prevent accidental
|
||||
removal from the dock.</p>
|
||||
<p>From version 0.70.0 on, a new field has been added for middle-click launch.
|
||||
Entering, for example, "firefox" into a docked application settings panel will
|
||||
launch the Firefox browser.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</article>
|
||||
<div id="titlebar">
|
||||
<div id="minimize"></div>
|
||||
<div id="titlebar-inner">Window Maker: Guided Tour - Dock</div>
|
||||
<div id="close"></div>
|
||||
</div>
|
||||
<div id="resizebar">
|
||||
<div id="resizel"></div>
|
||||
<div id="resizebar-inner">
|
||||
</div>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
200
docs/guidedtour/dock.rst
Normal file
@@ -0,0 +1,200 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Window Maker: Guided Tour - Dock</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="/style.css" media="screen">
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, minimumscale=1.0, maximum-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<header>
|
||||
<h1>
|
||||
<a href="/">
|
||||
<span class="first">Window</span><span class="second">Maker</span>
|
||||
</a>
|
||||
</h1>
|
||||
</header>
|
||||
<aside>
|
||||
<nav class="menu">
|
||||
<ul>
|
||||
<li id="dock">
|
||||
<a href="#"></a>
|
||||
</li>
|
||||
<li id="home" title="Home">
|
||||
<a href="/">Home</a>
|
||||
</li>
|
||||
<li id="news" title="News">
|
||||
<a href="/news">News</a>
|
||||
</li>
|
||||
<li id="docs" title="Documentation">
|
||||
<a href="/docs">Documentation</a>
|
||||
</li>
|
||||
<li id="mail" title="Mailing lists">
|
||||
<a href="/lists">Mailing</a>
|
||||
</li>
|
||||
<li id="devel" title="Development">
|
||||
<a href="/dev">Development</a>
|
||||
</li>
|
||||
<li id="screenshots" title="Screenshots">
|
||||
<a href="/screenshots">Screenshots</a>
|
||||
</li>
|
||||
<li id="themes" title="Themes">
|
||||
<a href="/themes">Themes</a>
|
||||
</li>
|
||||
<li id="links" title="Links">
|
||||
<a href="/links">Links</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</aside>
|
||||
<article>
|
||||
Dock
|
||||
====
|
||||
|
||||
.. contents::
|
||||
:backlinks: none
|
||||
|
||||
Application dock
|
||||
----------------
|
||||
|
||||
The dock is the column of icons located by default on the right side of the
|
||||
screen.
|
||||
|
||||
Any application can be attached to the dock. To do this, open an application
|
||||
then simply left-click-and-drag the application's icon to the last position on
|
||||
the dock. The dock will "attract" the icon and it will remain on the dock until
|
||||
removed by the user (left-click-and-drag the icon off the dock - it will
|
||||
disappear.) If you have saved your Window Maker session prior to logout (or set
|
||||
Window Maker to autosave your session upon logout) any icons you docked will
|
||||
automatically reappear at your next - and each subsequent - session.
|
||||
|
||||
The dock can be configured to remain on top of maximized windows. To do this,
|
||||
right-click on a dock or any docked icon then select appropriate option form
|
||||
*Dock position* submenu. Consult `Application icon menu
|
||||
<menu.html#application-icon-menu>`_ for details.
|
||||
|
||||
The WMDock icon (by default, with the GNUstep logo) can be dragged sideways to
|
||||
switch the the entire dock from one side of the display to the other.
|
||||
|
||||
Dragging the WMDock icon downward will move the dock off the display with the
|
||||
exception of the WMDock icon itself, which will remain visible. To restore dock
|
||||
visibility, left-click-and-drag the dock back on screen.
|
||||
|
||||
Starting an application
|
||||
-----------------------
|
||||
|
||||
Double-clicking the icon of a docked application starts the application.
|
||||
|
||||
An application that has not been launched normally has an elipsis (three dots)
|
||||
in the bottom-left-corner of the icon and appears in full color as shown below.
|
||||
|
||||
.. figure:: images/unlaunched_app.png
|
||||
:alt: Unlaunched application icon
|
||||
:figclass: borderless
|
||||
|
||||
Unlaunched application icon
|
||||
|
||||
When the application is running, the elipsis disappears from the
|
||||
bottom-left-corner of the icon and the icon becomes highlited.
|
||||
|
||||
.. figure:: images/launched_app.png
|
||||
:alt: Launched application icon
|
||||
:figclass: borderless
|
||||
|
||||
Launched application icon
|
||||
|
||||
Sometimes, when the application is running, instead of highlited icon, the icon
|
||||
becomes "greyed out", giving a visual cue that the application is already open,
|
||||
and cannot be launched again.
|
||||
|
||||
.. figure:: images/grayed_out_icon.png
|
||||
:alt: Launched application icon
|
||||
:figclass: borderless
|
||||
|
||||
Grayed-out application icon
|
||||
|
||||
A docked icon that continues to show an elipsis and remains "full color" even
|
||||
after an instance of the application is running indicates that the
|
||||
application's settings have been modified to allow multiple launches from one
|
||||
docked icon. To do this you must open the application and modify the
|
||||
"application specific" settings in the `commands menu <win.html#menu>`_ of the
|
||||
application to allow "shared application icons".
|
||||
|
||||
Using the "launch" command in the "application icon menu" for the icon is
|
||||
another way to start an application from the dock.
|
||||
|
||||
From version 0.80.0 on, the dock can "steal" appicons. This feature has nothing
|
||||
to do with Autoattract Icons. When you start an application from somewhere else
|
||||
than either the clip or the dock (menu or terminal), and the appicon exists in
|
||||
one of them (clip or dock), this appicon doesn't appear at the bottom of your
|
||||
screen. The appicon existing in the clip or the dock "stole" it. As a result,
|
||||
the appicon is the same as the one used to start the application from the clip
|
||||
or the dock.
|
||||
|
||||
Customizing
|
||||
-----------
|
||||
|
||||
Left-clicking and dragging an application icon to the dock adds this
|
||||
application to the dock. Obviously, this means the application is running!
|
||||
|
||||
*Miniwindows* (windows of minimized applications) cannot be docked. The small
|
||||
titlebar on the miniwindow differentiates it from an application's icon.
|
||||
|
||||
Dragging an icon off the dock removes the docked application.
|
||||
|
||||
Configuring
|
||||
-----------
|
||||
|
||||
There is a dock menu for each icon. Right-clicking the icon displays the
|
||||
"application icon menu". Select the "Settings..." option to configure the
|
||||
application.
|
||||
|
||||
.. figure:: images/docked_application_settings.png
|
||||
:alt: Launched application icon
|
||||
:figclass: borderless
|
||||
|
||||
Launched application icon
|
||||
|
||||
The application's *path* and its arguments, the command for middle-click
|
||||
launch, and the icon employed can be changed in this panel.
|
||||
|
||||
Shell commands such as redirection cannot be used in the command field.
|
||||
|
||||
The desired icon must be in one of the directories displayed in the panel while
|
||||
browsing. New directories can be added from the `Search path preferences
|
||||
<prefs.html#search-path>`_.
|
||||
|
||||
A checkbox allows you to start the application when Window Maker is first
|
||||
started. (Note: *You want to be careful with this*. If you have, for example,
|
||||
your terminal emulator, your file manager, and your browser set to start when
|
||||
Window Maker is started you'll get an open terminal, an open file manager and
|
||||
an open browser *every time* you start a session! Normally you will only want
|
||||
to start certain dockapps - "regular" applications like a terminal emulator or
|
||||
browser can be started *after* your session is up and going.)
|
||||
|
||||
From version 0.62.0 on, a checkbox can be used to prevent accidental
|
||||
removal from the dock.
|
||||
|
||||
From version 0.70.0 on, a new field has been added for middle-click launch.
|
||||
Entering, for example, "firefox" into a docked application settings panel will
|
||||
launch the Firefox browser.
|
||||
|
||||
</article>
|
||||
<div id="titlebar">
|
||||
<div id="minimize"></div>
|
||||
<div id="titlebar-inner">Window Maker: Guided Tour - Dock</div>
|
||||
<div id="close"></div>
|
||||
</div>
|
||||
<div id="resizebar">
|
||||
<div id="resizel"></div>
|
||||
<div id="resizebar-inner">
|
||||
</div>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
BIN
docs/guidedtour/images/GNUstep.jpg
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
docs/guidedtour/images/LogoGNUstep.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
docs/guidedtour/images/apm.jpg
Normal file
|
After Width: | Height: | Size: 9.9 KiB |