/****************************************************************************
 * This file is part of the project AqDiagram.
 * AqDiagram (c) by 2023 Martin Preuss, all rights reserved.
 *
 * The license for this file can be found in the file COPYING which you
 * should have received along with this file.
 ****************************************************************************/

#ifndef AQDG_PLACEMENT_LAYOUT_H
#define AQDG_PLACEMENT_LAYOUT_H

#include <aqdiagram/aqdg_api.h>

#include <inttypes.h>



#define AQDG_PLACEMENT_LAYOUT_ELEMENT_OPTS_STRETCH 0x0001
#define AQDG_PLACEMENT_LAYOUT_ELEMENT_OPTS_CENTER  0x0002
#define AQDG_PLACEMENT_LAYOUT_ELEMENT_OPTS_RIGHT   0x0004




typedef struct AQDG_PLACEMENT_LAYOUT_ELEMENT AQDG_PLACEMENT_LAYOUT_ELEMENT;
struct AQDG_PLACEMENT_LAYOUT_ELEMENT {
  int pos;
  int length;
  uint32_t opts;
};




AQDG_API void AQDG_Placement_LayoutAndStretch(AQDG_PLACEMENT_LAYOUT_ELEMENT *ptrElements, int numElements,
					      int destLength, int borderBegin, int borderEnd, int spacing);

AQDG_API void AQDG_Placement_LayoutWithEqualLength(AQDG_PLACEMENT_LAYOUT_ELEMENT *ptrElements, int numElements,
						   int destLength, int borderBegin, int borderEnd, int spacing);

AQDG_API void AQDG_Placement_LayoutSecondaryAxis(AQDG_PLACEMENT_LAYOUT_ELEMENT *ptrElements, int numElements,
						 int destLength,  int borderBegin, int borderEnd);



#endif


