Code was exposing apparently internal functions to the public header, so it could reuse it in other View2D files. Worse even, a struct was defined twice in different source files and they would have to be kept in sync, just because there is no shared header file. Such internal header files are useful and don't really cause any harm.
36 lines
763 B
C++
36 lines
763 B
C++
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/** \file
|
|
* \ingroup edinterface
|
|
*
|
|
* Share between view2d_*.cc files.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "DNA_vec_types.h"
|
|
|
|
struct bContext;
|
|
struct View2D;
|
|
|
|
struct View2DScrollers {
|
|
/* focus bubbles */
|
|
int vert_min, vert_max; /* vertical scroll-bar */
|
|
int hor_min, hor_max; /* horizontal scroll-bar */
|
|
|
|
/** Exact size of slider backdrop. */
|
|
rcti hor, vert;
|
|
};
|
|
|
|
/**
|
|
* Calculate relevant scroller properties.
|
|
*/
|
|
void view2d_scrollers_calc(View2D *v2d, const rcti *mask_custom, View2DScrollers *r_scrollers);
|
|
|
|
/**
|
|
* Change the size of the maximum viewable area (i.e. 'tot' rect).
|
|
*/
|
|
void view2d_totRect_set_resize(View2D *v2d, int width, int height, bool resize);
|
|
|
|
bool view2d_edge_pan_poll(bContext *C);
|