2020-07-24 07:26 PM - last edited on 2021-09-15 10:31 AM by Noemi Balogh
2020-07-26 09:17 PM
juliencuadra wrote:Yes, it's possible.
- Is it possible to make an add-on palette dockable like the default archicad palettes to integrate it nicely in the UI.
Palette (GSResModule resModule, short resId, GSResModule dialIconResModule, const GS::Guid& guid);And do not forget to register your palette as a modeless window by using ACAPI_RegisterModelessWindow function.
static const GS::Guid paletteGuid ("{ED852AD6-15E7-4812-AD88-FA1682E5D33C}"); ... MyPalette::MyPalette () : DG::Palette (ACAPI_GetOwnResModule (), MyPaletteResId, ACAPI_GetOwnResModule (), paletteGuid), ... { ... } GSErrCode __ACENV_CALL PaletteControlCallBack (Int32, API_PaletteMessageID messageID, GS::IntPtr param) { switch (messageID) { case APIPalMsg_OpenPalette: if (!HasInstance ()) CreateInstance (); GetInstance ().Show (); break; case APIPalMsg_ClosePalette: if (!HasInstance ()) break; GetInstance ().Hide (); break; case APIPalMsg_HidePalette_Begin: if (HasInstance () && GetInstance ().IsVisible ()) GetInstance ().Hide (); break; case APIPalMsg_HidePalette_End: if (HasInstance () && !GetInstance ().IsVisible ()) GetInstance ().Show (); break; case APIPalMsg_DisableItems_Begin: if (HasInstance () && GetInstance ().IsVisible ()) GetInstance ().DisableItems (); break; case APIPalMsg_DisableItems_End: if (HasInstance () && GetInstance ().IsVisible ()) GetInstance ().EnableItems (); break; case APIPalMsg_IsPaletteVisible: *(reinterpret_cast<bool*> (param)) = HasInstance () && GetInstance ().IsVisible (); break; default: break; } return NoError; } GSErrCode __ACENV_CALL Initialize (void) { GSErrCode err = ACAPI_RegisterModelessWindow ( GS::GenerateHashValue (paletteGuid), PaletteControlCallBack, API_PalEnabled_FloorPlan + API_PalEnabled_Section + API_PalEnabled_Elevation + API_PalEnabled_InteriorElevation + API_PalEnabled_3D + API_PalEnabled_Detail + API_PalEnabled_Worksheet + API_PalEnabled_Layout + API_PalEnabled_DocumentFrom3D, GSGuid2APIGuid (paletteGuid)); ... return err; }
juliencuadra wrote:Yes, it's possible.
- The API documentation only mentions palettes, not toolbars. Is it possible to create toolbars, also dockable like the archicad ones ?
'GDLG' 32500 Palette | topCaption | close | noGrow 0 0 450 150 "My Toolbar" { ... }
2020-07-26 10:44 PM
2020-08-03 04:59 PM