\hypertarget{calc_hsm_8h}{
\section{calc/calcHsm.h File Reference}
\label{calc_hsm_8h}\index{calc/calcHsm.h@{calc/calcHsm.h}}
}
{\tt \#include $<$iup.h$>$}\par
{\tt \#include \char`\"{}simplehsm.h\char`\"{}}\par
\subsection*{Enumerations}
\begin{CompactItemize}
\item 
enum \{ \par
\hyperlink{calc_hsm_8h_06fc87d81c62e9abb8790b6e5713c55bd5fc88e9d290434627a66c58b1432113}{SIG\_\-CLEAR} =  SIG\_\-USER, 
\hyperlink{calc_hsm_8h_06fc87d81c62e9abb8790b6e5713c55bd1e9b3275e0ba4f8aee07424ab570b0b}{SIG\_\-CLEARENTRY}, 
\hyperlink{calc_hsm_8h_06fc87d81c62e9abb8790b6e5713c55b855b19ca84f4ff8cde935ce0894768ec}{SIG\_\-DIGIT1\_\-9}, 
\hyperlink{calc_hsm_8h_06fc87d81c62e9abb8790b6e5713c55b2afb4ca79452e15a6da6a46878677866}{SIG\_\-DIGIT0}, 
\par
\hyperlink{calc_hsm_8h_06fc87d81c62e9abb8790b6e5713c55b34c6e85a8b8e02e1e54078413db566b0}{SIG\_\-OPERATOR}, 
\hyperlink{calc_hsm_8h_06fc87d81c62e9abb8790b6e5713c55b1d9db224e63f9274047e56a109e56bc4}{SIG\_\-POINT}, 
\hyperlink{calc_hsm_8h_06fc87d81c62e9abb8790b6e5713c55b1821db83bef3ebae2fe8018423fba4b1}{SIG\_\-EQUALS}
 \}
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{calc_hsm_8h_85c95952b3efd8972f87cf0e29a3dbb7}{calchsm\_\-init} (Ihandle $\ast$tb)
\item 
void \hyperlink{calc_hsm_8h_d07dc08edc5dfd4eb925381bc6f870f4}{calchsm\_\-signal} (int signal, void $\ast$param)
\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
\hypertarget{calc_hsm_8h_56eb2e4fa21fc0fe4b79c3130cc6e870}{
enum  \{ ... \}  \textbf{calc\_\-signals\_\-t}}
\label{calc_hsm_8h_56eb2e4fa21fc0fe4b79c3130cc6e870}

\end{CompactItemize}


\label{_details}
\hypertarget{_details}{}
\subsection{Detailed Description}
\begin{Desc}
\item[Author:]Daniel Newton $<$\href{mailto:djpnewton@gmail.com}{\tt djpnewton@gmail.com}$>$ \end{Desc}
\begin{Desc}
\item[Version:]1.0\end{Desc}
\hypertarget{simplehsm_8h_LICENSE}{}\subsection{LICENSE}\label{simplehsm_8h_LICENSE}
Copyright (c) 2009 Daniel Newton

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \char`\"{}Software\char`\"{}), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED \char`\"{}AS IS\char`\"{}, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\hypertarget{simplehsm_8h_DESCRIPTION}{}\subsection{DESCRIPTION}\label{simplehsm_8h_DESCRIPTION}
The calc state machine header 

\subsection{Enumeration Type Documentation}
\hypertarget{calc_hsm_8h_06fc87d81c62e9abb8790b6e5713c55b}{
\subsubsection[{"@0}]{\setlength{\rightskip}{0pt plus 5cm}anonymous enum}}
\label{calc_hsm_8h_06fc87d81c62e9abb8790b6e5713c55b}


\begin{Desc}
\item[Enumerator: ]\par
\begin{description}
\index{SIG\_\-CLEAR@{SIG\_\-CLEAR}!calcHsm.h@{calcHsm.h}}\index{calcHsm.h@{calcHsm.h}!SIG\_\-CLEAR@{SIG\_\-CLEAR}}\item[{\em 
\hypertarget{calc_hsm_8h_06fc87d81c62e9abb8790b6e5713c55bd5fc88e9d290434627a66c58b1432113}{
SIG\_\-CLEAR}
\label{calc_hsm_8h_06fc87d81c62e9abb8790b6e5713c55bd5fc88e9d290434627a66c58b1432113}
}]Clear signal, user has pressed the clear button \index{SIG\_\-CLEARENTRY@{SIG\_\-CLEARENTRY}!calcHsm.h@{calcHsm.h}}\index{calcHsm.h@{calcHsm.h}!SIG\_\-CLEARENTRY@{SIG\_\-CLEARENTRY}}\item[{\em 
\hypertarget{calc_hsm_8h_06fc87d81c62e9abb8790b6e5713c55bd1e9b3275e0ba4f8aee07424ab570b0b}{
SIG\_\-CLEARENTRY}
\label{calc_hsm_8h_06fc87d81c62e9abb8790b6e5713c55bd1e9b3275e0ba4f8aee07424ab570b0b}
}]Clear Entry signal, user has pressed the clear entry button \index{SIG\_\-DIGIT1\_\-9@{SIG\_\-DIGIT1\_\-9}!calcHsm.h@{calcHsm.h}}\index{calcHsm.h@{calcHsm.h}!SIG\_\-DIGIT1\_\-9@{SIG\_\-DIGIT1\_\-9}}\item[{\em 
\hypertarget{calc_hsm_8h_06fc87d81c62e9abb8790b6e5713c55b855b19ca84f4ff8cde935ce0894768ec}{
SIG\_\-DIGIT1\_\-9}
\label{calc_hsm_8h_06fc87d81c62e9abb8790b6e5713c55b855b19ca84f4ff8cde935ce0894768ec}
}]Digit 1-9 signal, user has pressed a digit button ranging from 1 to 9 \index{SIG\_\-DIGIT0@{SIG\_\-DIGIT0}!calcHsm.h@{calcHsm.h}}\index{calcHsm.h@{calcHsm.h}!SIG\_\-DIGIT0@{SIG\_\-DIGIT0}}\item[{\em 
\hypertarget{calc_hsm_8h_06fc87d81c62e9abb8790b6e5713c55b2afb4ca79452e15a6da6a46878677866}{
SIG\_\-DIGIT0}
\label{calc_hsm_8h_06fc87d81c62e9abb8790b6e5713c55b2afb4ca79452e15a6da6a46878677866}
}]Digit 0 signal, user has pressed the 0 button \index{SIG\_\-OPERATOR@{SIG\_\-OPERATOR}!calcHsm.h@{calcHsm.h}}\index{calcHsm.h@{calcHsm.h}!SIG\_\-OPERATOR@{SIG\_\-OPERATOR}}\item[{\em 
\hypertarget{calc_hsm_8h_06fc87d81c62e9abb8790b6e5713c55b34c6e85a8b8e02e1e54078413db566b0}{
SIG\_\-OPERATOR}
\label{calc_hsm_8h_06fc87d81c62e9abb8790b6e5713c55b34c6e85a8b8e02e1e54078413db566b0}
}]Operator signal, user has pressed an operator (add, subtract, multiply, divide) button \index{SIG\_\-POINT@{SIG\_\-POINT}!calcHsm.h@{calcHsm.h}}\index{calcHsm.h@{calcHsm.h}!SIG\_\-POINT@{SIG\_\-POINT}}\item[{\em 
\hypertarget{calc_hsm_8h_06fc87d81c62e9abb8790b6e5713c55b1d9db224e63f9274047e56a109e56bc4}{
SIG\_\-POINT}
\label{calc_hsm_8h_06fc87d81c62e9abb8790b6e5713c55b1d9db224e63f9274047e56a109e56bc4}
}]Point signal, user has pressed the decimal point button \index{SIG\_\-EQUALS@{SIG\_\-EQUALS}!calcHsm.h@{calcHsm.h}}\index{calcHsm.h@{calcHsm.h}!SIG\_\-EQUALS@{SIG\_\-EQUALS}}\item[{\em 
\hypertarget{calc_hsm_8h_06fc87d81c62e9abb8790b6e5713c55b1821db83bef3ebae2fe8018423fba4b1}{
SIG\_\-EQUALS}
\label{calc_hsm_8h_06fc87d81c62e9abb8790b6e5713c55b1821db83bef3ebae2fe8018423fba4b1}
}]Equals signal, user has pressed the equals button \end{description}
\end{Desc}



\subsection{Function Documentation}
\hypertarget{calc_hsm_8h_85c95952b3efd8972f87cf0e29a3dbb7}{
\index{calcHsm.h@{calcHsm.h}!calchsm\_\-init@{calchsm\_\-init}}
\index{calchsm\_\-init@{calchsm\_\-init}!calcHsm.h@{calcHsm.h}}
\subsubsection[{calchsm\_\-init}]{\setlength{\rightskip}{0pt plus 5cm}void calchsm\_\-init (Ihandle $\ast$ {\em tb})}}
\label{calc_hsm_8h_85c95952b3efd8972f87cf0e29a3dbb7}


Initialize the calc state machine

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em tb}]The IUP textbox widget that the calc state machine will use \end{description}
\end{Desc}
\hypertarget{calc_hsm_8h_d07dc08edc5dfd4eb925381bc6f870f4}{
\index{calcHsm.h@{calcHsm.h}!calchsm\_\-signal@{calchsm\_\-signal}}
\index{calchsm\_\-signal@{calchsm\_\-signal}!calcHsm.h@{calcHsm.h}}
\subsubsection[{calchsm\_\-signal}]{\setlength{\rightskip}{0pt plus 5cm}void calchsm\_\-signal (int {\em signal}, \/  void $\ast$ {\em param})}}
\label{calc_hsm_8h_d07dc08edc5dfd4eb925381bc6f870f4}


Send a signal to the calc state machine

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em signal}]The signal to send \item[{\em param}]An optional parameter \end{description}
\end{Desc}
