@@ -220,6 +220,35 @@ class IGetCompTextCommandInterface : public IResultCommandInterface<dnyString> {
220220
221221} g_oGetCompTextCommandInterface;
222222
223+ class IGetCompHandleCommandInterface : public IResultCommandInterface <dnyInteger> {
224+ public:
225+ IGetCompHandleCommandInterface () {}
226+
227+ virtual bool CommandCallback (void * pCodeContext, void * pInterfaceObject)
228+ {
229+ ICodeContext* pContext = (ICodeContext*)pCodeContext;
230+
231+ pContext->ReplaceAllVariables (pInterfaceObject);
232+
233+ dnyWinForms::CForm* pForm = dnyWinForms::FindForm (pContext->GetPartString (1 ));
234+ if (!pForm)
235+ return false ;
236+
237+ if (pContext->GetPartCount () > 3 ) {
238+ dnyWinForms::IBaseComponent* pBaseComp = pForm->FindComponent (pContext->GetPartString (2 ), pContext->GetPartString (3 ));
239+ if (!pBaseComp)
240+ return false ;
241+
242+ IResultCommandInterface<dnyInteger>::SetResult ((dnyInteger)pBaseComp->GetHandle ());
243+ } else {
244+ IResultCommandInterface<dnyInteger>::SetResult ((dnyInteger)pForm->GetHandle ());
245+ }
246+
247+ return true ;
248+ }
249+
250+ } g_oGetCompHandleCommandInterface;
251+
223252class ISetCompFontCommandInterface : public IVoidCommandInterface {
224253public:
225254 ISetCompFontCommandInterface () {}
@@ -243,6 +272,33 @@ class ISetCompFontCommandInterface : public IVoidCommandInterface {
243272
244273} g_oSetCompFontCommandInterface;
245274
275+ class ISetCompStyleCommandInterface : public IResultCommandInterface <dnyInteger> {
276+ public:
277+ ISetCompStyleCommandInterface () {}
278+
279+ virtual bool CommandCallback (void * pCodeContext, void * pInterfaceObject)
280+ {
281+ ICodeContext* pContext = (ICodeContext*)pCodeContext;
282+
283+ pContext->ReplaceAllVariables (pInterfaceObject);
284+
285+ dnyWinForms::CForm* pForm = dnyWinForms::FindForm (pContext->GetPartString (1 ));
286+ if (!pForm)
287+ return false ;
288+
289+ dnyWinForms::IBaseComponent* pBaseComp = pForm->FindComponent (pContext->GetPartString (2 ), pContext->GetPartString (3 ));
290+ if (!pBaseComp)
291+ return false ;
292+
293+ dnyInteger iOldStyle = (dnyInteger)pBaseComp->SetStyle (pContext->GetPartInt (4 ), true );
294+
295+ this ->SetResult (iOldStyle);
296+
297+ return true ;
298+ }
299+
300+ } g_oSetCompStyleCommandInterface;
301+
246302class IStartCompGroupCommandInterface : public IVoidCommandInterface {
247303public:
248304 IStartCompGroupCommandInterface () {}
@@ -374,6 +430,31 @@ class ISpawnTextboxCommandInterface : public IVoidCommandInterface {
374430
375431} g_oSpawnTextboxCommandInterface;
376432
433+ class ISetTextboxMultilineCommandInterface : public IVoidCommandInterface {
434+ public:
435+ ISetTextboxMultilineCommandInterface () {}
436+
437+ virtual bool CommandCallback (void * pCodeContext, void * pInterfaceObject)
438+ {
439+ ICodeContext* pContext = (ICodeContext*)pCodeContext;
440+
441+ pContext->ReplaceAllVariables (pInterfaceObject);
442+
443+ dnyWinForms::CForm* pForm = dnyWinForms::FindForm (pContext->GetPartString (1 ));
444+ if (!pForm)
445+ return false ;
446+
447+ dnyWinForms::CTextbox* pTextbox = (dnyWinForms::CTextbox*)pForm->FindComponent (L" CTextbox" , pContext->GetPartString (2 ));
448+ if (!pTextbox)
449+ return false ;
450+
451+ pTextbox->SetMultiline ();
452+
453+ return true ;
454+ }
455+
456+ } g_oSetTextboxMultilineCommandInterface;
457+
377458class IGetTextboxTextCommandInterface : public IResultCommandInterface <dnyString> {
378459public:
379460 IGetTextboxTextCommandInterface () {}
@@ -422,6 +503,29 @@ class ISetTextboxTextCommandInterface : public IVoidCommandInterface {
422503
423504} g_oSetTextboxTextCommandInterface;
424505
506+ class IAppendTextboxTextCommandInterface : public IVoidCommandInterface {
507+ public:
508+ IAppendTextboxTextCommandInterface () {}
509+
510+ virtual bool CommandCallback (void * pCodeContext, void * pInterfaceObject)
511+ {
512+ ICodeContext* pContext = (ICodeContext*)pCodeContext;
513+
514+ pContext->ReplaceAllVariables (pInterfaceObject);
515+
516+ dnyWinForms::CForm* pForm = dnyWinForms::FindForm (pContext->GetPartString (1 ));
517+ if (!pForm)
518+ return false ;
519+
520+ dnyWinForms::CTextbox* pTextbox = (dnyWinForms::CTextbox*)pForm->FindComponent (L" CTextbox" , pContext->GetPartString (2 ));
521+ if (!pTextbox)
522+ return false ;
523+
524+ return pTextbox->AppendText (pContext->GetPartString (3 ));
525+ }
526+
527+ } g_oAppendTextboxTextCommandInterface;
528+
425529class ISpawnCheckboxCommandInterface : public IVoidCommandInterface {
426530public:
427531 ISpawnCheckboxCommandInterface () {}
@@ -1441,14 +1545,18 @@ bool dnyAS_PluginLoad(dnyVersionInfo version, IShellPluginAPI* pInterfaceData, p
14411545 g_pShellPluginAPI->Cmd_RegisterCommand (L" wnd_setcomptext" , &g_oSetCompTextCommandInterface, CT_VOID);
14421546 g_pShellPluginAPI->Cmd_RegisterCommand (L" wnd_setcompfont" , &g_oSetCompFontCommandInterface, CT_VOID);
14431547 g_pShellPluginAPI->Cmd_RegisterCommand (L" wnd_getcomptext" , &g_oGetCompTextCommandInterface, CT_STRING);
1548+ g_pShellPluginAPI->Cmd_RegisterCommand (L" wnd_getcomphandle" , &g_oGetCompHandleCommandInterface, CT_INT);
1549+ g_pShellPluginAPI->Cmd_RegisterCommand (L" wnd_setcompstyle" , &g_oSetCompStyleCommandInterface, CT_INT);
14441550 g_pShellPluginAPI->Cmd_RegisterCommand (L" wnd_startcompgroup" , &g_oStartCompGroupCommandInterface, CT_VOID);
14451551 g_pShellPluginAPI->Cmd_RegisterCommand (L" wnd_setcompgroup" , &g_oSetCompGroupCommandInterface, CT_VOID);
14461552 g_pShellPluginAPI->Cmd_RegisterCommand (L" wnd_clearcompgroup" , &g_oClearCompGroupCommandInterface, CT_VOID);
14471553 g_pShellPluginAPI->Cmd_RegisterCommand (L" wnd_spawnlabel" , &g_oSpawnLabelCommandInterface, CT_VOID);
14481554 g_pShellPluginAPI->Cmd_RegisterCommand (L" wnd_spawnbutton" , &g_oSpawnButtonCommandInterface, CT_VOID);
14491555 g_pShellPluginAPI->Cmd_RegisterCommand (L" wnd_spawntextbox" , &g_oSpawnTextboxCommandInterface, CT_VOID);
1556+ g_pShellPluginAPI->Cmd_RegisterCommand (L" wnd_settextboxmultiline" , &g_oSetTextboxMultilineCommandInterface, CT_VOID);
14501557 g_pShellPluginAPI->Cmd_RegisterCommand (L" wnd_gettextboxtext" , &g_oGetTextboxTextCommandInterface, CT_STRING);
14511558 g_pShellPluginAPI->Cmd_RegisterCommand (L" wnd_settextboxtext" , &g_oSetTextboxTextCommandInterface, CT_VOID);
1559+ g_pShellPluginAPI->Cmd_RegisterCommand (L" wnd_appendtextboxtext" , &g_oAppendTextboxTextCommandInterface, CT_VOID);
14521560 g_pShellPluginAPI->Cmd_RegisterCommand (L" wnd_spawncheckbox" , &g_oSpawnCheckboxCommandInterface, CT_VOID);
14531561 g_pShellPluginAPI->Cmd_RegisterCommand (L" wnd_cbischecked" , &g_oCbGetValueCommandInterface, CT_BOOL);
14541562 g_pShellPluginAPI->Cmd_RegisterCommand (L" wnd_cbsetvalue" , &g_oCbSetValueCommandInterface, CT_VOID);
@@ -1525,14 +1633,18 @@ void dnyAS_PluginUnload(void)
15251633 g_pShellPluginAPI->Cmd_UnregisterCommand (L" wnd_setcomptext" );
15261634 g_pShellPluginAPI->Cmd_UnregisterCommand (L" wnd_setcompfont" );
15271635 g_pShellPluginAPI->Cmd_UnregisterCommand (L" wnd_getcomptext" );
1636+ g_pShellPluginAPI->Cmd_UnregisterCommand (L" wnd_getcomphandle" );
1637+ g_pShellPluginAPI->Cmd_UnregisterCommand (L" wnd_setcompstyle" );
15281638 g_pShellPluginAPI->Cmd_UnregisterCommand (L" wnd_startcompgroup" );
15291639 g_pShellPluginAPI->Cmd_UnregisterCommand (L" wnd_setcompgroup" );
15301640 g_pShellPluginAPI->Cmd_UnregisterCommand (L" wnd_clearcompgroup" );
15311641 g_pShellPluginAPI->Cmd_UnregisterCommand (L" wnd_spawnlabel" );
15321642 g_pShellPluginAPI->Cmd_UnregisterCommand (L" wnd_spawnbutton" );
15331643 g_pShellPluginAPI->Cmd_UnregisterCommand (L" wnd_spawntextbox" );
1644+ g_pShellPluginAPI->Cmd_UnregisterCommand (L" wnd_settextboxmultiline" );
15341645 g_pShellPluginAPI->Cmd_UnregisterCommand (L" wnd_gettextboxtext" );
15351646 g_pShellPluginAPI->Cmd_UnregisterCommand (L" wnd_settextboxtext" );
1647+ g_pShellPluginAPI->Cmd_UnregisterCommand (L" wnd_appendtextboxtext" );
15361648 g_pShellPluginAPI->Cmd_UnregisterCommand (L" wnd_spawncheckbox" );
15371649 g_pShellPluginAPI->Cmd_UnregisterCommand (L" wnd_cbischecked" );
15381650 g_pShellPluginAPI->Cmd_UnregisterCommand (L" wnd_cbsetvalue" );
0 commit comments