Files
test/source/blender/editors/interface/view2d_intern.hh
Campbell Barton e955c94ed3 License Headers: Set copyright to "Blender Authors", add AUTHORS
Listing the "Blender Foundation" as copyright holder implied the Blender
Foundation holds copyright to files which may include work from many
developers.

While keeping copyright on headers makes sense for isolated libraries,
Blender's own code may be refactored or moved between files in a way
that makes the per file copyright holders less meaningful.

Copyright references to the "Blender Foundation" have been replaced with
"Blender Authors", with the exception of `./extern/` since these this
contains libraries which are more isolated, any changed to license
headers there can be handled on a case-by-case basis.

Some directories in `./intern/` have also been excluded:

- `./intern/cycles/` it's own `AUTHORS` file is planned.
- `./intern/opensubdiv/`.

An "AUTHORS" file has been added, using the chromium projects authors
file as a template.

Design task: #110784

Ref !110783.
2023-08-16 00:20:26 +10:00

44 lines
1021 B
C++

/* SPDX-FileCopyrightText: 2023 Blender Authors
*
* 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);
/**
* For paginated scrolling, get the page height to scroll. This may be a custom height
* (#View2D.page_size_y) but defaults to the #View2D.mask height.
*/
float view2d_page_size_y(const View2D &v2d);