LCOV - code coverage report
Current view: top level - gui/include/sketch - gui_sketch_style.inl (source / functions) Coverage Total Hit
Test: crystal-facet-uml_v1.63.2_covts Lines: 55.6 % 18 10
Test Date: 2025-05-01 10:10:14 Functions: 42.9 % 7 3

            Line data    Source code
       1              : /* File: gui_sketch_style.inl; Copyright and License: see below */
       2              : 
       3              : #include "u8/u8_log.h"
       4              : #include <assert.h>
       5              : 
       6              : static const char *const GUI_SKETCH_STYLE_FONT_FAMILY = "Sans";
       7              : 
       8            4 : static inline void gui_sketch_style_init( gui_sketch_style_t *this_ )
       9              : {
      10            4 :     pencil_size_init_empty( &((*this_).pencil_size) );
      11              :     /* the grid is snapped to rather easily, there is no risk of accidentially selecting a close-by grid position */
      12            4 :     (*this_).snap_to_grid_distance = 8.000001;
      13              :     /* a relationship must be selected rather accurately, to avoid not being able to select something close by */
      14            4 :     (*this_).snap_to_relationship = 3;
      15            4 : }
      16              : 
      17            4 : static inline void gui_sketch_style_destroy( gui_sketch_style_t *this_ )
      18              : {
      19            4 :     pencil_size_destroy( &((*this_).pencil_size) );
      20            4 : }
      21              : 
      22            0 : static inline double gui_sketch_style_get_snap_to_grid( const gui_sketch_style_t *this_ )
      23              : {
      24            0 :     return (*this_).snap_to_grid_distance;
      25              : }
      26              : 
      27            0 : static inline int32_t gui_sketch_style_get_snap_to_relationship( const gui_sketch_style_t *this_ )
      28              : {
      29            0 :     return (*this_).snap_to_relationship;
      30              : }
      31              : 
      32              : static inline double gui_sketch_style_get_footnote_font_size( const gui_sketch_style_t *this_ )
      33              : {
      34              :     return pencil_size_get_footnote_font_size( &((*this_).pencil_size) );
      35              : }
      36              : 
      37              : static inline const PangoFontDescription *gui_sketch_style_get_footnote_font_description( const gui_sketch_style_t *this_ )
      38              : {
      39              :     return pencil_size_get_footnote_font_description( &((*this_).pencil_size) );
      40              : }
      41              : 
      42              : static inline double gui_sketch_style_get_standard_font_size( const gui_sketch_style_t *this_ )
      43              : {
      44              :     return pencil_size_get_standard_font_size( &((*this_).pencil_size) );
      45              : }
      46              : 
      47            4 : static inline const PangoFontDescription *gui_sketch_style_get_standard_font_description( const gui_sketch_style_t *this_ )
      48              : {
      49            4 :     return pencil_size_get_standard_font_description( &((*this_).pencil_size) );
      50              : }
      51              : 
      52              : static inline double gui_sketch_style_get_title_font_size( const gui_sketch_style_t *this_ )
      53              : {
      54              :     return pencil_size_get_title_font_size( &((*this_).pencil_size) );
      55              : }
      56              : 
      57              : static inline const PangoFontDescription *gui_sketch_style_get_title_font_description( const gui_sketch_style_t *this_ )
      58              : {
      59              :     return pencil_size_get_title_font_description( &((*this_).pencil_size) );
      60              : }
      61              : 
      62              : static inline double gui_sketch_style_get_font_tab_size( const gui_sketch_style_t *this_ )
      63              : {
      64              :     return pencil_size_get_font_tab_size( &((*this_).pencil_size) );
      65              : }
      66              : 
      67              : static inline double gui_sketch_style_get_font_line_gap( const gui_sketch_style_t *this_ )
      68              : {
      69              :     return pencil_size_get_font_line_gap( &((*this_).pencil_size) );
      70              : }
      71              : 
      72              : static inline double gui_sketch_style_get_standard_line_width( const gui_sketch_style_t *this_ )
      73              : {
      74              :     return pencil_size_get_standard_line_width( &((*this_).pencil_size) );
      75              : }
      76              : 
      77              : static inline double gui_sketch_style_get_bold_line_width( const gui_sketch_style_t *this_ )
      78              : {
      79              :     return pencil_size_get_bold_line_width( &((*this_).pencil_size) );
      80              : }
      81              : 
      82              : static inline double gui_sketch_style_get_standard_object_border( const gui_sketch_style_t *this_ )
      83              : {
      84              :     return pencil_size_get_standard_object_border( &((*this_).pencil_size) );
      85              : }
      86              : 
      87              : static inline double gui_sketch_style_get_preferred_object_distance( const gui_sketch_style_t *this_ )
      88              : {
      89              :     return pencil_size_get_preferred_object_distance( &((*this_).pencil_size) );
      90              : }
      91              : 
      92            0 : static inline GdkRGBA gui_sketch_style_get_standard_color( const gui_sketch_style_t *this_ )
      93              : {
      94            0 :     return pencil_size_get_standard_color( &((*this_).pencil_size) );
      95              : }
      96              : 
      97              : static inline GdkRGBA gui_sketch_style_get_select_color( const gui_sketch_style_t *this_ )
      98              : {
      99              :     return pencil_size_get_select_color( &((*this_).pencil_size) );
     100              : }
     101              : 
     102            0 : static inline GdkRGBA gui_sketch_style_get_highlight_color( const gui_sketch_style_t *this_ )
     103              : {
     104            0 :     return pencil_size_get_highlight_color( &((*this_).pencil_size) );
     105              : }
     106              : 
     107              : static inline GdkRGBA gui_sketch_style_get_focus_color( const gui_sketch_style_t *this_ )
     108              : {
     109              :     return pencil_size_get_focus_color( &((*this_).pencil_size) );
     110              : }
     111              : 
     112              : static inline GdkRGBA gui_sketch_style_get_emphasized_bgcolor( const gui_sketch_style_t *this_ )
     113              : {
     114              :     return pencil_size_get_emphasized_bgcolor( &((*this_).pencil_size) );
     115              : }
     116              : 
     117              : static inline GdkRGBA gui_sketch_style_get_gray_out_color( const gui_sketch_style_t *this_ )
     118              : {
     119              :     return pencil_size_get_gray_out_color( &((*this_).pencil_size) );
     120              : }
     121              : 
     122              : 
     123              : /*
     124              : Copyright 2021-2025 Andreas Warnke
     125              : 
     126              : Licensed under the Apache License, Version 2.0 (the "License");
     127              : you may not use this file except in compliance with the License.
     128              : You may obtain a copy of the License at
     129              : 
     130              :     http://www.apache.org/licenses/LICENSE-2.0
     131              : 
     132              : Unless required by applicable law or agreed to in writing, software
     133              : distributed under the License is distributed on an "AS IS" BASIS,
     134              : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     135              : See the License for the specific language governing permissions and
     136              : limitations under the License.
     137              : */
        

Generated by: LCOV version 2.0-1