1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124
|
<chapter label="4" id="objects-chapter">
<title>Objects and the Toolbox</title>
<para>
A diagram in <application>Dia</application> consists of a set of objects. Objects are shapes that are either
predefined or user-defined. The Toolbox allows you to select the desired
object and allows you to set default properties for objects.
</para>
<sect1 id="toolbox-overview">
<title>Dia Toolbox Overview</title>
<figure>
<title>Dia Toolbox</title>
<screenshot>
<screeninfo>Dia Toolbox</screeninfo>
<graphic format="PNG" fileref="graphics/toolbox" srccredit="Mark Dexter" />
</screenshot>
</figure>
<para>
When <application>Dia</application> is executed, two windows open: the canvas,
which contains the diagram,
and the Toolbox, which contains the object palettes and other controls. The
Toolbox is divided into three regions. The top region contains 14 buttons. The
first three are controls used to adjust the diagram. The next 11 are the icons
for the built-in basic objects.
</para>
<para>
The middle portion of the Toolbox contains the selected Special Objects.
This is used to select among the many built-in object sheets supplied with Dia,
such as UML, Flowchart, Network, etc.
</para>
<para>
The bottom portion of the Toolbox contains special controls that set default
properties for objects placed on the canvas. These include foreground color,
background color, and line width. There are also three controls that set
the default properties for line objects. These are beginning arrow style,
ending arrow style, and line style.
</para>
<sect2 id="toolbox-modify">
<title>Modify Control</title>
<figure>
<title>Modify Control</title>
<screenshot>
<screeninfo>Modify Control</screeninfo>
<graphic format="PNG" fileref="graphics/toolbox-modify" srccredit="Mark Dexter" />
</screenshot>
</figure>
<para>
The Modify control is the default setting when using Dia. This control
allows you to select one or more objects on the canvas. After an object
is added to the diagram, the Modify control is automatically selected
for you. This makes it easy to add an object and then continue working
without having to reselect the Modify control.
</para>
<tip>
<para>
You can toggle between an object control and the Modify control using the
Space key. For example, say you wish to add several Box objects to the
diagram. First, click on the Box icon and click on the canvas to add the Box.
At this point, the Modify control will be selected automatically. To reselect
the Box control, press the Space key. Now you can click on the canvas again
to add a second Box object. Continue to press Space and then click to add
as many Box objects as desired.
</para>
</tip>
<tip>
<para>
You can customize <application>Dia</application>
to disable the automatic selection of the Modify control. See
<link linkend="user-interface">Customization / User Interface</link>
for more information.
</para>
</tip>
</sect2>
<sect2 id="toolbox-textedit">
<title>Textedit Control</title>
<figure>
<title>Textedit Control</title>
<screenshot>
<screeninfo>Textedit Control</screeninfo>
<graphic format="PNG" fileref="graphics/toolbox-textedit" srccredit="Hans Breuer" />
</screenshot>
</figure>
<para>
The Textedit control is new with Dia from version 0.97 - it indicates being
in text edit mode. Together with an appropriate object selection it is one way
to start text modification.
</para>
<para>
An object supporting in-canvas text editing can be in two different selection modes.
The normal selection is the same for all objects, it allows to manipulate the objects
position, grouping etc.. Some object can enter a second selection mode, which allows
to edit their text from the canvas.
</para>
<tip>
<para>
There are multiple ways to enter text edit mode. You can press-and-hold the left mouse button,
activate text editing by Enter or F2 key or select the respective object after activating
Textedit from the toolbox.
</para>
</tip>
</sect2>
<sect2 id="toolbox-magnify">
<title>Magnify Control</title>
<figure>
<title>Magnify Control</title>
<screenshot>
<screeninfo>Magnify Control</screeninfo>
<graphic format="PNG" fileref="graphics/toolbox-magnify" srccredit="Mark Dexter" />
</screenshot>
</figure>
<para>
The Magnify control is one method for zooming in or out. See
<link linkend="zooming">The Canvas / Zooming</link> for more
information about zooming. The Magnify control stays active until you
press one of the other controls.
</para>
</sect2>
<sect2 id="toolbox-scroll">
<title>Scroll Control</title>
<figure>
<title>Scroll Control</title>
<screenshot>
<screeninfo>Scroll Control</screeninfo>
<graphic format="PNG" fileref="graphics/toolbox-scroll" srccredit="Mark Dexter" />
</screenshot>
</figure>
<para>
The Scroll control is used to move around the diagram. When this control
is active, the mouse pointer changes to a hand. When the Scroll control
is active, you can scroll around
the diagram by clicking anywhere on the canvas and dragging the mouse. The
diagram scrolls within the canvas window. The Scroll control stays active
until you press one of the other controls.
</para>
</sect2>
<sect2 id="toolbox-basic">
<title>Basic Objects</title>
<para>
After the Modify, Zoom, and Scroll controls, the next 11 buttons allow you
to place Dia's basic objects on the canvas. See
<link linkend="basic-objects-introduction">Basic Objects Introduction</link>
for more information on Dia's basic objects.
</para>
</sect2>
<sect2 id="toolbox-special">
<title>Special Objects</title>
<figure>
<title>Special Objects</title>
<screenshot>
<screeninfo>Scroll Control</screeninfo>
<graphic format="PNG" fileref="graphics/toolbox-special" srccredit="Mark Dexter" />
</screenshot>
</figure>
<para>
On the Toolbox, just below the basic object icons, is a drop-down listbox
that allows you to select a sheet of special objects to be included in the
diagram. As you can see from the screenshot above, <application>Dia</application>
provides a large number
of special objects. To use a special object, first select the desired sheet
using this drop-down listbox. Then, just click on the desired object and
click on the canvas to insert the object.
See
<link linkend="special-object-categories">Special Object Categories</link>
for more information on the various types of special objects available.
</para>
</sect2>
<sect2 id="toolbox-lower">
<title>Default Color, Line Width, and Line Style</title>
<figure>
<title>Default Color, Line Width, and Line Style</title>
<screenshot>
<screeninfo>Default Color, Line Width, and Line Style</screeninfo>
<graphic format="PNG" fileref="graphics/toolbox-lower" srccredit="Mark Dexter" />
</screenshot>
</figure>
<para>
Below the special objects palette are controls for setting the default
foreground and background color, line width, and line style.
These controls all set default
properties for new objects being added to the canvas. They do not affect the
properties of existing objects already on the palette. These settings
stay in effect for all future <application>Dia</application> sessions,
until they are changed.
</para>
<para>
The two squares on the left allow you to set the default foreground and
background colors for all new objects being added to the diagram. If you
double-click on the upper square (i.e., the black one in the screenshot
above), you can set the default foreground color for all new objects.
Double-clicking on the lower square (white in the screenshot) allows you to
select the default background color. See <link linkend="colors">
Objects / Colors </link> for more information about selecting colors.
</para>
<tip>
<figure>
<title>Restore Default Colors Button</title>
<screenshot>
<screeninfo>Restore Default Colors Button</screeninfo>
<graphic format="PNG" fileref="graphics/default-colors" srccredit="Mark Dexter" />
</screenshot>
</figure>
<para>
To set the colors back to the default, click on the black and white box
to the bottom left of the color selector.
</para>
</tip>
<tip>
<figure>
<title>Reverse Colors Button</title>
<screenshot>
<screeninfo>Reverse Colors Button</screeninfo>
<graphic format="PNG" fileref="graphics/reverse-colors" srccredit="Mark Dexter" />
</screenshot>
</figure>
<para>
To inverse the colors, click on the little arrow to the top right of the
two boxes.
</para>
</tip>
<figure>
<title>Default Line Width</title>
<screenshot>
<screeninfo>Default Line Width</screeninfo>
<graphic format="PNG" fileref="graphics/line-width" srccredit="Mark Dexter" />
</screenshot>
</figure>
<para>
To the right of the two squares are five lines of increasing width. To
select the desired default line width, simply click on it. A dashed-rectangle
indicates which width is currently selected.
</para>
<figure>
<title>Arrow and Line Style</title>
<screenshot>
<screeninfo>Arrow and Line Style</screeninfo>
<graphic format="PNG" fileref="graphics/arrow-style" srccredit="Mark Dexter" />
</screenshot>
</figure>
<para>
At the bottom of the Toolbox are three buttons. The left button allows you
to select the default arrow shape for the beginning of a line. In the screenshot
this is defaulting to "no arrow". The right button allows you to select the
default arrow shape for the end of a line. Since only lines have arrows,
these buttons only affect
line objects and have no effect on other shapes. The middle button allows
you to select the default line style (solid, dashed, etc.).
</para>
<note>
<para>
The line-width and line style settings affect all basic objects. For shapes,
these settings determine the line properties of the shape outlines. These
settings also are used for some special objects (e.g., Flowchart objects).
Other special objects (e.g., AADL objects)
have fixed line widths and are not affected by these settings.
</para>
</note>
</sect2>
</sect1>
<sect1 id="using-objects">
<title>Using Objects</title>
<sect2 id="adding-objects">
<title>Adding Objects</title>
<para>
Adding objects to the <application>Dia</application> canvas is done
by clicking on the desired object's icon button in the
<interface>Toolbox</interface> and then
clicking on the canvas at the desired insertion point. The selected object
will be inserted at that point.
</para>
<tip>
<para>
You can quickly add multiple objects of the same type to the diagram
using the Space key to toggle between the Modify control and the
desired object. For example, say you wish to add several Box objects to the
diagram. First, click on the Box icon and click on the canvas to add the Box.
At this point, the Modify control will be selected automatically. To reselect
the Box control, press the Space key. Now you can click on the canvas again
to add a second Box object. Continue to press Space and then click to add
as many Box objects as desired.
</para>
</tip>
<tip>
<para>
If you are using different colors or line styles for different objects,
one trick to save time is to create a separate file of sample objects with the
desired properties on a separate diagram. Then copy and paste these objects
onto your working diagram as you need them.
</para>
</tip>
</sect2>
<sect2 id="moving-objects">
<title>Moving Objects</title>
<para>
When an object is inserted into the canvas, the desired object will appear
with small green boxes (known as handles) around the border.
<figure>
<title>Object Handles</title>
<screenshot>
<screeninfo>The line icon</screeninfo>
<graphic format="PNG" fileref="graphics/line_icon" srccredit="Steffen Macke" />
</screenshot>
</figure>
To move an object,
click anywhere inside the object (or somewhere on a line other than
a handle) and drag the mouse to the desired location on the canvas. For
line objects, you need to click on the line.
</para>
<tip>
<para>
When moving an object, be sure not to click on a handle. Otherwise, you will
resize the object instead of moving it.
</para>
</tip>
</sect2>
<sect2 id="resizing-objects">
<title>Resizing Objects</title>
<para>
Handles are used to change the size of the object. To expand an object,
just click a handle and drag it away from the center of the object.
To shrink an object, drag a handle toward its center. The
object's size will change as you drag the mouse.
If an object has a fixed aspect ratio, changing one dimension automatically
changes the other. If an object has a free aspect ratio, you can change one
dimension (e.g., height) without affecting the other (e.g., width). Some
objects have a property setting that determines whether the aspect ratio
is fixed or free.
</para>
</sect2>
<sect2 id="deleting-objects">
<title>Deleting Objects</title>
<para>
To delete an object, click on the object to select it. The handles
will display, which indicates that the object is selected.
Then press the Delete key or select
<menuchoice>
<guimenu>Edit</guimenu>
<guimenuitem>Delete</guimenuitem>
</menuchoice> from the menu.
</para>
</sect2>
<sect2 id="connecting-objects">
<title>Connecting Objects With Lines</title>
<para>
In many diagrams, shapes are connected to each other using one of the
basic line objects. When a shape is not selected, a number of connection
points are displayed on its borders as small "x" figures. There is
also a connection point in the middle of each shape. Lines also have
connection points where other lines can connect.
</para>
<para>
Lines have handles on each end that are used to connect them to other objects.
These handles are green if the line is not connected and red if it is connected.
Lines also have orange handles that are used to shape the line. The figure below
shows several lines with green handles on the unconnected end and red handles
on the connected end.
<figure>
<title>Line Handles</title>
<screenshot>
<screeninfo>Line Handles</screeninfo>
<graphic format="PNG" fileref="graphics/line-handles" srccredit= "Mark Dexter" />
</screenshot>
</figure>
</para>
<para>
To connect two shapes with a line:
</para>
<orderedlist>
<listitem>
<para>
Select the desired line (Line, Zigzagline, etc.) by clicking on the Toolbox icon.
</para>
</listitem>
<listitem>
<para>
You can either click on the canvas to place the line on the diagram and
then drag the "from" end of the line to the desired connection point of
the first object.
</para>
<para>
Or you can save a step by clicking directly on the desired connection point
of the first object. In this case, the line will
display with the "from" end of the line already connected to the first object.
</para>
<para>
In either case, when the "from" end of the line is connected,
it's "from" handle will be red.
</para>
</listitem>
<listitem>
<para>
Click on green handle at the "to" end of the line and drag it to the desired
connection point on the second object. When the line is connected, the outline
of the object being connected will turn red, as shown in the figure below.
<figure>
<title>Line Connected</title>
<screenshot>
<screeninfo>Line Connected</screeninfo>
<graphic format="PNG" fileref="graphics/line-connect" srccredit="Mark Dexter" />
</screenshot>
</figure>
At this point, the two objects are connected. If you move either object,
the line will stretch to keep them connected. If you move the line, it will
disconnect from both objects. If you do this by mistake, you can undo using
Ctrl+Z or <menuchoice>
<guimenu>Edit</guimenu>
<guimenuitem>Undo</guimenuitem>
</menuchoice>.
</para>
</listitem>
</orderedlist>
<para>
At any time, you can disconnect or connect to a new point by clicking on the "from"
or "to" handle and dragging it to a new location on the diagram.
</para>
<tip>
<para>
If you connect a line to a fixed point on a shape's perimeter, it will stay
connected to this point when the object is moved.
<figure>
<title>Fixed Connection Point</title>
<screenshot>
<screeninfo>Fixed Connection Point</screeninfo>
<graphic format="PNG" fileref="graphics/connect-fixed" srccredit="Mark Dexter" />
</screenshot>
</figure>
</para>
<para>
If you connect a line to
the middle of an object, when you move the object the displayed
connection point moves automatically, so you don't need to change the
connection point.
<figure>
<title>Middle Connection Point</title>
<screenshot>
<screeninfo>Middle Connection Point</screeninfo>
<graphic format="PNG" fileref="graphics/connect-middle" srccredit="Mark Dexter" />
</screenshot>
</figure>
</para>
<para>
Note that, when a line is connected to the middle of an object, the line's
connection handle is still positioned on the perimeter of the object. So
to move the line's connection point, drag on the line's handle (as opposed
to the middle of the object).
</para>
</tip>
<tip>
<para>
If you connect a Line or Polyline object to the middle of a shape
when you first place the
line on the canvas, you need to be careful when connecting the "to" end
of the line. Be sure to click on the line's handle and not on
the surrounding area within the shape. If you click on the surrounding area
inside the shape, you will select the shape and not the line's handle. If this
happens, click outside the shape to deselect it and then carefully click
on the "x" in the middle of the object (not on the line's arrow). The
handle will display, and you can drag it to the desired location. Note that
the handle will display as red, because it is connected to the middle. Also
note that you need to drag it outside the shape before you can see the line.
</para>
</tip>
<para>
See <link linkend="line">Basic Objects / Line</link> for more information on
the different lines available.
</para>
</sect2>
<sect2 id="entering-text">
<title>Entering Text</title>
<para>
Text can be entered by selecting the object, entering text edit mode and then
typing the text.
The font, size, alignment, and other formatting properties can be changed by
double-clicking the object, when not in text edit mode.
</para>
<para>
Many Dia objects suport in-canvas editing of text. Dia versions before 0.97
had not explicit distinction between a selected object and it's text edit mode.
As a result numerous workarounds were needed to support canvas and text editing
with the same set of keys, e.g. the Delete key was not deleting the character
right to the cursor, but instead the whole object.
</para>
<para>
With Dia 0.97 and later there is a dedicated <link linkend="toolbox-textedit">text edit mode</link>.
You can enter it by hitting Enter or F2 key while an appropriate object is selected.
To leave text editing just click outside of the editable area or hit the Escape key.
</para>
<figure>
<title>Edit Menu Text Commands</title>
<screenshot>
<screeninfo>Edit Menu Text Commands</screeninfo>
<graphic format="PNG" fileref="graphics/edit-text" srccredit="Mark Dexter" />
</screenshot>
</figure>
<tip>
<para>
While in text edit mode the normal Copy / Paste keys (Ctrl+C, Ctrl+V) work on
the entire text. The Edit menu also contains the commands
Copy Text, Cut Text (Shift+Ctrl+X), and Paste Text (Shift+Ctrl+V)
to copy, cut, and paste just the text contents of an object.
Note that when you paste text into an object, the text is
formatted according to the <application>Dia</application> object properties,
not the text source.
</para>
</tip>
<tip>
<para>
You cannot select a section of text inside an object with the mouse (this
moves the cursor). You can insert characters at the current cursor position
just by typing. You can delete the character to the left of the mouse using
Backspace. The Del key deletes the character right to the cursor.
To delete all of the text in an object, use the Cut (Shift+Ctrl+X).
</para>
</tip>
</sect2>
<sect2 id="aligning-objects">
<title>Aligning Objects</title>
<para>
<application>Dia</application> provides several options to help
arrange multiple objects without needing to move each object
individually. These are available on the <menuchoice>
<guimenu>Objects</guimenu>
<guimenuitem>Align</guimenuitem>
</menuchoice> menu choice shown below.
<figure>
<title>Objects / Align Options</title>
<screenshot>
<screeninfo>Objects / Align Options</screeninfo>
<graphic format="PNG" fileref="graphics/align-menu" srccredit="Hans Breuer" />
</screenshot>
</figure>
</para>
<sect3 id="how-to-align">
<title>How To Align Objects</title>
<para>
To align objects, first select the objects to align (see
<link linkend="selecting-chapter">Selecting Objects</link>
) and then execute one of the align commands, using either the menu
or the shortcut key. The order in which objects are selected does not
matter.
</para>
</sect3>
<sect3 id="align-left-center-right">
<title>Left, Center, and Right Align</title>
<para>
The align left, right, and center are used to align objects arranged
vertically on the canvas. The align left aligns the selected objects
to the left edge of the left-most object. Similarly, the align right
aligns the selected objects to the right edge of the right-most object.
Align center aligns the center of each object to the mid-point between the
extreme left and extreme right edge of all selected objects. Examples of
align left, center, and right are shown below.
</para>
<figure>
<title>Before Left, Center, Right Align</title>
<screenshot>
<screeninfo>Before Left, Center, Right Align</screeninfo>
<graphic format="PNG" fileref="graphics/before-left" srccredit="Mark Dexter" />
</screenshot>
</figure>
<figure>
<title>Align Left</title>
<screenshot>
<screeninfo>Align Left</screeninfo>
<graphic format="PNG" fileref="graphics/align-left" srccredit="Mark Dexter" />
</screenshot>
</figure>
<figure>
<title>Align Center</title>
<screenshot>
<screeninfo>Align Center</screeninfo>
<graphic format="PNG" fileref="graphics/align-center" srccredit="Mark Dexter" />
</screenshot>
</figure>
<figure>
<title>Align Right</title>
<screenshot>
<screeninfo>Align Right</screeninfo>
<graphic format="PNG" fileref="graphics/align-right" srccredit="Mark Dexter" />
</screenshot>
</figure>
</sect3>
<sect3 id="align-top-middle-bottom">
<title>Top, Middle, and Bottom Align</title>
<para>
The align top, middle, and bottom are used to align objects arranged
horizontally on the canvas. The align top aligns the selected objects
to the top edge of the upper-most object. Similarly, the align bottom
aligns the selected objects to the bottom edge of the lowest object.
Align middle aligns the middle of each object to the mid-point between the
extreme top and extreme bottom edge of all selected objects. Examples of
align top, middle, and bottom are shown below.
</para>
<figure>
<title>Before Top, Middle, Bottom Align</title>
<screenshot>
<screeninfo>Before Top, Middle, Bottom Align</screeninfo>
<graphic format="PNG" fileref="graphics/before-top" srccredit="Mark Dexter" />
</screenshot>
</figure>
<figure>
<title>Align Top</title>
<screenshot>
<screeninfo>Align Top</screeninfo>
<graphic format="PNG" fileref="graphics/align-top" srccredit="Mark Dexter" />
</screenshot>
</figure>
<figure>
<title>Align Middle</title>
<screenshot>
<screeninfo>Align Middle</screeninfo>
<graphic format="PNG" fileref="graphics/align-middle" srccredit="Mark Dexter" />
</screenshot>
</figure>
<figure>
<title>Align Bottom</title>
<screenshot>
<screeninfo>Align Bottom</screeninfo>
<graphic format="PNG" fileref="graphics/align-bottom" srccredit="Mark Dexter" />
</screenshot>
</figure>
</sect3>
<sect3 id="align-spread-out">
<title>Spread Out Horizontally and Vertically</title>
<para>
The Align / Spread Out commands can be used to create uniform spacing
for objects arranged either horizontally or vertically. Examples of these
commands are shown below.
</para>
<figure>
<title>Before Spread Out Horizontally</title>
<screenshot>
<screeninfo>Before Spread Out Horizontally</screeninfo>
<graphic format="PNG" fileref="graphics/before-hor-spread" srccredit="Mark Dexter" />
</screenshot>
</figure>
<figure>
<title>After Spread Out Horizontally</title>
<screenshot>
<screeninfo>After Spread Out Horizontally</screeninfo>
<graphic format="PNG" fileref="graphics/after-hor-spread" srccredit="Mark Dexter" />
</screenshot>
</figure>
<figure>
<title>Before Spread Out Vertically</title>
<screenshot>
<screeninfo>Before Spread Out Vertically</screeninfo>
<graphic format="PNG" fileref="graphics/before-vert-spread" srccredit="Mark Dexter" />
</screenshot>
</figure>
<figure>
<title>After Spread Out Vertically</title>
<screenshot>
<screeninfo>After Spread Out Vertically</screeninfo>
<graphic format="PNG" fileref="graphics/after-vert-spread" srccredit="Mark Dexter" />
</screenshot>
</figure>
</sect3>
<sect3 id="align-adjacent-stacked">
<title>Align Adjacent or Stacked</title>
<para>
The Align / Adjacent command is used to place objects next to each other with no
horizontal space in between. The Align / Stacked is used to place objects directly
on top of each other, with no vertical space in between. Examples of these
commands are shown below.
</para>
<figure>
<title>Align / Adjacent</title>
<screenshot>
<screeninfo>Align / Adjacent</screeninfo>
<graphic format="PNG" fileref="graphics/adjacent" srccredit="Mark Dexter" />
</screenshot>
</figure>
<figure>
<title>Align / Stacked</title>
<screenshot>
<screeninfo>Align / Stacked</screeninfo>
<graphic format="PNG" fileref="graphics/stacked" srccredit="Mark Dexter" />
</screenshot>
</figure>
</sect3>
<sect3 id="align-connected">
<title>Align Connected</title>
<para>
The Align Connected command tries to align connected objects, so that the
connecting lines are either horizontal or vertical afterwards.
</para>
<figure>
<title>Before Align Connected</title>
<screenshot>
<screeninfo>Before Align Connected</screeninfo>
<graphic format="PNG" fileref="graphics/align-connected-before" srccredit="Hans Breuer" />
</screenshot>
</figure>
<figure>
<title>After Align Connected</title>
<screenshot>
<screeninfo>After Align Connected</screeninfo>
<graphic format="PNG" fileref="graphics/align-connected" srccredit="Hans Breuer" />
</screenshot>
</figure>
<note><para>
The algorithm used to align connected objects is not fool proof, infact it
is very simple. If the resulting alignment does not match your expectations
use Undo to revert it. A different selection of objects may producae a result
more to your liking.
</para></note>
</sect3>
</sect2>
<sect2 id="grouping-objects">
<title>Grouping Objects</title>
<para>
Grouping allows you to treat several objects as a single entity.
A group enables you to
fix the position of the member objects in relation to each other and to
change the properties of all member objects at one time.
To create an object group, select two or more objects and then
select <menuchoice>
<guimenu>Objects</guimenu>
<guimenuitem>Group</guimenuitem>
</menuchoice>.
</para>
<figure>
<title>Before and After Group Create</title>
<screenshot>
<screeninfo>Before and After Group Create</screeninfo>
<graphic format="PNG" fileref="graphics/object-group" srccredit= "Mark Dexter" />
</screenshot>
</figure>
<para>
When the group is created or subsequently selected, a set of black handles
displays around the outside of the group, as shown in the figure
above. At this point, you can
move the entire group just like you
would move a single object. Just click and drag on any of the objects
in the group.
</para>
<para>
You can also change the properties of all objects in a group by double-clicking
or using the right-click context menu.
See <link linkend="changing-group-properties">Changing Properties for a
Group of Objects</link> for more information.
</para>
</sect2>
</sect1>
<sect1 id="object-properties">
<title>Object Properties</title>
<para>
The properties of an object control it's appearance. Properties include text
font and appearance; line width, style, and color; transparency (i.e., draw background
yes or no); foreground and background
color; and any other settings that control the way an object is displayed.
Different types of objects have different sets of properties.
</para>
<para>
The specific properties of an object are determined in two different ways.
The default settings in force at the time the object is added
to the canvas determine the object's initial properties. Once objects are
placed onto the diagram, their properties may be set using the Properties
dialog box for the object or for a group of objects.
</para>
<sect2 id="default-properties">
<title>Sources of Default Properties</title>
<para>
An object's default properties are set in two places within Dia. First,
as discussed above in <link linkend="toolbox-lower">
Default Color, Line Width, and Line Style</link>, default values for
the foreground and background
color; the line width; and the line style of all basic objects and some
special objects
are determined by settings on the Toolbox. For basic lines,
the default beginning
and ending arrow styles are also determined by the Toolbox settings.
</para>
<para>
The rest of an object's default properties can be set using the Defaults:
Properties dialog box for each object. This is opened by double-clicking
on the object's icon on the Toolbox. Since the available properties for each
type of object can be different, each object's default properties dialog
is different. Below are examples of the default properties dialog for
the basic Text and Box objects.
</para>
<figure>
<title>Default Text Properties</title>
<screenshot>
<screeninfo>Default Text Properties</screeninfo>
<graphic format="PNG" fileref="graphics/defaults-text" srccredit= "Mark Dexter" />
</screenshot>
</figure>
<figure>
<title>Default Box Properties</title>
<screenshot>
<screeninfo>Default Box Properties</screeninfo>
<graphic format="PNG" fileref="graphics/defaults-box" srccredit= "Mark Dexter" />
</screenshot>
</figure>
<para>
For objects that include text, the dialog will normally include the
text alignment, the font name, the font modifier (normal, bold, etc.), and
the font size (in centimeters, not points). This makes it possible to set
defaults for text display for any object that can contain text.
</para>
</sect2>
<sect2 id="changing-properties">
<title>Changing Object Properties</title>
<para>
Once objects are placed onto the diagram, their properties can be
changed either individually or as a member of a group.
</para>
<sect3 id="changing-individual-properties">
<title>Changing Properties for One Object</title>
<para>
To change the
properties of an individual object, either double-click on the object
or select the object, right-click to display the context menu, and select
the Properties option. In either case, the Properties dialog for the selected
object will display, allowing you to change any of the object's properties.
</para>
<note>
<para>
If multiple objects are selected, you can still change the properties of one
of the selected objects by double-clicking that object. This will only change
the properties of the one object you double-clicked.
</para>
</note>
</sect3>
<sect3 id="changing-group-properties">
<title>Changing Properties for a Group of Objects</title>
<para>
You can change the properties of a group of objects at one time by selecting
two or more objects and then selecting
<menuchoice>
<guimenu>
Objects
</guimenu>
<guimenuitem>
Group
</guimenuitem>
</menuchoice>
to create a group. Once the group is created, you can set properties for all
objects in the group. To do this, either double-click on the group or right-click
to display the context menu and select the Properties option.
The Properties: Group dialog will display. Only properties that pertain
to all of the selected objects will display in the dialog. If your group
contains only objects of one type, then all of the properties for that object
type will display.
</para>
<para>
For example, if a group contains all basic Line objects,
all of the Line properties will display in the Properties: Group dialog.
If a group contains a basic Line
and a basic Box, the Properties: Group dialog will only show Line width,
Line color, and Line style, since these are the properties these objects
have in common.
</para>
<para>
Changing properties for a group is a powerful feature of
<application>Dia</application>. For example, say you have a large diagram
and you need to
change the line style of all the basic Line objects everywhere in the diagram.
You can accomplish this easily with the following steps.
<orderedlist>
<listitem>
<simpara>
Select one basic Line object.
</simpara>
</listitem>
<listitem>
<simpara>
Use
<menuchoice>
<guimenu>
Select
</guimenu>
<guimenuitem>
Same Type
</guimenuitem>
</menuchoice>
to select all of the basic Line objects on the diagram.
</simpara>
</listitem>
<listitem>
<simpara>
Use
<menuchoice>
<guimenu>
Objects
</guimenu>
<guimenuitem>
Group
</guimenuitem>
</menuchoice>
to create a group for the selected objects.
</simpara>
</listitem>
<listitem>
<simpara>
Double-click on the
group and make your property changes.
</simpara>
</listitem>
<listitem>
<simpara>
Use
<menuchoice>
<guimenu>
Objects
</guimenu>
<guimenuitem>
Ungroup
</guimenuitem>
</menuchoice>
to remove the group.
</simpara>
</listitem>
</orderedlist>
With this technique, you can quickly change the properties
of many objects. This also works with selections containing
multiple object types, as long as all of the selected objects have the
properties you want to change.
</para>
</sect3>
</sect2>
</sect1>
<sect1 id="colors">
<title>Colors</title>
<para>
All objects in <application>Dia</application> have color attributes. Lines
have line color. Shapes have line color and fill color. Text and other objects
that contain text have text color. In addition, the
<menuchoice>
<guimenu>
Diagram
</guimenu>
<guimenuitem>
Properties</guimenuitem>
</menuchoice>
allows you to set colors for Background, Grid Lines, and Page Breaks.
Finally, the Toolbox allows you to set default foreground and background
colors for new objects.
</para>
<para>
In most cases, there are two methods for selecting a color. First, you
can select a color from a list of colors provided in the drop-down listbox
by each color property.
<figure>
<title>Color Listbox</title>
<screenshot>
<screeninfo>Color Listbox</screeninfo>
<graphic format="PNG" fileref="graphics/color-dropdown" srccredit="Mark Dexter" />
</screenshot>
</figure>
The list contains five primary colors (black, white, red, green, and blue)
plus custom colors that have been previously used. You can just select a
color from the list or select "More colors..." to display the Select color
box. The Select color box allows you to select any color. It is explained in
the next section.
</para>
<sect2 id="color-selector">
<title>Select Color Box</title>
<figure>
<title>Select Color Box</title>
<screenshot>
<screeninfo>The Select color box is described below.</screeninfo>
<graphic format="PNG" fileref="graphics/color-selector1" srccredit="Jeremy" />
</screenshot>
</figure>
<para>
The Colors selector box contains 7 zones:
<orderedlist>
<listitem>
<para>
The colors wheel allows you to select a color using the mouse.
Select the color you want from the outer
ring. A white or black line shows the current position on the
ring. Select the darkness or lightness you want using the inner
triangle. A white or black circle shows the current position
in the triangle. You can click or drag on either surface. The
currently-selected color displays in the right side of the
rectangle just below the circle.
</para>
</listitem>
<listitem>
<para>
Below the color wheel there are two rectangles. The left one
displays the current color of the object, the right one the new color
(i.e., the one you currently have chosen using the colors wheel).
Pressing the OK button will set the object to the new color.
</para>
<para>
Just to the right of these rectangles, there is a pipette button.
When you click this button, the mouse pointer changes to
a pipette. When the pipette is active, you can click on
the canvas or any open application window (Like
<application>The Gimp</application>), and select any color!
</para>
<note>
<para>
On Windows, you can only select from colors on the Dia canvas.
</para>
</note>
</listitem>
<listitem>
<para>
In the lower right there is a predefined color palette.
Click on any of these to choose the color.
</para>
</listitem>
<listitem>
<para>
To control the transparency of the color you can use the slider in
the middle right.
</para>
</listitem>
<listitem>
<para>
In the upper center there are settings for Hue, Saturation, and Value
(HSV). You can select a
color by typing a numeric value or by using the increment /
decrement controls. Note that when you enter a value here, the
color wheel selection changes to reflect the new color.
</para>
</listitem>
<listitem>
<para>
To the right, there are settings for Red, Green, and Blue.
These work the same as the HSV controls.
</para>
</listitem>
<listitem>
<para>
In the middle of the box is a place to enter a Color name.
This supports standard color names or HTML-style hexadecimal
color values.
(See
<ulink type="http"
url="http://www.w3.org/TR/html401/types.html#h-6.5"
>HTML4.01 colors on http://www.w3.org</ulink>), and hexadecimal
values (0-9A-F) on 3 or 6 octets.
</para>
</listitem>
</orderedlist>
</para>
</sect2>
</sect1>
<sect1 id="diagram-tree">
<title>Diagram Tree</title>
<para>
The Diagram Tree provides an alternative method of working with a diagram.
This window displays a list of all objects in the diagram in a scrolling
list box. By right-clicking on an object, you can perform a number of operations.
</para>
<sect2 id="open-diagram-tree">
<title>Opening the Diagram Tree</title>
<para>
The Diagram Tree is shown by selecting
<menuchoice>
<guimenu>
File
</guimenu>
<guimenuitem>
Diagram Tree
</guimenuitem>
</menuchoice> from the Toolbox menu bar or by pressing F8
when the Toolbox is in focus.
</para>
</sect2>
<sect2 id="working-diagram-tree">
<title>Working With the Diagram Tree</title>
<para>
Some actions on the Diagram Tree affect the diagram itself. By selecting
objects in the tree, you can modify multiple of them at once.
You can sort the objects in the tree by type or name. click on the
respective table header.
If you right-click on the Diagram Tree list, a context menu
displays with three options.
<figure>
<title>Diagram Tree</title>
<screenshot>
<screeninfo>Diagram Tree</screeninfo>
<graphic format="PNG" fileref="graphics/diagram-tree" srccredit="Hans Breuer" />
</screenshot>
</figure>
These options are explained below.
</para>
<itemizedlist>
<listitem>
<para>
Select will transfer the current the selection in the tree to the diagram.
</para>
</listitem>
<listitem>
<para>
Locate will bring the selected object(s) into view on the canvas.
This can be useful if you are trying to find an object in a large
diagram.
</para>
</listitem>
<listitem>
<para>
Properties will display the properties dialog for the selected object(s).
See <link linkend="object-properties">Object Properties</link> for
more information.
</para>
</listitem>
</itemizedlist>
</sect2>
</sect1>
</chapter>
|