\doxysection{Actions.\+hpp}
\hypertarget{Actions_8hpp_source}{}\label{Actions_8hpp_source}\index{/home/chr/devel/PhD/Environment/pub/PCBEnv/pcbenv/cxx/UI/Actions.hpp@{/home/chr/devel/PhD/Environment/pub/PCBEnv/pcbenv/cxx/UI/Actions.hpp}}

\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ }
\DoxyCodeLine{00002\ \textcolor{preprocessor}{\#ifndef\ GYM\_PCB\_UI\_ACTIONS\_H}}
\DoxyCodeLine{00003\ \textcolor{preprocessor}{\#define\ GYM\_PCB\_UI\_ACTIONS\_H}}
\DoxyCodeLine{00004\ }
\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ <future>}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#include\ <set>}}
\DoxyCodeLine{00007\ \textcolor{preprocessor}{\#include\ "{}UserSettings.hpp"{}}}
\DoxyCodeLine{00008\ \textcolor{preprocessor}{\#include\ "{}Object.hpp"{}}}
\DoxyCodeLine{00009\ \textcolor{preprocessor}{\#include\ "{}Track.hpp"{}}}
\DoxyCodeLine{00010\ }
\DoxyCodeLine{00011\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classUIApplication}{UIApplication}};}
\DoxyCodeLine{00012\ }
\DoxyCodeLine{00013\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classActionTab}{ActionTab}};}
\DoxyCodeLine{00014\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classComponent}{Component}};}
\DoxyCodeLine{00015\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classPin}{Pin}};}
\DoxyCodeLine{00016\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classNet}{Net}};}
\DoxyCodeLine{00017\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classConnection}{Connection}};}
\DoxyCodeLine{00018\ }
\DoxyCodeLine{00019\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classObjectPtrNameLessThan}{ObjectPtrNameLessThan}}}
\DoxyCodeLine{00020\ \{}
\DoxyCodeLine{00021\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00023\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{classObjectPtrNameLessThan_aef212628fbd8a1251c2642172da666bb}{operator()}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{classObject}{Object}}\ *L,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{classObject}{Object}}\ *R)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00024\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{00025\ \ \ \ \ \ \ \ \ assert(L\ \&\&\ R);}
\DoxyCodeLine{00026\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (L-\/>getParent()\ ==\ R-\/>getParent())}
\DoxyCodeLine{00027\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ L-\/>name()\ <\ R-\/>name();}
\DoxyCodeLine{00028\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (L-\/>getParent()\ \&\&\ R-\/>getParent())}
\DoxyCodeLine{00029\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ L-\/>getParent()-\/>name()\ <\ R-\/>getParent()-\/>name();}
\DoxyCodeLine{00030\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ !L-\/>getParent();}
\DoxyCodeLine{00031\ \ \ \ \ \}}
\DoxyCodeLine{00032\ \};}
\DoxyCodeLine{00033\ \textcolor{keyword}{using\ }ComSet\ =\ std::set<Component\ *,\ ObjectPtrNameLessThan>;\ }
\DoxyCodeLine{00034\ \textcolor{keyword}{using\ }PinSet\ =\ std::set<Pin\ *,\ ObjectPtrNameLessThan>;\ }
\DoxyCodeLine{00035\ }
\DoxyCodeLine{00036\ }
\DoxyCodeLine{00040\ }
\DoxyCodeLine{00042\ }
\DoxyCodeLine{00047\ \textcolor{keyword}{class\ }UIActions}
\DoxyCodeLine{00048\ \{}
\DoxyCodeLine{00049\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00050\ \ \ \ \ \textcolor{keyword}{constexpr}\ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ Real\ MinSegmentLenSq\ =\ 1.0;}
\DoxyCodeLine{00051\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00052\ \ \ \ \ UIActions(\mbox{\hyperlink{classUIApplication}{UIApplication}}\&);}
\DoxyCodeLine{00053\ \ \ \ \ \textcolor{keywordtype}{void}\ setUIElement(\mbox{\hyperlink{classActionTab}{ActionTab}}\ *);}
\DoxyCodeLine{00054\ \ \ \ \ \textcolor{keywordtype}{void}\ reset();}
\DoxyCodeLine{00055\ \ \ \ \ \mbox{\hyperlink{classConnection}{Connection}}\ *getConnection()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ mSelection.X;\ \}}
\DoxyCodeLine{00056\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ getSelectionSetC()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ mSelection.sets.C;\ \}}
\DoxyCodeLine{00057\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ getSelectionSetP()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ mSelection.sets.P;\ \}}
\DoxyCodeLine{00058\ \ \ \ \ \textcolor{keyword}{const}\ std::vector<Connection\ *>\ *getActiveConnections()\ \textcolor{keyword}{const};}
\DoxyCodeLine{00059\ \ \ \ \ \textcolor{keywordtype}{void}\ deselectAll();}
\DoxyCodeLine{00060\ \ \ \ \ \textcolor{keywordtype}{void}\ deselect(\textcolor{keyword}{const}\ \mbox{\hyperlink{classComponent}{Component}}\ *);}
\DoxyCodeLine{00061\ \ \ \ \ \textcolor{keywordtype}{void}\ deselect(\textcolor{keyword}{const}\ \mbox{\hyperlink{classPin}{Pin}}\ *);}
\DoxyCodeLine{00062\ \ \ \ \ \textcolor{keywordtype}{void}\ setSelection(\mbox{\hyperlink{classObject}{Object}}\ *);}
\DoxyCodeLine{00063\ \ \ \ \ \textcolor{keywordtype}{void}\ setSelection(\mbox{\hyperlink{classComponent}{Component}}\ *);}
\DoxyCodeLine{00064\ \ \ \ \ \textcolor{keywordtype}{void}\ setSelection(\mbox{\hyperlink{classPin}{Pin}}\ *);}
\DoxyCodeLine{00065\ \ \ \ \ \textcolor{keywordtype}{void}\ setSelection(\textcolor{keyword}{const}\ std::set<Object\ *>\&);}
\DoxyCodeLine{00066\ \ \ \ \ \textcolor{keywordtype}{void}\ setSelectionLayer(\textcolor{keywordtype}{char});\ \textcolor{comment}{//\ 'V'/'A'/'W'/'T'/'B'\ for\ view/all/working/top/bottom}}
\DoxyCodeLine{00067\ \ \ \ \ \textcolor{keywordtype}{char}\ getSelectionLayer()\ \textcolor{keyword}{const};}
\DoxyCodeLine{00068\ \ \ \ \ \textcolor{keywordtype}{void}\ setPreview(\textcolor{keywordtype}{bool});}
\DoxyCodeLine{00069\ \ \ \ \ \textcolor{keywordtype}{void}\ setPreviewTrack(\textcolor{keyword}{const}\ \mbox{\hyperlink{classTrack}{Track}}\&,\ \textcolor{keywordtype}{bool}\ legal);}
\DoxyCodeLine{00070\ \ \ \ \ \textcolor{keywordtype}{bool}\ isPreviewing()\ \textcolor{keyword}{const};}
\DoxyCodeLine{00071\ \ \ \ \ \textcolor{keywordtype}{bool}\ isPreviewReady()\ \textcolor{keyword}{const};}
\DoxyCodeLine{00072\ \ \ \ \ \textcolor{keywordtype}{bool}\ isPreviewStale()\ \textcolor{keyword}{const};}
\DoxyCodeLine{00073\ \ \ \ \ \textcolor{keywordtype}{bool}\ isPreviewTrackLegal()\ \textcolor{keyword}{const};}
\DoxyCodeLine{00074\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{classTrack}{Track}}\&\ getRoutePreview()\ \textcolor{keyword}{const};}
\DoxyCodeLine{00075\ \ \ \ \ \textcolor{keywordtype}{void}\ discardPreview();}
\DoxyCodeLine{00076\ \ \ \ \ \textcolor{keywordtype}{void}\ setTimeoutMS(uint64\_t);}
\DoxyCodeLine{00077\ \ \ \ \ \textcolor{keywordtype}{void}\ setActiveLayer(uint);}
\DoxyCodeLine{00078\ \ \ \ \ uint\ getActiveLayer()\ \textcolor{keyword}{const};}
\DoxyCodeLine{00079\ \ \ \ \ \textcolor{keywordtype}{void}\ setViaCost(\textcolor{keywordtype}{float});}
\DoxyCodeLine{00080\ \ \ \ \ \textcolor{keywordtype}{bool}\ autoroute(uint64\_t\ timeoutMS);}
\DoxyCodeLine{00081\ \ \ \ \ \textcolor{keywordtype}{bool}\ connect();}
\DoxyCodeLine{00082\ \ \ \ \ \textcolor{keywordtype}{bool}\ routeToPoint(\textcolor{keyword}{const}\ \mbox{\hyperlink{classPoint__25}{Point\_25}}\&);}
\DoxyCodeLine{00083\ \ \ \ \ \textcolor{keywordtype}{bool}\ addSegmentTo(\textcolor{keyword}{const}\ \mbox{\hyperlink{classPoint__25}{Point\_25}}\&);}
\DoxyCodeLine{00084\ \ \ \ \ \textcolor{keywordtype}{bool}\ routeTo(\textcolor{keyword}{const}\ Point\_2\&);}
\DoxyCodeLine{00085\ \ \ \ \ \textcolor{keywordtype}{void}\ setRouteMode(\textcolor{keywordtype}{char}\ mode);\ \textcolor{comment}{//\ 0,\ '*',\ or\ 's'\ for\ none,\ A*,\ segment}}
\DoxyCodeLine{00086\ \ \ \ \ \textcolor{keywordtype}{char}\ getRouteMode()\ \textcolor{keyword}{const};}
\DoxyCodeLine{00087\ \ \ \ \ \textcolor{keywordtype}{char}\ getLastRouteMode()\ \textcolor{keyword}{const};}
\DoxyCodeLine{00088\ \ \ \ \ \textcolor{keywordtype}{bool}\ routePreview(\textcolor{keyword}{const}\ Point\_2\&);}
\DoxyCodeLine{00089\ \ \ \ \ \textcolor{keywordtype}{bool}\ routeToPointPreview(\textcolor{keyword}{const}\ \mbox{\hyperlink{classPoint__25}{Point\_25}}\&);}
\DoxyCodeLine{00090\ \ \ \ \ \textcolor{keywordtype}{bool}\ addSegmentToPreview(\textcolor{keyword}{const}\ \mbox{\hyperlink{classPoint__25}{Point\_25}}\&);}
\DoxyCodeLine{00091\ \ \ \ \ \textcolor{keywordtype}{bool}\ unrouteConnection();}
\DoxyCodeLine{00092\ \ \ \ \ \textcolor{keywordtype}{bool}\ unrouteSegment();}
\DoxyCodeLine{00093\ \ \ \ \ \textcolor{keywordtype}{bool}\ unrouteSelection();}
\DoxyCodeLine{00094\ \ \ \ \ \textcolor{keywordtype}{void}\ updateIndicators();}
\DoxyCodeLine{00095\ \ \ \ \ \textcolor{keywordtype}{void}\ interrupt();}
\DoxyCodeLine{00096\ \ \ \ \ \textcolor{keywordtype}{void}\ setLockStepping(uint\ granularity);}
\DoxyCodeLine{00097\ \ \ \ \ \textcolor{keywordtype}{void}\ nextStep();}
\DoxyCodeLine{00098\ \ \ \ \ \textcolor{keywordtype}{void}\ setSelectionType(\textcolor{keywordtype}{char}\ c);\ \textcolor{comment}{//\ 'P'/'N'/'C'\ for\ pins/nets/components}}
\DoxyCodeLine{00099\ \ \ \ \ \textcolor{keywordtype}{char}\ getSelectionType()\ \textcolor{keyword}{const};}
\DoxyCodeLine{00100\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00101\ \ \ \ \ \mbox{\hyperlink{classActionTab}{ActionTab}}\ *mActionTab\{0\};}
\DoxyCodeLine{00102\ \ \ \ \ uint\ mActiveLayer\{0\};}
\DoxyCodeLine{00103\ \ \ \ \ \textcolor{keywordtype}{char}\ mRouteMode\{0\};}
\DoxyCodeLine{00104\ \ \ \ \ \textcolor{keywordtype}{char}\ mLastRouteMode\{\textcolor{charliteral}{'*'}\};}
\DoxyCodeLine{00105\ \ \ \ \ \textcolor{keywordtype}{bool}\ mSnapToGrid\{\textcolor{keyword}{true}\};}
\DoxyCodeLine{00106\ \ \ \ \ \textcolor{keywordtype}{bool}\ mPreview\{\textcolor{keyword}{false}\};}
\DoxyCodeLine{00107\ \ \ \ \ \textcolor{keywordtype}{bool}\ mPreviewReady\{\textcolor{keyword}{false}\};}
\DoxyCodeLine{00108\ \ \ \ \ \textcolor{keywordtype}{bool}\ mPreviewStale\{\textcolor{keyword}{false}\};}
\DoxyCodeLine{00109\ \ \ \ \ \textcolor{keywordtype}{bool}\ mPreviewLegal\{\textcolor{keyword}{false}\};}
\DoxyCodeLine{00110\ \ \ \ \ uint\ mLastPreviewPoint\{std::numeric\_limits<uint>::max()\};}
\DoxyCodeLine{00111\ \ \ \ \ \mbox{\hyperlink{classTrack}{Track}}\ mPreviewTrack\{\mbox{\hyperlink{classPoint__25}{Point\_25}}(0,0,0)\};}
\DoxyCodeLine{00112\ \ \ \ \ \textcolor{keyword}{struct\ }\{}
\DoxyCodeLine{00113\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classComponent}{Component}}\ *C\{0\};}
\DoxyCodeLine{00114\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classPin}{Pin}}\ *P[2]\{0,0\};}
\DoxyCodeLine{00115\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classNet}{Net}}\ *net\{0\};}
\DoxyCodeLine{00116\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classConnection}{Connection}}\ *X\{0\};}
\DoxyCodeLine{00117\ \ \ \ \ \ \ \ \ uint8\_t\ P0or1;}
\DoxyCodeLine{00118\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }\{}
\DoxyCodeLine{00119\ \ \ \ \ \ \ \ \ \ \ \ \ ComSet\ C;}
\DoxyCodeLine{00120\ \ \ \ \ \ \ \ \ \ \ \ \ PinSet\ P;}
\DoxyCodeLine{00121\ \ \ \ \ \ \ \ \ \}\ sets;}
\DoxyCodeLine{00122\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{char}\ type\{\textcolor{charliteral}{'P'}\};}
\DoxyCodeLine{00123\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{char}\ layer\{\textcolor{charliteral}{'V'}\};}
\DoxyCodeLine{00124\ \ \ \ \ \}\ mSelection;}
\DoxyCodeLine{00125\ \ \ \ \ \textcolor{keywordtype}{float}\ mViaCost\{1.0f\};}
\DoxyCodeLine{00126\ \ \ \ \ \textcolor{keywordtype}{void}\ setNetAndConnectionFromPins();}
\DoxyCodeLine{00127\ \ \ \ \ \textcolor{keywordtype}{void}\ resetLastPreviewPoint();}
\DoxyCodeLine{00128\ \ \ \ \ \textcolor{keywordtype}{void}\ setPreviewStale();}
\DoxyCodeLine{00129\ \ \ \ \ \textcolor{keywordtype}{void}\ setSelectionNoNotify(\mbox{\hyperlink{classPin}{Pin}}\ *);}
\DoxyCodeLine{00130\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00131\ \ \ \ \ \textcolor{keywordtype}{bool}\ \_autoroute(PinSet);}
\DoxyCodeLine{00132\ \ \ \ \ \textcolor{keywordtype}{bool}\ \_routeToPoint(\mbox{\hyperlink{classConnection}{Connection}}\ *,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{classPoint__25}{Point\_25}}\&,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{classPoint__25}{Point\_25}}\&);}
\DoxyCodeLine{00133\ \ \ \ \ \textcolor{keywordtype}{bool}\ \_addSegmentTo(\mbox{\hyperlink{classConnection}{Connection}}\ *,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{classPoint__25}{Point\_25}}\&,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{classPoint__25}{Point\_25}}\&);}
\DoxyCodeLine{00134\ \ \ \ \ \textcolor{keywordtype}{bool}\ \_routeToPointPreview(\mbox{\hyperlink{classConnection}{Connection}}\ *,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{classPoint__25}{Point\_25}}\&,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{classPoint__25}{Point\_25}}\&);}
\DoxyCodeLine{00135\ \ \ \ \ \textcolor{keywordtype}{bool}\ \_addSegmentToPreview(\mbox{\hyperlink{classConnection}{Connection}}\ *,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{classPoint__25}{Point\_25}}\&,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{classPoint__25}{Point\_25}}\&);}
\DoxyCodeLine{00136\ \ \ \ \ \textcolor{keywordtype}{bool}\ \_connect(\mbox{\hyperlink{classConnection}{Connection}}\ *);}
\DoxyCodeLine{00137\ }
\DoxyCodeLine{00138\ \ \ \ \ \mbox{\hyperlink{classPoint__25}{Point\_25}}\ snap(\textcolor{keyword}{const}\ \mbox{\hyperlink{classConnection}{Connection}}\ *,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{classPoint__25}{Point\_25}}\&);}
\DoxyCodeLine{00139\ \ \ \ \ \mbox{\hyperlink{classPoint__25}{Point\_25}}\ getRouterStartPoint()\ \textcolor{keyword}{const};}
\DoxyCodeLine{00140\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00141\ \ \ \ \ \mbox{\hyperlink{classUIApplication}{UIApplication}}\ \&UIA;}
\DoxyCodeLine{00142\ \ \ \ \ std::future<bool>\ mAsyncRV;}
\DoxyCodeLine{00143\ \ \ \ \ uint64\_t\ mTimeoutMS;}
\DoxyCodeLine{00144\ \};}
\DoxyCodeLine{00145\ }
\DoxyCodeLine{00146\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{void}\ UIActions::setUIElement(\mbox{\hyperlink{classActionTab}{ActionTab}}\ *A)}
\DoxyCodeLine{00147\ \{}
\DoxyCodeLine{00148\ \ \ \ \ mActionTab\ =\ A;}
\DoxyCodeLine{00149\ \}}
\DoxyCodeLine{00150\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{void}\ UIActions::setPreview(\textcolor{keywordtype}{bool}\ b)}
\DoxyCodeLine{00151\ \{}
\DoxyCodeLine{00152\ \ \ \ \ mPreview\ =\ b;}
\DoxyCodeLine{00153\ \ \ \ \ \textcolor{keywordflow}{if}\ (!b)}
\DoxyCodeLine{00154\ \ \ \ \ \ \ \ \ setPreviewStale();}
\DoxyCodeLine{00155\ \}}
\DoxyCodeLine{00156\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{void}\ UIActions::setPreviewTrack(\textcolor{keyword}{const}\ \mbox{\hyperlink{classTrack}{Track}}\ \&T,\ \textcolor{keywordtype}{bool}\ legal)}
\DoxyCodeLine{00157\ \{}
\DoxyCodeLine{00158\ \ \ \ \ mPreviewTrack\ =\ T;}
\DoxyCodeLine{00159\ \ \ \ \ mPreviewReady\ =\ \textcolor{keyword}{true};}
\DoxyCodeLine{00160\ \ \ \ \ mPreviewStale\ =\ \textcolor{keyword}{false};}
\DoxyCodeLine{00161\ \ \ \ \ mPreviewLegal\ =\ legal;}
\DoxyCodeLine{00162\ \}}
\DoxyCodeLine{00163\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{bool}\ UIActions::isPreviewing()\textcolor{keyword}{\ const}}
\DoxyCodeLine{00164\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00165\ \ \ \ \ \textcolor{keywordflow}{return}\ mPreview;}
\DoxyCodeLine{00166\ \}}
\DoxyCodeLine{00167\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{bool}\ UIActions::isPreviewReady()\textcolor{keyword}{\ const}}
\DoxyCodeLine{00168\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00169\ \ \ \ \ \textcolor{keywordflow}{return}\ mPreviewReady;}
\DoxyCodeLine{00170\ \}}
\DoxyCodeLine{00171\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{bool}\ UIActions::isPreviewStale()\textcolor{keyword}{\ const}}
\DoxyCodeLine{00172\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00173\ \ \ \ \ \textcolor{keywordflow}{return}\ mPreviewStale;}
\DoxyCodeLine{00174\ \}}
\DoxyCodeLine{00175\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{bool}\ UIActions::isPreviewTrackLegal()\textcolor{keyword}{\ const}}
\DoxyCodeLine{00176\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00177\ \ \ \ \ \textcolor{keywordflow}{return}\ mPreviewLegal;}
\DoxyCodeLine{00178\ \}}
\DoxyCodeLine{00179\ \textcolor{keyword}{inline}\ \textcolor{keyword}{const}\ \mbox{\hyperlink{classTrack}{Track}}\&\ UIActions::getRoutePreview()\textcolor{keyword}{\ const}}
\DoxyCodeLine{00180\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00181\ \ \ \ \ \textcolor{keywordflow}{return}\ mPreviewTrack;}
\DoxyCodeLine{00182\ \}}
\DoxyCodeLine{00183\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{void}\ UIActions::discardPreview()}
\DoxyCodeLine{00184\ \{}
\DoxyCodeLine{00185\ \ \ \ \ mPreviewTrack.clear();}
\DoxyCodeLine{00186\ \ \ \ \ mPreviewReady\ =\ \textcolor{keyword}{false};}
\DoxyCodeLine{00187\ \}}
\DoxyCodeLine{00188\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{void}\ UIActions::setTimeoutMS(uint64\_t\ ms)}
\DoxyCodeLine{00189\ \{}
\DoxyCodeLine{00190\ \ \ \ \ mTimeoutMS\ =\ ms;}
\DoxyCodeLine{00191\ \}}
\DoxyCodeLine{00192\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{char}\ UIActions::getRouteMode()\textcolor{keyword}{\ const}}
\DoxyCodeLine{00193\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00194\ \ \ \ \ \textcolor{keywordflow}{return}\ mRouteMode;}
\DoxyCodeLine{00195\ \}}
\DoxyCodeLine{00196\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{char}\ UIActions::getLastRouteMode()\textcolor{keyword}{\ const}}
\DoxyCodeLine{00197\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00198\ \ \ \ \ \textcolor{keywordflow}{return}\ mLastRouteMode;}
\DoxyCodeLine{00199\ \}}
\DoxyCodeLine{00200\ \textcolor{keyword}{inline}\ uint\ UIActions::getActiveLayer()\textcolor{keyword}{\ const}}
\DoxyCodeLine{00201\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00202\ \ \ \ \ \textcolor{keywordflow}{return}\ mActiveLayer;}
\DoxyCodeLine{00203\ \}}
\DoxyCodeLine{00204\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{void}\ UIActions::setSelectionLayer(\textcolor{keywordtype}{char}\ c)}
\DoxyCodeLine{00205\ \{}
\DoxyCodeLine{00206\ \ \ \ \ assert(c\ ==\ \textcolor{charliteral}{'A'}\ ||\ c\ ==\ \textcolor{charliteral}{'V'}\ ||\ c\ ==\ \textcolor{charliteral}{'W'}\ ||\ c\ ==\ \textcolor{charliteral}{'T'}\ ||\ c\ ==\ \textcolor{charliteral}{'B'});}
\DoxyCodeLine{00207\ \ \ \ \ mSelection.layer\ =\ c;}
\DoxyCodeLine{00208\ \}}
\DoxyCodeLine{00209\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{char}\ UIActions::getSelectionLayer()\textcolor{keyword}{\ const}}
\DoxyCodeLine{00210\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00211\ \ \ \ \ \textcolor{keywordflow}{return}\ mSelection.layer;}
\DoxyCodeLine{00212\ \}}
\DoxyCodeLine{00213\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{void}\ UIActions::setSelectionType(\textcolor{keywordtype}{char}\ c)}
\DoxyCodeLine{00214\ \{}
\DoxyCodeLine{00215\ \ \ \ \ assert(c\ ==\ \textcolor{charliteral}{'P'}\ ||\ c\ ==\ \textcolor{charliteral}{'N'}\ ||\ c\ ==\ \textcolor{charliteral}{'C'});}
\DoxyCodeLine{00216\ \ \ \ \ mSelection.type\ =\ c;}
\DoxyCodeLine{00217\ \}}
\DoxyCodeLine{00218\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{char}\ UIActions::getSelectionType()\textcolor{keyword}{\ const}}
\DoxyCodeLine{00219\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00220\ \ \ \ \ \textcolor{keywordflow}{return}\ mSelection.type;}
\DoxyCodeLine{00221\ \}}
\DoxyCodeLine{00222\ }
\DoxyCodeLine{00223\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{void}\ UIActions::resetLastPreviewPoint()}
\DoxyCodeLine{00224\ \{}
\DoxyCodeLine{00225\ \ \ \ \ mLastPreviewPoint\ =\ std::numeric\_limits<uint>::max();}
\DoxyCodeLine{00226\ \}}
\DoxyCodeLine{00227\ }
\DoxyCodeLine{00228\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{void}\ UIActions::setPreviewStale()}
\DoxyCodeLine{00229\ \{}
\DoxyCodeLine{00230\ \ \ \ \ mPreviewStale\ =\ \textcolor{keyword}{true};}
\DoxyCodeLine{00231\ \ \ \ \ resetLastPreviewPoint();}
\DoxyCodeLine{00232\ \}}
\DoxyCodeLine{00233\ }
\DoxyCodeLine{00234\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{void}\ UIActions::setViaCost(\textcolor{keywordtype}{float}\ v)}
\DoxyCodeLine{00235\ \{}
\DoxyCodeLine{00236\ \ \ \ \ UserSettings::edit().AStarViaCostFactor\ =\ mViaCost\ =\ v;}
\DoxyCodeLine{00237\ \}}
\DoxyCodeLine{00238\ }
\DoxyCodeLine{00239\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ GYM\_PCB\_UI\_ACTIONS\_H}}

\end{DoxyCode}
