Debian Codegraph @

pencil/include/pencil_relationship_1d_layouter.h

raw
1 /* File: pencil_relationship_1d_layouter.h; Copyright and License: see below */
2
3 #ifndef PENCIL_RELATIONSHIP_1D_LAYOUTER_H
4 #define PENCIL_RELATIONSHIP_1D_LAYOUTER_H
5
6 /* public file for the doxygen documentation: */
7 /*!
8 * \file
9 * \brief Calculates positions of relationships in a diagram
10 */
11
12 #include "pencil_size.h"
13 #include "layout/layout_visible_set.h"
14 #include "pencil_relationship_painter.h"
15 #include "geometry/geometry_rectangle.h"
16 #include "geometry/geometry_non_linear_scale.h"
17 #include "set/data_profile_part.h"
18 #include "set/data_small_set.h"
19 #include "set/data_visible_set.h"
20 #include "entity/data_diagram.h"
21 #include "entity/data_id.h"
22 #include "u8list/universal_array_index_sorter.h"
23 #include "u8/u8_error.h"
24 #include <cairo.h>
25 #include <stdint.h>
26
27 /*!
28 * \brief attributes of the relationship layouter
29 *
30 * \note This class is stateless. Only the layout_data, pencil_size and profile objects are stateful.
31 * It may either be instantiated once and used many times or be instantiated per use.
32 */
33 struct pencil_relationship_1d_layouter_struct {
34 layout_visible_set_t *layout_data; /* pointer to an instance of layout data */
35 const data_profile_part_t *profile; /*!< pointer to an external stereotype-image cache */
36 const pencil_size_t *pencil_size; /*!< pointer to an instance of a pencil_size_t object, defining pen sizes, gap sizes, font sizes and colors */
37
38 pencil_relationship_painter_t relationship_painter; /*!< own instance of a painter object to ask for display dimensions */
39 };
40
41 typedef struct pencil_relationship_1d_layouter_struct pencil_relationship_1d_layouter_t;
42
43 /*!
44 * \brief initializes the layouter
45 *
46 * \param this_ pointer to own object attributes
47 * \param layout_data pointer to the layout information to be used and modified
48 * \param profile pointer to the profile-part that provides the stereotypes of the elements to be layouted
49 * \param pencil_size pointer to the pencil_size_t object
50 */
51 void pencil_relationship_1d_layouter_init( pencil_relationship_1d_layouter_t *this_,
52 layout_visible_set_t *layout_data,
53 const data_profile_part_t *profile,
54 const pencil_size_t *pencil_size
55 );
56
57 /*!
58 * \brief destroys the layouter
59 *
60 * \param this_ pointer to own object attributes
61 */
62 void pencil_relationship_1d_layouter_destroy( pencil_relationship_1d_layouter_t *this_ );
63
64 /*!
65 * \brief make all relationships visible.
66 *
67 * Sets either normal visibility or grayed out status.
68 *
69 * \param this_ pointer to own object attributes
70 */
71 void pencil_relationship_1d_layouter_private_make_all_visible ( pencil_relationship_1d_layouter_t *this_ );
72
73 /*!
74 * \brief defines the shapes of relationships in sequence diagrams
75 *
76 * Shows only relationships that are associated to a lifeline because a sequence diagram
77 * shows only an example sequence of messages, not all dependencies.
78 *
79 * \param this_ pointer to own object attributes
80 */
81 void pencil_relationship_1d_layouter_layout_for_sequence( pencil_relationship_1d_layouter_t *this_ );
82
83 /*!
84 * \brief defines the shapes of relationships in timing diagrams
85 *
86 * Shows only relationships that are associated to a lifeline because a timing diagram
87 * shows only an example timing-sequence of messages, not all dependencies.
88 *
89 * \param this_ pointer to own object attributes
90 */
91 void pencil_relationship_1d_layouter_layout_for_timing( pencil_relationship_1d_layouter_t *this_ );
92
93 #endif /* PENCIL_RELATIONSHIP_1D_LAYOUTER_H */
94
95
96 /*
97 Copyright 2017-2026 Andreas Warnke
98
99 Licensed under the Apache License, Version 2.0 (the "License");
100 you may not use this file except in compliance with the License.
101 You may obtain a copy of the License at
102
103 http://www.apache.org/licenses/LICENSE-2.0
104
105 Unless required by applicable law or agreed to in writing, software
106 distributed under the License is distributed on an "AS IS" BASIS,
107 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
108 See the License for the specific language governing permissions and
109 limitations under the License.
110 */