Files
s7/Resources/StampWidget/XStampWidgets.h
Saleem Edah-Tally a2045aa1f6 Add a 'Stamp' widget.
Place one or multiple stamps on scanned pages in defined locations.

A stamp is understood here as
 - a transparent text in a transparent frame with no borders
 - an opaque text on an opaque background with no borders.

Stamp parameters:
 - text
 - font
 - foreground colour
 - background colour
 - angle of rotation
 - transparency.

Locations:
 - centre
 - cardinal directions
 - inter-cardinal directions.
2025-07-09 21:12:02 +02:00

42 lines
1.1 KiB
C++

// /*
// * File: XStampWidgets.h
// * Author: Saleem Edah-Tally - nmset@yandex.com
// * License : CeCILL-C
// * Copyright Saleem Edah-Tally - © 2025
// *
// * Created on 06 07 2025, 22:41
// */
#ifndef XSTAMPWIDGETS_H
#define XSTAMPWIDGETS_H
#include "StampWidgets.h"
#include <wx/wx.h>
#include <wx/config.h>
#include <vector>
#include <memory>
struct StampDescriptor;
class XStampWidgets : public StampWidgets
{
DECLARE_DYNAMIC_CLASS( XStampWidgets )
public:
XStampWidgets(wxWindow* parent, wxWindowID id = SYMBOL_STAMPWIDGETS_IDNAME,
const wxPoint& pos = SYMBOL_STAMPWIDGETS_POSITION,
const wxSize& size = SYMBOL_STAMPWIDGETS_SIZE,
long style = SYMBOL_STAMPWIDGETS_STYLE);
bool Setup(wxConfig * config);
std::vector<StampDescriptor*> * GetStampDescriptors();
private:
wxConfig * m_config;
std::vector<StampDescriptor*> m_stampDescriptors;
void AddStampWidget(wxMouseEvent& evt);
void DeleteStampWidget(wxMouseEvent& evt);
void OnStampLocationChanged(wxCommandEvent& evt);
};
#endif // XSTAMPWIDGETS_H