//
// Written by John A deLaubenfels, https://www.adaptune.com/steg.htm .
// Permission granted to use freely in any non-fraudulent way.
//


#pragma once

#include "afxdialogex.h"
#include <string>
#include <vector>
#include "globs.h"
#include "jgrlil.h"
#include "jarq.h"
#include "stufpic.h"


// EmbedDlg dialog

class EmbedDlg : public CDialogEx
{
   DECLARE_DYNAMIC(EmbedDlg)

public:
   EmbedDlg(CWnd* pParent = nullptr);   // standard constructor
   virtual ~EmbedDlg();

// Dialog Data
#ifdef AFX_DESIGN_TIME
   enum { IDD = IDD_EMBED_PIC };
#endif

protected:
   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

   DECLARE_MESSAGE_MAP()
public:
   BOOL PreTranslateMessage(MSG* pMsg);
   afx_msg void OnKillfocusEdtWrapper();
   afx_msg void OnKillfocusEdtEmbeds();
   afx_msg void OnKillfocusEdtOutfil();
   afx_msg void OnKillfocusEdtOutsiz();
   afx_msg void OnKillfocusEdtOutwid();
   afx_msg void OnKillfocusEdtOuthgt();
   afx_msg void OnKillfocusEdtDifficulty();
   CEdit m_cEdt_wrapper;
   CEdit m_cEdt_embeds;
   CEdit m_cEdt_outfil;
   CEdit m_cEdt_outsiz;
   CEdit m_cEdt_outwid;
   CEdit m_cEdt_outhgt;
   CEdit m_cEdt_difficulty;
   std::string m_ssWrapper;
   std::string m_ssEmbeds;
   std::string m_ssOutfil;
   std::string m_ssOutsiz;
   std::string m_ssOutwid;
   std::string m_ssOuthgt;
   std::string m_ssDifficulty;
   std::string m_ssPathName;
   std::string m_ssFileName;
   std::string m_ssTypedMessage;
   int    m_iOutsiz;
   int    m_iOutwid;
   int    m_iOuthgt;
   double m_difficulty;
   std::vector<std::string> m_vcSsEmbedFiles;
   jgrLil      m_jgrSrc;
   jgrLil      m_jgrOut;
   JarqAnch    m_myJrq;
   std::vector<unsigned char> m_vcToStuff;
   std::vector<unsigned long long> m_passwordSeedVector;
   afx_msg void OnBnClickedButnWrapper();
   afx_msg void OnClickedButnEmbeds();
   afx_msg void OnClickedButnOutfil();
   afx_msg void OnClickedButnGo();
   afx_msg void OnSetfocusButnGo();
   afx_msg void OnKillfocusButnGo();
   int m_enterAction;
   afx_msg void OnSetfocusEdtWrapper();
   afx_msg void OnSetfocusEdtEmbeds();
   afx_msg void OnSetfocusEdtOutfil();
   afx_msg void OnSetfocusEdtOutsiz();
   afx_msg void OnSetfocusEdtOutwid();
   afx_msg void OnSetfocusEdtOuthgt();
   afx_msg void OnSetfocusEdtDifficulty();
   void applyFourGuys();
   void recalcStuffVec(bool bDoFull);
   void calcSliderRange();
   void calcWrap();
   void hideChoices(const char *pcMsg);
   void showChoices(const char *pcMsg);
   virtual BOOL OnInitDialog();
   bool  m_bDidEmbedListThing;
   bool  m_bDidWrapThing;
   CEdit m_cEdt_available;
   CEdit m_cEdt_required;
   int   m_bytesRequired;
   int   m_bytesAvailable;
   int   m_iHii;
   CStatic m_stcHappy;
   stegInfo *m_pCommonInfo;
   afx_msg void OnClickedButnTypeme();
   CSliderCtrl m_slySlider1;
   afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
   afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
   twoPairs m_twoGuys;
   MT64     m_anMT;
   // std::vector<onePair> m_vcBackRatios;
   virtual void OnOK();
   virtual void OnCancel();
   CButton m_chkScatter;
   afx_msg void OnClickedChkScatter();
};
