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.
This commit is contained in:
41
Resources/StampWidget/XStampWidgets.h
Normal file
41
Resources/StampWidget/XStampWidgets.h
Normal file
@@ -0,0 +1,41 @@
|
||||
// /*
|
||||
// * 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
|
||||
Reference in New Issue
Block a user