├── .gitignore ├── CMakeLists.txt ├── ExtendCtrls ├── CMakeLists.txt ├── SCtrlsRegister.cpp ├── SCtrlsRegister.h ├── controls.extend │ ├── ExtendCtrls.cpp │ ├── ExtendCtrls.h │ ├── ExtendSkins.cpp │ ├── ExtendSkins.h │ ├── FileHelper.h │ ├── SAniWindow.cpp │ ├── SAniWindow.h │ ├── SAnimImg.cpp │ ├── SAnimImg.h │ ├── SAnimator.h │ ├── SButtonEx.cpp │ ├── SButtonEx.h │ ├── SByteArray.cpp │ ├── SByteArray.h │ ├── SCalendar2.cpp │ ├── SCalendar2.h │ ├── SChatEdit.cpp │ ├── SChatEdit.h │ ├── SCheckBox2.cpp │ ├── SCheckBox2.h │ ├── SChromeTabCtrl.cpp │ ├── SChromeTabCtrl.h │ ├── SComboBoxEx.cpp │ ├── SComboBoxEx.h │ ├── SDateTimeEdit.cpp │ ├── SDateTimeEdit.h │ ├── SFadeFrame.cpp │ ├── SFadeFrame.h │ ├── SFreeMoveWindow.cpp │ ├── SFreeMoveWindow.h │ ├── SGroupList.cpp │ ├── SGroupList.h │ ├── SHexEdit.cpp │ ├── SHexEdit.h │ ├── SIPAddressCtrl.cpp │ ├── SIPAddressCtrl.h │ ├── SImageKnob.cpp │ ├── SImageKnob.h │ ├── SImageMaskWnd.cpp │ ├── SImageMaskWnd.h │ ├── SImagePlayer.cpp │ ├── SImagePlayer.h │ ├── SItembox.cpp │ ├── SItembox.h │ ├── SListCtrlEx.cpp │ ├── SListCtrlEx.h │ ├── SListboxex.cpp │ ├── SListboxex.h │ ├── SMaskWnd.cpp │ ├── SMaskWnd.h │ ├── SMcListViewEx │ │ ├── Adapter参考.h │ │ ├── SHeaderCtrlEx.cpp │ │ ├── SHeaderCtrlEx.h │ │ ├── SLoopButton.cpp │ │ ├── SLoopButton.h │ │ ├── SMCListViewEx.cpp │ │ ├── SMCListViewEx.h │ │ ├── STabCtrlHeaderBinder.cpp │ │ └── STabCtrlHeaderBinder.h │ ├── SProgressRing.cpp │ ├── SProgressRing.h │ ├── SRadioBox2.cpp │ ├── SRadioBox2.h │ ├── SRatingBar.cpp │ ├── SRatingBar.h │ ├── SRoundImage.cpp │ ├── SRoundImage.h │ ├── SRoundWnd.cpp │ ├── SRoundWnd.h │ ├── SScrollText.cpp │ ├── SScrollText.h │ ├── SSkinImgFrame3.cpp │ ├── SSkinImgFrame3.h │ ├── SSkinNewScrollBar.h │ ├── SSplitBar.cpp │ ├── SSplitBar.h │ ├── STabCtrl2.cpp │ ├── STabCtrl2.h │ ├── SText.cpp │ ├── SText.h │ ├── STreeBox.cpp │ ├── STreeBox.h │ ├── STurn3DView.cpp │ ├── STurn3DView.h │ ├── SVscrollbar.h │ ├── TipWnd.cpp │ ├── TipWnd.h │ ├── dlghelp │ │ └── souidlgs.h │ ├── gif │ │ ├── SGifPlayer.cpp │ │ ├── SGifPlayer.h │ │ ├── SSkinAni.cpp │ │ └── SSkinAni.h │ ├── image3d │ │ ├── 3dTransform.h │ │ ├── 3dlib.cpp │ │ ├── 3dlib.h │ │ ├── 3dmatrix.cpp │ │ ├── 3dmatrix.h │ │ ├── 3dtransform.cpp │ │ └── PerspectiveTransform.h │ ├── propgrid │ │ ├── SPropertyEmbedWndHelper.hpp │ │ ├── SPropertyGrid.cpp │ │ ├── SPropertyGrid.h │ │ ├── SPropertyItem-i.h │ │ ├── SPropertyItemBase.cpp │ │ ├── SPropertyItemBase.h │ │ ├── colorpicker │ │ │ ├── ColourPopup.cpp │ │ │ ├── ColourPopup.h │ │ │ ├── SColorPicker.cpp │ │ │ ├── SColorPicker.h │ │ │ └── Tooltipctrl.h │ │ └── propitem │ │ │ ├── SPropertyItem-Color.cpp │ │ │ ├── SPropertyItem-Color.h │ │ │ ├── SPropertyItem-Group.cpp │ │ │ ├── SPropertyItem-Group.h │ │ │ ├── SPropertyItem-Option.cpp │ │ │ ├── SPropertyItem-Option.h │ │ │ ├── SPropertyItem-Rect.cpp │ │ │ ├── SPropertyItem-Rect.h │ │ │ ├── SPropertyItem-Size.cpp │ │ │ ├── SPropertyItem-Size.h │ │ │ ├── SPropertyItem-Text.cpp │ │ │ └── SPropertyItem-Text.h │ ├── readme.txt │ ├── reg.h │ ├── smiley │ │ └── SSmileyCtrl.h │ └── trayicon │ │ ├── SShellNotifyIcon.cpp │ │ └── SShellNotifyIcon.h └── stdafx.h ├── LICENSE ├── Scintilla ├── CMakeLists.txt ├── License.txt ├── README ├── include │ ├── ILexer.h │ ├── Platform.h │ ├── SciLexer.h │ ├── Sci_Position.h │ ├── Scintilla.h │ ├── Scintilla.iface │ └── ScintillaWidget.h ├── lexers │ ├── LexCPP.cxx │ └── LexHTML.cxx ├── lexlib │ ├── Accessor.cxx │ ├── Accessor.h │ ├── CharacterCategory.cxx │ ├── CharacterCategory.h │ ├── CharacterSet.cxx │ ├── CharacterSet.h │ ├── LexAccessor.h │ ├── LexerBase.cxx │ ├── LexerBase.h │ ├── LexerModule.cxx │ ├── LexerModule.h │ ├── LexerNoExceptions.cxx │ ├── LexerNoExceptions.h │ ├── LexerSimple.cxx │ ├── LexerSimple.h │ ├── OptionSet.h │ ├── PropSetSimple.cxx │ ├── PropSetSimple.h │ ├── SparseState.h │ ├── StringCopy.h │ ├── StyleContext.cxx │ ├── StyleContext.h │ ├── SubStyles.h │ ├── WordList.cxx │ └── WordList.h ├── src │ ├── AutoComplete.cxx │ ├── AutoComplete.h │ ├── CallTip.cxx │ ├── CallTip.h │ ├── CaseConvert.cxx │ ├── CaseConvert.h │ ├── CaseFolder.cxx │ ├── CaseFolder.h │ ├── Catalogue.cxx │ ├── Catalogue.h │ ├── CellBuffer.cxx │ ├── CellBuffer.h │ ├── CharClassify.cxx │ ├── CharClassify.h │ ├── ContractionState.cxx │ ├── ContractionState.h │ ├── Decoration.cxx │ ├── Decoration.h │ ├── Document.cxx │ ├── Document.h │ ├── EditModel.cxx │ ├── EditModel.h │ ├── EditView.cxx │ ├── EditView.h │ ├── Editor.cxx │ ├── Editor.h │ ├── ExternalLexer.cxx │ ├── ExternalLexer.h │ ├── FontQuality.h │ ├── Indicator.cxx │ ├── Indicator.h │ ├── KeyMap.cxx │ ├── KeyMap.h │ ├── LineMarker.cxx │ ├── LineMarker.h │ ├── MarginView.cxx │ ├── MarginView.h │ ├── Partitioning.h │ ├── PerLine.cxx │ ├── PerLine.h │ ├── Position.h │ ├── PositionCache.cxx │ ├── PositionCache.h │ ├── RESearch.cxx │ ├── RESearch.h │ ├── RunStyles.cxx │ ├── RunStyles.h │ ├── ScintillaBase.cxx │ ├── ScintillaBase.h │ ├── Selection.cxx │ ├── Selection.h │ ├── SplitVector.h │ ├── Style.cxx │ ├── Style.h │ ├── UniConversion.cxx │ ├── UniConversion.h │ ├── UnicodeFromUTF8.h │ ├── ViewStyle.cxx │ ├── ViewStyle.h │ ├── XPM.cxx │ └── XPM.h ├── version.txt └── win32 │ ├── HanjaDic.cxx │ ├── HanjaDic.h │ ├── PlatWin.cxx │ ├── PlatWin.h │ ├── ScintRes.rc │ ├── Scintilla.def │ └── ScintillaWin.cxx ├── __cmake ├── global.cmake └── internal_utils.cmake ├── copy_files ├── CMakeLists.txt └── soui-sys-resource.zip ├── depends └── soui4 │ ├── bin │ ├── Win32 │ │ ├── Debug │ │ │ ├── httpclient.dll │ │ │ ├── imgdecoder-gdip.dll │ │ │ ├── imgdecoder-stb.dll │ │ │ ├── imgdecoder-wic.dll │ │ │ ├── log4z.dll │ │ │ ├── render-d2d.dll │ │ │ ├── render-gdi.dll │ │ │ ├── render-skia.dll │ │ │ ├── resprovider-7zip.dll │ │ │ ├── resprovider-zip.dll │ │ │ ├── scriptmodule-lua.dll │ │ │ ├── sipcobject.dll │ │ │ ├── soui-sys-resource.dll │ │ │ ├── soui-sys-resource2.dll │ │ │ ├── soui4.dll │ │ │ ├── taskloop.dll │ │ │ ├── translator.dll │ │ │ └── utilities4.dll │ │ └── Release │ │ │ ├── httpclient.dll │ │ │ ├── imgdecoder-gdip.dll │ │ │ ├── imgdecoder-stb.dll │ │ │ ├── imgdecoder-wic.dll │ │ │ ├── log4z.dll │ │ │ ├── render-d2d.dll │ │ │ ├── render-gdi.dll │ │ │ ├── render-skia.dll │ │ │ ├── resprovider-7zip.dll │ │ │ ├── resprovider-zip.dll │ │ │ ├── scriptmodule-lua.dll │ │ │ ├── sipcobject.dll │ │ │ ├── soui-sys-resource.dll │ │ │ ├── soui-sys-resource2.dll │ │ │ ├── soui4.dll │ │ │ ├── taskloop.dll │ │ │ ├── translator.dll │ │ │ └── utilities4.dll │ └── X64 │ │ ├── Debug │ │ ├── httpclient.dll │ │ ├── imgdecoder-gdip.dll │ │ ├── imgdecoder-stb.dll │ │ ├── imgdecoder-wic.dll │ │ ├── log4z.dll │ │ ├── render-d2d.dll │ │ ├── render-gdi.dll │ │ ├── render-skia.dll │ │ ├── resprovider-7zip.dll │ │ ├── resprovider-zip.dll │ │ ├── scriptmodule-lua.dll │ │ ├── sipcobject.dll │ │ ├── soui-sys-resource.dll │ │ ├── soui4.dll │ │ ├── taskloop.dll │ │ ├── translator.dll │ │ └── utilities4.dll │ │ └── Release │ │ ├── httpclient.dll │ │ ├── imgdecoder-gdip.dll │ │ ├── imgdecoder-stb.dll │ │ ├── imgdecoder-wic.dll │ │ ├── log4z.dll │ │ ├── render-d2d.dll │ │ ├── render-gdi.dll │ │ ├── render-skia.dll │ │ ├── resprovider-7zip.dll │ │ ├── resprovider-zip.dll │ │ ├── scriptmodule-lua.dll │ │ ├── sipcobject.dll │ │ ├── soui-sys-resource.dll │ │ ├── soui-sys-resource2.dll │ │ ├── soui4.dll │ │ ├── taskloop.dll │ │ ├── translator.dll │ │ └── utilities4.dll │ ├── include │ ├── SOUI │ │ └── include │ │ │ ├── SApp.h │ │ │ ├── SGuidDef.h │ │ │ ├── SInitGuid.h │ │ │ ├── SouiFactory.h │ │ │ ├── activex │ │ │ ├── SBStr.h │ │ │ ├── flash10t.tlh │ │ │ └── flash10t.tli │ │ │ ├── animation │ │ │ ├── SAlphaAnimation.h │ │ │ ├── SAnimation.h │ │ │ ├── SAnimationSet.h │ │ │ ├── SInterpolatorImpl.h │ │ │ ├── SRotateAnimation.h │ │ │ ├── STransformation.h │ │ │ ├── STranslateAnimation.h │ │ │ └── ScaleAnimation.h │ │ │ ├── control │ │ │ ├── SActiveX.h │ │ │ ├── SCalendar.h │ │ │ ├── SCaption.h │ │ │ ├── SCmnCtrl.h │ │ │ ├── SComboBase.h │ │ │ ├── SComboBox.h │ │ │ ├── SComboView.h │ │ │ ├── SDateTimePicker.h │ │ │ ├── SDropDown.h │ │ │ ├── SEdit.h │ │ │ ├── SFrame.h │ │ │ ├── SHeaderCtrl.h │ │ │ ├── SHotKeyCtrl.h │ │ │ ├── SListCtrl.h │ │ │ ├── SListView.h │ │ │ ├── SListbox.h │ │ │ ├── SMCListView.h │ │ │ ├── SMenuBar.h │ │ │ ├── SMessageBox.h │ │ │ ├── SRealWnd.h │ │ │ ├── SRichEdit.h │ │ │ ├── SScrollbar.h │ │ │ ├── SSliderBar.h │ │ │ ├── SSpinButtonCtrl.h │ │ │ ├── SSplitWnd.h │ │ │ ├── SStackView.h │ │ │ ├── SSwitch.h │ │ │ ├── STabCtrl.h │ │ │ ├── STileView.h │ │ │ ├── STree.h │ │ │ ├── STreeCtrl.h │ │ │ ├── STreeView.h │ │ │ └── SouiCtrls.h │ │ │ ├── core │ │ │ ├── SAccelerator.h │ │ │ ├── SCaret.h │ │ │ ├── SCmnMap.h │ │ │ ├── SDefine.h │ │ │ ├── SDropTargetDispatcher.h │ │ │ ├── SFocusManager.h │ │ │ ├── SGradient.h │ │ │ ├── SHostDialog.h │ │ │ ├── SHostPresenter.h │ │ │ ├── SHostWnd.h │ │ │ ├── SItemPanel.h │ │ │ ├── SMsgLoop.h │ │ │ ├── SNativeWnd.h │ │ │ ├── SNcPainter.h │ │ │ ├── SObjectFactory.h │ │ │ ├── SPanel.h │ │ │ ├── SScrollBarHandler.h │ │ │ ├── SSingleton.h │ │ │ ├── SSingleton2.h │ │ │ ├── SSingletonMap.h │ │ │ ├── SSkin.h │ │ │ ├── SSkinObjBase.h │ │ │ ├── STimerlineHandlerMgr.h │ │ │ ├── SWindowMgr.h │ │ │ ├── SWnd.h │ │ │ ├── SWndAccessible.h │ │ │ ├── SWndContainerImpl.h │ │ │ └── SWndStyle.h │ │ │ ├── event │ │ │ ├── SEventCrack.h │ │ │ ├── SEventSet.h │ │ │ ├── SEventSlot.h │ │ │ ├── SEvents.h │ │ │ └── SNotifyCenter.h │ │ │ ├── helper │ │ │ ├── SAdapterBase.h │ │ │ ├── SAppDir.h │ │ │ ├── SAssertFmt.h │ │ │ ├── SAttrCracker.h │ │ │ ├── SColor.h │ │ │ ├── SDIBHelper.h │ │ │ ├── SDpiHelper.hpp │ │ │ ├── SDpiScale.h │ │ │ ├── SDragWnd.h │ │ │ ├── SFunctor.hpp │ │ │ ├── SHostMgr.h │ │ │ ├── SIpcParamHelper.hpp │ │ │ ├── SListViewItemLocator.h │ │ │ ├── SMemDC.h │ │ │ ├── SMenu.h │ │ │ ├── SMenuEx.h │ │ │ ├── SMenuWndHook.h │ │ │ ├── SResID.h │ │ │ ├── STileViewItemLocator.h │ │ │ ├── STime.h │ │ │ ├── STimer.h │ │ │ ├── STimerGenerator.h │ │ │ ├── SToolTip.h │ │ │ ├── SUnkImpl.h │ │ │ ├── SUnknown.h │ │ │ ├── SplitString.h │ │ │ ├── SwndFinder.h │ │ │ ├── SwndMsgCracker.h │ │ │ ├── slog.h │ │ │ └── swndspy.h │ │ │ ├── interface │ │ │ ├── SAccelerator-i.h │ │ │ ├── SAdapter-i.h │ │ │ ├── SAnimation-i.h │ │ │ ├── SAttrStorage-i.h │ │ │ ├── SCtrl-i.h │ │ │ ├── SEvtArgs-i.h │ │ │ ├── SFactory-i.h │ │ │ ├── SGradient-i.h │ │ │ ├── SHostPresenter-i.h │ │ │ ├── SHttpClient-i.h │ │ │ ├── SImgDecoder-i.h │ │ │ ├── SListViewItemLocator-i.h │ │ │ ├── SMatrix-i.h │ │ │ ├── SMessageBox-i.h │ │ │ ├── SMsgLoop-i.h │ │ │ ├── SNativeWnd-i.h │ │ │ ├── SNativeWndApi.h │ │ │ ├── SNcPainter-i.h │ │ │ ├── SNotifyCenter-i.h │ │ │ ├── SObjFactory-i.h │ │ │ ├── SPathEffect-i.h │ │ │ ├── SRealWndHandler-i.h │ │ │ ├── SRender-i.h │ │ │ ├── SResProvider-i.h │ │ │ ├── SResProviderMgr-i.h │ │ │ ├── SRunnable-i.h │ │ │ ├── SScriptModule-i.h │ │ │ ├── SSkinPool-i.h │ │ │ ├── SSkinobj-i.h │ │ │ ├── STaskLoop-i.h │ │ │ ├── STileViewItemLocator-i.h │ │ │ ├── STimelineHandler-i.h │ │ │ ├── STimer-i.h │ │ │ ├── STransform-i.h │ │ │ ├── STranslator-i.h │ │ │ ├── STreeViewItemLocator-i.h │ │ │ ├── SValueAnimator-i.h │ │ │ ├── SWindow-i.h │ │ │ ├── SWndContainer-i.h │ │ │ ├── SobjectApi.h │ │ │ ├── sacchelper-i.h │ │ │ ├── saccproxy-i.h │ │ │ ├── sapp-i.h │ │ │ ├── scaret-i.h │ │ │ ├── shostwnd-i.h │ │ │ ├── sinterpolator-i.h │ │ │ ├── sipcobj-i.h │ │ │ ├── slayout-i.h │ │ │ ├── slog-i.h │ │ │ ├── smenu-i.h │ │ │ ├── smenuex-i.h │ │ │ ├── sobject-i.h │ │ │ └── stooltip-i.h │ │ │ ├── layout │ │ │ ├── SGridLayout.h │ │ │ ├── SGridLayoutParamStruct.h │ │ │ ├── SLayoutSize.h │ │ │ ├── SLinearLayout.h │ │ │ ├── SLinearLayoutParamStruct.h │ │ │ ├── SouiLayout.h │ │ │ └── SouiLayoutParamStruct.h │ │ │ ├── matrix │ │ │ ├── SCamera.h │ │ │ ├── SFloat.h │ │ │ ├── SFloatBits.h │ │ │ ├── SMatrix.h │ │ │ ├── SPoint.h │ │ │ └── SRect.h │ │ │ ├── msaa │ │ │ ├── SAccProxyCmnCtrl.h │ │ │ └── SAccProxyWindow.h │ │ │ ├── proxy │ │ │ ├── SCtrlProxy.h │ │ │ ├── SHostWndProxy.h │ │ │ ├── SNativeWndProxy.h │ │ │ ├── SPanelProxy.h │ │ │ └── SWindowProxy.h │ │ │ ├── res.mgr │ │ │ ├── SDpiAwareFont.h │ │ │ ├── SFontInfo.h │ │ │ ├── SFontPool.h │ │ │ ├── SGradientPool.h │ │ │ ├── SNamedValue.h │ │ │ ├── SObjDefAttr.h │ │ │ ├── SResProvider.h │ │ │ ├── SResProviderMgr.h │ │ │ ├── SSkinPool.h │ │ │ ├── SStylePool.h │ │ │ └── SUiDef.h │ │ │ ├── sobject │ │ │ └── Sobject.hpp │ │ │ ├── soui-version.h │ │ │ ├── soui_exp.h │ │ │ ├── souistd.h │ │ │ └── valueAnimator │ │ │ ├── SValueAnimator.h │ │ │ └── TypeEvaluator.h │ ├── components │ │ ├── com-cfg.h │ │ ├── commask.h │ │ ├── commgr2.h │ │ └── resprovider-zip │ │ │ └── zipresprovider-param.h │ ├── config │ │ ├── build.cfg │ │ └── config.h │ ├── swinx │ │ └── include │ │ │ ├── basetyps.h │ │ │ ├── class.h │ │ │ ├── comcat.h │ │ │ ├── commctrl.h │ │ │ ├── commdlg.h │ │ │ ├── ctrl_types.h │ │ │ ├── ctypes.h │ │ │ ├── fileapi.h │ │ │ ├── gdi.h │ │ │ ├── guiddef.h │ │ │ ├── hook.h │ │ │ ├── imm.h │ │ │ ├── initguid.h │ │ │ ├── logdef.h │ │ │ ├── menu.h │ │ │ ├── mmsystem.h │ │ │ ├── multimon.h │ │ │ ├── oaidl.h │ │ │ ├── objbase.h │ │ │ ├── objidl.h │ │ │ ├── ole2.h │ │ │ ├── oleauto.h │ │ │ ├── oleidl.h │ │ │ ├── region.h │ │ │ ├── richedit.h │ │ │ ├── shellapi.h │ │ │ ├── shlobj.h │ │ │ ├── strapi.h │ │ │ ├── sysapi.h │ │ │ ├── tchar.h │ │ │ ├── textserv.h │ │ │ ├── unknwn.h │ │ │ ├── windows.h │ │ │ ├── windowsx.h │ │ │ ├── winerror.h │ │ │ ├── winnls.h │ │ │ ├── winuser.h │ │ │ └── wnd.h │ ├── third-part │ │ └── stdint │ │ │ └── stdint.h │ └── utilities │ │ └── include │ │ ├── atl.mini │ │ ├── SComCli.h │ │ ├── SComHelper.h │ │ └── atldef.h │ │ ├── com-loader.hpp │ │ ├── gdialpha.h │ │ ├── helper │ │ ├── SAutoBuf.h │ │ ├── SCriticalSection.h │ │ ├── SEmptyable.hpp │ │ ├── SNoCopyable.hpp │ │ ├── SRwLock.h │ │ ├── SSemaphore.h │ │ ├── SSharedPtr.hpp │ │ └── obj-ref-impl.hpp │ │ ├── interface │ │ ├── obj-ref-i.h │ │ ├── sstring-i.h │ │ └── sxml-i.h │ │ ├── pugixml │ │ ├── pugiconfig.hpp │ │ ├── pugixml.hpp │ │ ├── pugixml.soui.txt │ │ └── readme.txt │ │ ├── sdef.h │ │ ├── sguid.h │ │ ├── snew.h │ │ ├── soui_mem_wrapper.h │ │ ├── souicoll.h │ │ ├── string │ │ ├── sstringa.h │ │ ├── sstringdata.h │ │ ├── sstringw.h │ │ ├── strcpcvt.h │ │ └── tstring.h │ │ ├── utilities-def.h │ │ ├── utilities.h │ │ ├── wtl.mini │ │ ├── msgcrack.h │ │ └── souimisc.h │ │ └── xml │ │ └── SXml.h │ └── lib │ ├── Win32 │ ├── soui4.lib │ └── utilities4.lib │ ├── X64 │ ├── soui4.lib │ └── utilities4.lib │ └── deb │ ├── libimgdecoder-stb.so │ ├── liblog4z.so │ ├── libmsftedit.so │ ├── librender-gdi.so │ ├── librender-skia.so │ ├── libresprovider-zip.so │ ├── libscriptmodule-lua.so │ ├── libsipcobject.so │ ├── libsoui4.so │ ├── libswinx.so │ ├── libtaskloop.so │ ├── libtranslator.so │ └── libutilities4.so ├── docimage ├── 1.gif ├── 1.png ├── 2.png └── 3.gif ├── license.txt ├── readme.md ├── uiPreview ├── CMakeLists.txt ├── license.txt ├── monitor │ ├── PathMonitor.cpp │ ├── PathMonitor.h │ ├── ThreadObject.cpp │ └── ThreadObject.h ├── readme.txt ├── res │ ├── resource.h │ └── soui_res.rc2 ├── resource.h ├── src │ ├── DropTarget.h │ ├── LayoutAdapter.cpp │ ├── LayoutAdapter.h │ ├── MainDlg.cpp │ └── MainDlg.h ├── stdafx.cpp ├── stdafx.h ├── uiPreview.cpp ├── uiPreview.rc └── uires │ ├── image │ ├── item_bk.png │ └── soui.ico │ ├── uidef │ └── init.xml │ ├── uires.idx │ ├── values │ ├── color.xml │ ├── skin.xml │ └── string.xml │ └── xml │ ├── dlg_about.xml │ └── dlg_main.xml ├── uieditor ├── CDebug.h ├── CMakeLists.txt ├── CmdLine.h ├── Config │ ├── Ctrl.xml │ ├── LayoutTmpl │ │ ├── Dialog.xml │ │ └── Include.xml │ ├── Skin.xml │ └── img │ │ ├── ctrl_icons.png │ │ └── skin_icons.png ├── DesignWnd.cpp ├── DesignWnd.h ├── Dialog │ ├── DlgAbout.cpp │ ├── DlgAbout.h │ ├── DlgCreatePro.cpp │ ├── DlgCreatePro.h │ ├── DlgInput.cpp │ ├── DlgInput.h │ ├── DlgInsertXmlElement.cpp │ ├── DlgInsertXmlElement.h │ ├── DlgNewLayout.cpp │ ├── DlgNewLayout.h │ ├── DlgResMgr.cpp │ └── DlgResMgr.h ├── DropTarget.h ├── FileHelper.h ├── Global.h ├── MainDlg.cpp ├── MainDlg.h ├── ResManger.cpp ├── ResManger.h ├── SImageBtnEx.cpp ├── SImageBtnEx.h ├── SImgCanvas.cpp ├── SImgCanvas.h ├── SToolBar.cpp ├── SToolBar.h ├── ScintillaWnd.cpp ├── ScintillaWnd.h ├── SouiEditor.cpp ├── SouiEditor.rc ├── SouiEditorApp.cpp ├── SouiEditorApp.h ├── SouiRealWndHandler.cpp ├── SouiRealWndHandler.h ├── SysdataMgr.cpp ├── SysdataMgr.h ├── XmlEditor.cpp ├── XmlEditor.h ├── XmlParser.cpp ├── XmlParser.h ├── build_rc2.bat ├── createpro.bat ├── helpapi.cpp ├── helpapi.h ├── license.txt ├── readme.txt ├── res │ ├── resource.h │ └── soui_res.rc2 ├── resource.h ├── souidlgs.h ├── spugixml │ ├── pugiconfig.hpp │ ├── pugixml.cpp │ └── pugixml.hpp ├── stdafx.cpp ├── stdafx.h ├── uires │ ├── image │ │ ├── app_button.png │ │ ├── btn_help.png │ │ ├── caption_line.png │ │ ├── default.scrollbar.png │ │ ├── logo.png │ │ ├── menu_sep.png │ │ ├── menu_skin.png │ │ ├── msg_btn_blue.png │ │ ├── open_menu.png │ │ ├── propswitch.png │ │ ├── soui.ico │ │ ├── soui.png │ │ ├── tab_skin.png │ │ ├── tb_prop.png │ │ ├── tool_button.png │ │ ├── toolbar_state.png │ │ └── tree_toggle.png │ ├── smenu │ │ ├── menu_layoutfile.xml │ │ └── menu_recent.xml │ ├── uidef │ │ └── init.xml │ ├── uires.idx │ ├── values │ │ ├── color.xml │ │ ├── skin.xml │ │ └── string.xml │ └── xml │ │ ├── dlg_about.xml │ │ ├── dlg_input.xml │ │ ├── dlg_insert_element.xml │ │ ├── dlg_main.xml │ │ ├── dlg_main_left.xml │ │ ├── dlg_main_right.xml │ │ ├── dlg_new_layout.xml │ │ ├── dlg_new_skin.xml │ │ ├── dlg_res_mgr.xml │ │ ├── dlg_uidesigner.xml │ │ └── messagebox.xml └── xpm_icons.h └── uiviewer ├── Adapter.cpp ├── Adapter.h ├── CMakeLists.txt ├── PreviewContainer.cpp ├── PreviewContainer.h ├── PreviewHost.cpp ├── PreviewHost.h ├── bg.bmp ├── bmp.hpp ├── icon1.ico ├── readme.txt ├── resource.h ├── stdafx.cpp ├── stdafx.h ├── uiviewer.cpp └── uiviewer.rc /.gitignore: -------------------------------------------------------------------------------- 1 | #OS junk files 2 | [Tt]humbs.db 3 | *.DS_Store 4 | 5 | #Visual Studio files 6 | *.[Oo]bj 7 | *.user 8 | *.aps 9 | *.pch 10 | *.vspscc 11 | *.vssscc 12 | *_i.c 13 | *_p.c 14 | *.ncb 15 | *.suo 16 | *.tlb 17 | *.tlh 18 | *.bak 19 | *.[Cc]ache 20 | *.ilk 21 | *.log 22 | *.sbr 23 | *.sdf 24 | *.opensdf 25 | *.unsuccessfulbuild 26 | ipch/ 27 | obj/ 28 | [Ll]ib 29 | [Bb]in 30 | [Bb]in64 31 | [Dd]ebug*/ 32 | [Rr]elease*/ 33 | Ankh.NoLoad 34 | *.VC.db 35 | *.h.cpp 36 | 37 | #GCC files 38 | *.o 39 | *.d 40 | *.res 41 | *.dll 42 | *.a 43 | 44 | #Visual Studio Code files 45 | .vscode/ 46 | 47 | #Soui 48 | demos 49 | build 50 | build_32 51 | vs2008 52 | vs2022 -------------------------------------------------------------------------------- /ExtendCtrls/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # 1394020320@qq.com 3 | # 4 | 5 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}) 6 | include_directories(${SOUI_INCLUDE}/config) 7 | include_directories(${SOUI_INCLUDE}/components) 8 | include_directories(${SOUI_INCLUDE}/utilities/include) 9 | include_directories(${SOUI_INCLUDE}/SOUI/include) 10 | include_directories(controls.extend) 11 | 12 | file(GLOB_RECURSE CTRLS_SRC controls.extend/*.*) 13 | 14 | set(CURRENT_SRCS 15 | SCtrlsRegister.cpp 16 | ) 17 | 18 | set(CURRENT_HEADERS 19 | stdafx.h 20 | SCtrlsRegister.h 21 | ) 22 | 23 | add_library(ExtendCtrls STATIC ${CURRENT_HEADERS} ${CURRENT_SRCS} ${CTRLS_SRC}) 24 | 25 | if(NOT CMAKE_SYSTEM_NAME MATCHES "Windows") 26 | target_compile_options(ExtendCtrls PRIVATE -fPIC) 27 | target_link_libraries(ExtendCtrls swinx) 28 | endif() 29 | target_precompile_headers(ExtendCtrls PRIVATE "stdafx.h") 30 | -------------------------------------------------------------------------------- /ExtendCtrls/SCtrlsRegister.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace SOUI{ 4 | class SCtrlsRegister 5 | { 6 | public: 7 | static void RegisterCtrls(SApplication *pApp); 8 | }; 9 | 10 | } -------------------------------------------------------------------------------- /ExtendCtrls/controls.extend/ExtendCtrls.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "ExtendCtrls.h" 3 | -------------------------------------------------------------------------------- /ExtendCtrls/controls.extend/ExtendCtrls.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "core/SWnd.h" 3 | 4 | namespace SOUI 5 | { 6 | class SWindowEx : public SWindow { 7 | public: 8 | DEF_SOBJECT(SWindow, L"windowex") 9 | 10 | protected: 11 | SOUI_MSG_MAP_BEGIN() 12 | MSG_WM_LBUTTONDBLCLK(OnLButtonDown) //将双击消息处理为单击 13 | SOUI_MSG_MAP_END() 14 | }; 15 | 16 | }; // namespace SOUI -------------------------------------------------------------------------------- /ExtendCtrls/controls.extend/SAniWindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace SOUI 4 | { 5 | 6 | class SAniWindow 7 | : public SWindow 8 | , protected ITimelineHandler { 9 | DEF_SOBJECT(SWindow, L"AniWindow") 10 | public: 11 | SAniWindow(void); 12 | ~SAniWindow(void); 13 | 14 | void EnableAnimate(bool bEnable); 15 | 16 | protected: 17 | STDMETHOD_(void, OnNextFrame)(THIS_) OVERRIDE; 18 | STDMETHOD_(ILayoutParam *, GetLayoutParam)(THIS) SCONST OVERRIDE; 19 | 20 | virtual BOOL OnRelayout(const CRect &rcWnd) OVERRIDE; 21 | 22 | int GetHeight() const; 23 | 24 | protected: 25 | void OnShowWindow(BOOL bShow, UINT nStatus); 26 | int OnCreate(void *); 27 | SOUI_MSG_MAP_BEGIN() 28 | MSG_WM_CREATE(OnCreate) 29 | MSG_WM_SHOWWINDOW(OnShowWindow) 30 | SOUI_MSG_MAP_END() 31 | 32 | public: 33 | SOUI_ATTRS_BEGIN() 34 | ATTR_INTERPOLATOR(L"Interpolator", m_aniInterpolator, FALSE) 35 | ATTR_CHAIN_PTR(m_aniInterpolator, 0) // chain attributes to interpolator 36 | ATTR_INT(L"steps", m_nSteps, FALSE) 37 | SOUI_ATTRS_END() 38 | protected: 39 | enum AniMode 40 | { 41 | AM_NONE = 0, 42 | AM_SHOW, 43 | AM_HIDE, 44 | }; 45 | SAutoRefPtr m_aniInterpolator; 46 | int m_nSteps; 47 | int m_iAniStep; 48 | CSize m_szWnd; 49 | 50 | AniMode m_aniMode; 51 | bool m_bSaveSize; 52 | SAutoRefPtr m_layoutParamTmp; 53 | bool m_bEnableAni; 54 | }; 55 | 56 | } // namespace SOUI 57 | -------------------------------------------------------------------------------- /ExtendCtrls/controls.extend/SCheckBox2.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "SCheckBox2.h" 3 | 4 | SNSBEGIN 5 | SCheckBox2::SCheckBox2(void) 6 | { 7 | } 8 | 9 | SCheckBox2::~SCheckBox2(void) 10 | { 11 | } 12 | 13 | 14 | void SCheckBox2::OnLButtonUp(UINT nFlags, CPoint point) 15 | { 16 | if((GetState()&WndState_PushDown) && GetWindowRect().PtInRect(point)) 17 | { 18 | if (!IsChecked()) 19 | ModifyState(WndState_Check, 0,TRUE); 20 | } 21 | 22 | SWindow::OnLButtonUp(nFlags,point); 23 | } 24 | 25 | 26 | HRESULT SCheckBox2::OnAttrCheck(const SStringW& strValue, BOOL bLoading) 27 | { 28 | SetCheck(STRINGASBOOL(strValue)); 29 | return bLoading?S_FALSE:S_OK; 30 | } 31 | 32 | SNSEND 33 | -------------------------------------------------------------------------------- /ExtendCtrls/controls.extend/SCheckBox2.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | SNSBEGIN 4 | 5 | class SCheckBox2 : public SWindow 6 | { 7 | DEF_SOBJECT(SWindow,L"check2") 8 | public: 9 | SCheckBox2(void); 10 | ~SCheckBox2(void); 11 | 12 | protected: 13 | HRESULT OnAttrCheck(const SStringW& strValue, BOOL bLoading); 14 | 15 | SOUI_ATTRS_BEGIN() 16 | ATTR_CUSTOM(L"checked",OnAttrCheck) 17 | SOUI_ATTRS_END() 18 | 19 | protected: 20 | void OnLButtonUp(UINT nFlags, CPoint point); 21 | 22 | SOUI_MSG_MAP_BEGIN() 23 | MSG_WM_LBUTTONDBLCLK(OnLButtonDown) 24 | MSG_WM_LBUTTONUP(OnLButtonUp) 25 | SOUI_MSG_MAP_END() 26 | 27 | }; 28 | 29 | 30 | SNSEND -------------------------------------------------------------------------------- /ExtendCtrls/controls.extend/SFadeFrame.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "SAnimator.h" 4 | 5 | namespace SOUI 6 | { 7 | class SFadeFrame 8 | : public SWindow 9 | , public SAnimator 10 | , public ITimelineHandler { 11 | DEF_SOBJECT(SWindow, L"fadeframe") 12 | public: 13 | SFadeFrame(void); 14 | ~SFadeFrame(void); 15 | 16 | protected: 17 | void SetChildrenAlpha(BYTE byAlpha); 18 | 19 | virtual void OnAnimatorState(int percent); 20 | STDMETHOD_(void, OnNextFrame)(THIS_) OVERRIDE; 21 | 22 | SOUI_ATTRS_BEGIN() 23 | ATTR_UINT(L"AniTime", m_nAniTime, FALSE) 24 | ATTR_UINT(L"DelayTime", m_nDelayTime, FALSE) 25 | ATTR_STRINGW(L"targetName", m_strTargetName, FALSE) 26 | ATTR_UINT(L"showAlpha", m_byAlphaShow, FALSE) 27 | ATTR_INT(L"initShow", m_bInitShow, FALSE) 28 | SOUI_ATTRS_END() 29 | 30 | void OnMouseHover(WPARAM wParam, CPoint ptPos); 31 | void OnMouseLeave(); 32 | void OnTimer(char cTimerID); 33 | int OnCreate(LPVOID); 34 | 35 | SOUI_MSG_MAP_BEGIN() 36 | MSG_WM_MOUSEHOVER(OnMouseHover) 37 | MSG_WM_MOUSELEAVE(OnMouseLeave) 38 | MSG_WM_TIMER_EX(OnTimer) 39 | MSG_WM_CREATE(OnCreate) 40 | SOUI_MSG_MAP_END() 41 | protected: 42 | DWORD m_nAniTime; 43 | DWORD m_nDelayTime; 44 | 45 | SStringW m_strTargetName; 46 | int m_nAlphaBegin, m_nAlphaEnd; 47 | BYTE m_byAlphaCurrent; 48 | BYTE m_byAlphaShow; 49 | BOOL m_bInitShow; 50 | }; 51 | 52 | } // namespace SOUI 53 | -------------------------------------------------------------------------------- /ExtendCtrls/controls.extend/SImageMaskWnd.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace SOUI 4 | { 5 | class SImageMaskWnd : public SWindow { 6 | DEF_SOBJECT(SWindow, L"imageMask") 7 | public: 8 | SImageMaskWnd(void); 9 | ~SImageMaskWnd(void); 10 | 11 | void SetImage(IBitmapS *pBitmap, FilterLevel fl = kHigh_FilterLevel); 12 | 13 | protected: 14 | void OnPaint(IRenderTarget *pRT); 15 | 16 | SOUI_MSG_MAP_BEGIN() 17 | MSG_WM_PAINT_EX(OnPaint) 18 | SOUI_MSG_MAP_END() 19 | 20 | HRESULT OnAttrMask(const SStringW &strValue, BOOL bLoading); 21 | HRESULT OnAttrImage(const SStringW &strValue, BOOL bLoading); 22 | 23 | void UpdateCacheFromSkin(ISkinObj *pSkin); 24 | void UpdateCacheFromImage(IBitmapS *pBitmap, FilterLevel fl); 25 | void MakeCacheAlpha(); 26 | 27 | SOUI_ATTRS_BEGIN() 28 | ATTR_CUSTOM(L"mask", OnAttrMask) // image.a 29 | ATTR_CUSTOM(L"skin", OnAttrImage) 30 | SOUI_ATTRS_END() 31 | 32 | SStringW m_strSkin; 33 | SAutoRefPtr m_bmpCache; 34 | SAutoRefPtr m_bmpMask; 35 | int m_iMaskChannel; 36 | }; 37 | } // namespace SOUI 38 | -------------------------------------------------------------------------------- /ExtendCtrls/controls.extend/SMaskWnd.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace SOUI 4 | { 5 | class SMaskWnd : public SWindow { 6 | DEF_SOBJECT(SWindow, L"maskWnd") 7 | public: 8 | SMaskWnd(void); 9 | ~SMaskWnd(void); 10 | 11 | protected: 12 | virtual void OnCommitSurface(IRenderTarget *pRtDest, LPCRECT pRcDest, IRenderTarget *pRtSrc, LPCRECT pRcSrc, BYTE alpha) OVERRIDE; 13 | 14 | protected: 15 | HRESULT OnAttrMask(const SStringW &strValue, BOOL bLoading); 16 | 17 | void MakeCacheApha(IBitmapS* cache); 18 | void MakeMaskTemp(); 19 | 20 | SOUI_ATTRS_BEGIN() 21 | ATTR_CUSTOM(L"mask", OnAttrMask) // image.a 22 | SOUI_ATTRS_END() 23 | 24 | void OnSize(UINT nType, CSize size); 25 | 26 | SOUI_MSG_MAP_BEGIN() 27 | MSG_WM_SIZE(OnSize) 28 | SOUI_MSG_MAP_END() 29 | 30 | SAutoRefPtr m_bmpMask; 31 | int m_iMaskChannel; 32 | SAutoRefPtr m_bmpMaskTemp; 33 | }; 34 | } // namespace SOUI 35 | -------------------------------------------------------------------------------- /ExtendCtrls/controls.extend/SMcListViewEx/STabCtrlHeaderBinder.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace SOUI 4 | { 5 | class STabCtrlHeaderBinder { 6 | public: 7 | STabCtrlHeaderBinder(STabCtrl *phost = NULL); 8 | ~STabCtrlHeaderBinder(); 9 | void BindHost(STabCtrl *); 10 | STabCtrlHeaderBinder(const SOUI::STabCtrlHeaderBinder &) 11 | { 12 | } 13 | STabCtrlHeaderBinder &operator=(const SOUI::STabCtrlHeaderBinder &) 14 | { 15 | return *this; 16 | } 17 | void Bind(SWindow *pWnd, int idx, DWORD evtcode = EVT_CMD); 18 | 19 | private: 20 | CAutoRefPtr m_pTabHost; 21 | 22 | protected: 23 | SMap m_lstPages; 24 | BOOL EvtHander(IEvtArgs *e); 25 | BOOL TabSelChanged(EventTabSelChanged *evt_sel); 26 | }; 27 | } // namespace SOUI -------------------------------------------------------------------------------- /ExtendCtrls/controls.extend/SProgressRing.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace SOUI 4 | { 5 | class SProgressRing : public SProgress { 6 | DEF_SOBJECT(SProgress, L"progressRing") 7 | public: 8 | SProgressRing(void); 9 | ~SProgressRing(void); 10 | 11 | SOUI_ATTRS_BEGIN() 12 | ATTR_COLOR(L"colorBack", m_crBackground, TRUE) 13 | ATTR_COLOR(L"colorFore", m_crForeground, TRUE) 14 | ATTR_FLOAT(L"arcRate", m_fArcRate, TRUE) 15 | SOUI_ATTRS_END() 16 | 17 | protected: 18 | virtual void OnColorize(COLORREF cr); 19 | 20 | protected: 21 | void OnPaint(IRenderTarget *pRT); 22 | 23 | SOUI_MSG_MAP_BEGIN() 24 | MSG_WM_PAINT_EX(OnPaint) 25 | SOUI_MSG_MAP_END() 26 | 27 | COLORREF m_crBackground; 28 | COLORREF m_crForeground; 29 | float m_fArcRate; 30 | }; 31 | 32 | } // namespace SOUI 33 | -------------------------------------------------------------------------------- /ExtendCtrls/controls.extend/SRadioBox2.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "SRadioBox2.h" 3 | 4 | namespace SOUI 5 | { 6 | SRadioBox2::SRadioBox2(void) 7 | : m_pIcon(NULL) 8 | , m_nTextOffset(0) 9 | { 10 | } 11 | 12 | SRadioBox2::~SRadioBox2(void) 13 | { 14 | } 15 | 16 | void SRadioBox2::OnPaint(IRenderTarget *pRT) 17 | { 18 | if (m_pSkin) 19 | { 20 | CRect rc; 21 | GetClientRect(&rc); 22 | int nState = 0; 23 | if (GetState() & WndState_Check) 24 | nState = 2; 25 | else if (GetState() & WndState_PushDown) 26 | nState = 2; 27 | else if (GetState() & WndState_Hover) 28 | nState = 1; 29 | 30 | m_pSkin->DrawByIndex(pRT, rc, nState); 31 | } 32 | if (m_pIcon) 33 | { 34 | CRect rcIcon = GetClientRect(); 35 | rcIcon.OffsetRect(m_ptIcon); 36 | rcIcon = CRect(rcIcon.TopLeft(), m_pIcon->GetSkinSize()); 37 | m_pIcon->DrawByState(pRT, rcIcon, GetState()); 38 | } 39 | SWindow::OnPaint(pRT); 40 | } 41 | 42 | } // namespace SOUI 43 | -------------------------------------------------------------------------------- /ExtendCtrls/controls.extend/SRadioBox2.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace SOUI 6 | { 7 | class SRadioBox2 : public SRadioBox { 8 | DEF_SOBJECT(SRadioBox, L"radio2") 9 | public: 10 | SRadioBox2(void); 11 | ~SRadioBox2(void); 12 | 13 | protected: 14 | SIZE MeasureContent(int wid, int hei) override 15 | { 16 | if (m_pSkin) 17 | return m_pSkin->GetSkinSize(); 18 | else 19 | return SWindow::MeasureContent(wid, hei); 20 | } 21 | virtual void GetTextRect(LPRECT pRect) 22 | { 23 | SWindow::GetTextRect(pRect); 24 | pRect->left += m_nTextOffset; 25 | } 26 | virtual void DrawFocus(IRenderTarget *pRT) 27 | { 28 | } 29 | 30 | protected: 31 | void OnPaint(IRenderTarget *pRT); 32 | 33 | SOUI_MSG_MAP_BEGIN() 34 | MSG_WM_PAINT_EX(OnPaint) 35 | SOUI_MSG_MAP_END() 36 | 37 | ISkinObj *m_pIcon; 38 | CPoint m_ptIcon; 39 | int m_nTextOffset; 40 | SOUI_ATTRS_BEGIN() 41 | ATTR_SKIN(L"iconSkin", m_pIcon, TRUE) 42 | ATTR_POINT(L"iconPos", m_ptIcon, TRUE) 43 | ATTR_INT(L"textOffset", m_nTextOffset, TRUE) 44 | SOUI_ATTRS_END() 45 | }; 46 | 47 | } // namespace SOUI 48 | -------------------------------------------------------------------------------- /ExtendCtrls/controls.extend/SRatingBar.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace SOUI 4 | { 5 | class SRatingBar : public SWindow { 6 | DEF_SOBJECT(SWindow, L"ratingbar") 7 | public: 8 | SRatingBar(void); 9 | ~SRatingBar(void); 10 | 11 | void SetValue(float fValue); 12 | 13 | protected: 14 | virtual SIZE MeasureContent(int nParentWid, int nParentHei) override; 15 | 16 | void DrawStars(IRenderTarget *pRT, CRect rc, BOOL bForeground); 17 | 18 | void OnPaint(IRenderTarget *pRT); 19 | 20 | SOUI_MSG_MAP_BEGIN() 21 | MSG_WM_PAINT_EX(OnPaint) 22 | SOUI_MSG_MAP_END() 23 | 24 | SOUI_ATTRS_BEGIN() 25 | ATTR_SKIN(L"starSkin", m_pStar, TRUE) 26 | ATTR_INT(L"starNum", m_nStars, TRUE) 27 | ATTR_FLOAT(L"value", m_fValue, TRUE) 28 | SOUI_ATTRS_END() 29 | 30 | protected: 31 | ISkinObj *m_pStar; 32 | int m_nStars; 33 | float m_fValue; 34 | }; 35 | 36 | } // namespace SOUI 37 | -------------------------------------------------------------------------------- /ExtendCtrls/controls.extend/SRoundImage.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "SRoundImage.h" 3 | 4 | namespace SOUI 5 | { 6 | SRoundImage::SRoundImage():m_cornerSize(0) 7 | { 8 | } 9 | 10 | 11 | SRoundImage::~SRoundImage() 12 | { 13 | } 14 | 15 | SAutoRefPtr SRoundImage::GetRoundImage() const 16 | { 17 | if (!m_pSkin) return NULL; 18 | SAutoRefPtr pRT; 19 | CRect rc = GetClientRect(); 20 | GETRENDERFACTORY->CreateRenderTarget(&pRT, rc.Width(), rc.Height()); 21 | rc.MoveToXY(0, 0); 22 | pRT->ClearRect(&rc, 0); 23 | SAutoRefPtr br; 24 | pRT->CreateSolidColorBrush(RGBA(0xBA, 0xB3, 0x99, 0xFF), &br); 25 | pRT->SelectObject(br,NULL); 26 | if(m_cornerSize==0){ 27 | pRT->FillEllipse(&rc); 28 | }else{ 29 | pRT->FillRoundRect(&rc,CPoint(m_cornerSize,m_cornerSize)); 30 | } 31 | pRT->SetXfermode(kSrcIn_Mode,NULL); 32 | m_pSkin->DrawByIndex(pRT, rc, 0); 33 | return (IBitmapS*)pRT->GetCurrentObject(OT_BITMAP); 34 | } 35 | 36 | void SRoundImage::OnPaint(IRenderTarget * pRT) 37 | { 38 | if (!m_img) return; 39 | CRect rc = GetClientRect(); 40 | pRT->DrawBitmap(&rc, m_img, 0, 0,0xff); 41 | } 42 | 43 | void SRoundImage::OnSize(UINT nType, CSize size) 44 | { 45 | __baseCls::OnSize(nType, size); 46 | m_img = GetRoundImage(); 47 | } 48 | 49 | HRESULT SRoundImage::OnAttrCornerSize(const SStringW & value,BOOL bLoading) 50 | { 51 | m_cornerSize = _wtoi(value); 52 | if(!bLoading){ 53 | m_img = GetRoundImage(); 54 | return S_OK; 55 | } 56 | return S_FALSE; 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /ExtendCtrls/controls.extend/SRoundImage.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | namespace SOUI 3 | { 4 | class SRoundImage : public SImageWnd 5 | { 6 | DEF_SOBJECT(SImageWnd,L"roundImg") 7 | private: 8 | SAutoRefPtr m_img; 9 | int m_cornerSize; 10 | public: 11 | SRoundImage(); 12 | ~SRoundImage(); 13 | 14 | public: 15 | HRESULT OnAttrCornerSize(const SStringW & value,BOOL bLoading); 16 | SOUI_ATTRS_BEGIN() 17 | ATTR_CUSTOM(L"cornerSize",OnAttrCornerSize) 18 | SOUI_ATTRS_END() 19 | protected: 20 | SAutoRefPtr GetRoundImage() const; 21 | 22 | void OnPaint(IRenderTarget *pRT); 23 | void OnSize(UINT nType, CSize size); 24 | SOUI_MSG_MAP_BEGIN() 25 | MSG_WM_SIZE(OnSize) 26 | MSG_WM_PAINT_EX(OnPaint) 27 | SOUI_MSG_MAP_END() 28 | }; 29 | 30 | } 31 | 32 | -------------------------------------------------------------------------------- /ExtendCtrls/controls.extend/SRoundWnd.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "SRoundWnd.h" 3 | 4 | SNSBEGIN 5 | 6 | SRoundWnd::SRoundWnd(void):m_cornerSize(0) 7 | { 8 | m_bLayeredWindow = TRUE; 9 | } 10 | 11 | SRoundWnd::~SRoundWnd(void) 12 | { 13 | } 14 | 15 | void SRoundWnd::OnCommitSurface(IRenderTarget *pRtDest, LPCRECT pRcDest, IRenderTarget *pRtSrc, LPCRECT pRcSrc, BYTE alpha) 16 | { 17 | SAutoRefPtr pRT; 18 | CRect rc = GetClientRect(); 19 | GETRENDERFACTORY->CreateRenderTarget(&pRT, rc.Width(), rc.Height()); 20 | pRT->OffsetViewportOrg(-rc.left,-rc.top); 21 | pRT->ClearRect(&rc, 0); 22 | SAutoRefPtr br; 23 | pRT->CreateSolidColorBrush(RGBA(0xBA, 0xB3, 0x99, 0xFF), &br); 24 | pRT->SelectObject(br,NULL); 25 | if(m_cornerSize==0){ 26 | pRT->FillEllipse(&rc); 27 | }else{ 28 | pRT->FillRoundRect(&rc,CPoint(m_cornerSize,m_cornerSize)); 29 | } 30 | pRT->SetXfermode(kSrcIn_Mode,NULL); 31 | pRT->AlphaBlend(&rc,pRtSrc,&rc,255); 32 | pRtDest->AlphaBlend(pRcDest,pRT,&rc,alpha); 33 | } 34 | 35 | SNSEND 36 | -------------------------------------------------------------------------------- /ExtendCtrls/controls.extend/SRoundWnd.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | SNSBEGIN 3 | 4 | class SRoundWnd : public SWindow 5 | { 6 | DEF_SOBJECT(SWindow,L"roundWnd") 7 | 8 | private: 9 | int m_cornerSize; 10 | public: 11 | SRoundWnd(void); 12 | ~SRoundWnd(void); 13 | 14 | public: 15 | SOUI_ATTRS_BEGIN() 16 | ATTR_INT(L"cornerSize",m_cornerSize,TRUE) 17 | SOUI_ATTRS_END() 18 | 19 | protected: 20 | void OnCommitSurface(IRenderTarget *pRtDest, 21 | LPCRECT pRcDest, 22 | IRenderTarget *pRtSrc, 23 | LPCRECT pRcSrc, 24 | BYTE alpha) override; 25 | 26 | }; 27 | 28 | SNSEND 29 | -------------------------------------------------------------------------------- /ExtendCtrls/controls.extend/SScrollText.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace SOUI 4 | { 5 | class SScrollText 6 | : public SStatic 7 | , public ITimelineHandler { 8 | DEF_SOBJECT(SStatic, L"scrolltext") 9 | public: 10 | SScrollText(void); 11 | ~SScrollText(void); 12 | 13 | void SetWindowText(const SStringT &strText); 14 | 15 | protected: 16 | STDMETHOD_(void, OnNextFrame)(THIS_) OVERRIDE; 17 | virtual void OnContainerChanged(ISwndContainer *pOldContainer, ISwndContainer *pNewContainer); 18 | 19 | protected: 20 | void OnPaint(IRenderTarget *pRT); 21 | void OnSize(UINT nType, CSize size); 22 | void OnShowWindow(BOOL bShow, UINT nStatus); 23 | void OnDestroy(); 24 | 25 | void UpdateScrollInfo(CSize size); 26 | 27 | SOUI_MSG_MAP_BEGIN() 28 | MSG_WM_PAINT_EX(OnPaint) 29 | MSG_WM_SIZE(OnSize) 30 | MSG_WM_DESTROY(OnDestroy) 31 | MSG_WM_SHOWWINDOW(OnShowWindow) 32 | SOUI_MSG_MAP_END() 33 | 34 | SOUI_ATTRS_BEGIN() 35 | ATTR_INT(L"speed", m_nSpeed, FALSE) 36 | ATTR_INT(L"rolltype", m_nRollType, FALSE) 37 | SOUI_ATTRS_END() 38 | 39 | int m_nSpeed; 40 | int m_nOffset; 41 | int m_nScrollWidth; 42 | int m_nNextInterval; 43 | int m_nRollType; // 0首位衔接 1 非衔接 44 | }; 45 | 46 | } // namespace SOUI 47 | -------------------------------------------------------------------------------- /ExtendCtrls/controls.extend/SSkinImgFrame3.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace SOUI 5 | { 6 | /*usage 7 | 8 | */ 9 | class SSkinImgFrame3 : public SSkinImgFrame { 10 | DEF_SOBJECT(SSkinImgFrame, L"imgframe3") 11 | public: 12 | SSkinImgFrame3(void); 13 | ~SSkinImgFrame3(void); 14 | 15 | virtual SIZE GetSkinSize(); 16 | 17 | virtual bool SetImage(IBitmapS *pImg) 18 | { 19 | return false; 20 | } 21 | 22 | SOUI_ATTRS_BEGIN() 23 | ATTR_CUSTOM(L"src", OnAttrSrc) 24 | /* offcut-left/right/top/bottom 因为组合图往往子图之间有空白 */ 25 | /* 这里定义对应的子图图片切割掉上下左右多少,防止切割出来的图片有无用的边沿 */ 26 | ATTR_RECT(L"offcut", m_offset, FALSE) 27 | SOUI_ATTRS_END() 28 | 29 | protected: 30 | HRESULT OnAttrSrc(const SStringW &strValue, BOOL bLoading); 31 | 32 | virtual void _Draw(IRenderTarget *pRT, LPCRECT rcDraw, DWORD dwState, BYTE byAlpha); 33 | 34 | CRect m_rcImg; 35 | CRect m_offset; 36 | SStringW m_strImgKey; 37 | }; 38 | 39 | } // namespace SOUI 40 | -------------------------------------------------------------------------------- /ExtendCtrls/controls.extend/SSplitBar.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace SOUI 5 | { 6 | class SSplitBar : public SWindow { 7 | DEF_SOBJECT(SWindow, L"splitbar") 8 | public: 9 | SSplitBar(); 10 | ~SSplitBar(); 11 | 12 | protected: 13 | void OnLButtonDown(UINT nFlags, CPoint pt); 14 | void OnLButtonUp(UINT nFlags, CPoint pt); 15 | void OnMouseMove(UINT nFlags, CPoint pt); 16 | BOOL OnSetCursor(const CPoint &pt); 17 | LRESULT OnCreate(LPVOID); 18 | 19 | void ResizeHostWindow(int nOffset); 20 | SOUI_ATTRS_BEGIN() 21 | ATTR_INT(L"resizeHostWnd", m_bResizeHostWnd, FALSE) 22 | ATTR_INT(L"vertical", m_bVertical, FALSE) 23 | ATTR_INT(L"minSize", m_nSizeMin, FALSE) 24 | ATTR_INT(L"maxSize", m_nSizeMax, FALSE) 25 | SOUI_ATTRS_END() 26 | 27 | SOUI_MSG_MAP_BEGIN() 28 | MSG_WM_CREATE(OnCreate) 29 | MSG_WM_LBUTTONDOWN(OnLButtonDown) 30 | MSG_WM_LBUTTONUP(OnLButtonUp) 31 | MSG_WM_MOUSEMOVE(OnMouseMove) 32 | SOUI_MSG_MAP_END() 33 | 34 | CPoint m_ptDragPrev; /**< 拖动调整的前一个位置 */ 35 | BOOL m_bDragging; /**< 正在拖动 */ 36 | BOOL m_bResizeHostWnd; /**< 是否缩放宿主窗口*/ 37 | int m_nSizeMin; /**< 最小大小 */ 38 | int m_nSizeMax; /**< 最大大小 */ 39 | int m_nOrginPos; /**< 最原始的left/top*/ 40 | int m_nTrackingPos; 41 | BOOL m_bVertical; /**< 是否垂直分割,默认是水平分割*/ 42 | }; 43 | 44 | }; // namespace SOUI -------------------------------------------------------------------------------- /ExtendCtrls/controls.extend/SText.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "SText.h" 3 | 4 | namespace SOUI 5 | { 6 | void SText::DrawText(IRenderTarget *pRT, LPCTSTR pszBuf, int cchText, LPRECT pRect, UINT uFormat) 7 | { 8 | pRT->DrawText(pszBuf, cchText, pRect, uFormat | DT_WORDBREAK | DT_EDITCONTROL); 9 | } 10 | } // namespace SOUI -------------------------------------------------------------------------------- /ExtendCtrls/controls.extend/SText.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | #include "core/SWnd.h" 4 | 5 | namespace SOUI 6 | { 7 | 8 | class SText : public SStatic { 9 | DEF_SOBJECT(SStatic, L"textex") 10 | public: 11 | virtual void DrawText(IRenderTarget *pRT, 12 | LPCTSTR pszBuf, 13 | int cchText, 14 | LPRECT pRect, 15 | UINT uFormat); 16 | }; 17 | 18 | }; // namespace SOUI -------------------------------------------------------------------------------- /ExtendCtrls/controls.extend/TipWnd.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace SOUI 4 | { 5 | class STipWnd : public SHostWnd { 6 | typedef SHostWnd __baseCls; 7 | public: 8 | STipWnd(const SStringT &strLayout); 9 | ~STipWnd(); 10 | 11 | enum AnchorType 12 | { 13 | AT_LEFT_TOP, 14 | AT_LEFT_BOTTOM, 15 | AT_RIGHT_TOP, 16 | AT_RIGHT_BOTTOM, 17 | }; 18 | static void SetLayout(LPCTSTR pszLayout); 19 | static void ShowTip(int x, int y, AnchorType at, const SStringT &strTip); 20 | 21 | protected: 22 | virtual void OnFinalMessage(HWND hWnd); 23 | 24 | void SetTip(const SStringT &strTip); 25 | 26 | void OnWindowPosChanging(LPWINDOWPOS lpWndPos); 27 | 28 | void OnTimer(UINT_PTR timerID); 29 | BEGIN_MSG_MAP_EX(STipWnd) 30 | MSG_WM_TIMER(OnTimer) 31 | MSG_WM_WINDOWPOSCHANGING(OnWindowPosChanging) 32 | CHAIN_MSG_MAP(SHostWnd) 33 | END_MSG_MAP() 34 | 35 | CPoint m_ptAnchor; 36 | AnchorType m_anchorType; 37 | }; 38 | } // namespace SOUI 39 | -------------------------------------------------------------------------------- /ExtendCtrls/controls.extend/image3d/3dmatrix.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "3dlib.h" 3 | 4 | namespace IMAGE3D 5 | { 6 | // 4x4 matrix functions 7 | void Mat_Add_4X4(MATRIX_4_4_PTR ma, MATRIX_4_4_PTR mb, MATRIX_4_4_PTR msum); 8 | void Mat_Mul_4X4(MATRIX_4_4_PTR ma, MATRIX_4_4_PTR mb, MATRIX_4_4_PTR mprod); 9 | void Mat_Mul_1X4_4X4(MATRIX_1_4_PTR ma, MATRIX_4_4_PTR mb, MATRIX_1_4_PTR mprod); 10 | void Mat_Mul_VECTOR3D_4X4(VECTOR3D_PTR va, MATRIX_4_4_PTR mb, VECTOR3D_PTR vprod); 11 | void Mat_Mul_VECTOR3D_4X3(VECTOR3D_PTR va, MATRIX_4_3_PTR mb, VECTOR3D_PTR vprod); 12 | void Mat_Mul_VECTOR4D_4X4(VECTOR4D_PTR va, MATRIX_4_4_PTR mb, VECTOR4D_PTR vprod); 13 | void Mat_Mul_VECTOR4D_4X3(VECTOR4D_PTR va, MATRIX_4_4_PTR mb, VECTOR4D_PTR vprod); 14 | int Mat_Inverse_4X4(MATRIX_4_4_PTR m, MATRIX_4_4_PTR mi); 15 | void Mat_Init_4X4(MATRIX_4_4_PTR ma, 16 | float m00, float m01, float m02, float m03, 17 | float m10, float m11, float m12, float m13, 18 | float m20, float m21, float m22, float m23, 19 | float m30, float m31, float m32, float m33); 20 | } -------------------------------------------------------------------------------- /ExtendCtrls/controls.extend/propgrid/colorpicker/SColorPicker.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "ColourPopup.h" 3 | 4 | namespace SOUI 5 | { 6 | DEF_EVT_EXT(EventColorChange,EVT_EXTERNAL_BEGIN+100,{ 7 | COLORREF crSel; 8 | }); 9 | 10 | class SColorPicker : 11 | public SButton , 12 | public IColorPicker 13 | { 14 | DEF_SOBJECT(SButton, L"colorpicker") 15 | 16 | public: 17 | SColorPicker(void); 18 | ~SColorPicker(void); 19 | 20 | COLORREF GetColor(){return m_crCur;} 21 | protected://IColorPicker 22 | virtual void OnColorChanged(COLORREF cr); 23 | virtual void OnColorEnd(BOOL bCancel,COLORREF cr); 24 | virtual IMessageLoop * GetMsgLoop(); 25 | protected: 26 | void OnPaint(IRenderTarget *pRT); 27 | void OnLButtonUp(UINT nFlags,CPoint pt); 28 | 29 | SOUI_MSG_MAP_BEGIN() 30 | MSG_WM_PAINT_EX(OnPaint) 31 | MSG_WM_LBUTTONUP(OnLButtonUp) 32 | SOUI_MSG_MAP_END() 33 | 34 | SOUI_ATTRS_BEGIN() 35 | ATTR_COLOR(L"color",m_crCur=m_crDef,TRUE) 36 | SOUI_ATTRS_END() 37 | 38 | COLORREF m_crDef; 39 | COLORREF m_crCur; 40 | }; 41 | 42 | } 43 | -------------------------------------------------------------------------------- /ExtendCtrls/controls.extend/propgrid/propitem/SPropertyItem-Group.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "SPropertyItem-Group.h" 3 | #include "../SPropertyGrid.h" 4 | 5 | namespace SOUI 6 | { 7 | SPropertyGroup::SPropertyGroup(SPropertyGrid *pOwner) :SPropertyItemBase(pOwner) 8 | { 9 | } 10 | 11 | void SPropertyGroup::DrawItem( IRenderTarget *pRT,CRect rc ) 12 | { 13 | pRT->FillSolidRect(rc,GetOwner()->GetGroupColor()); 14 | } 15 | 16 | void SPropertyGroup::ClearValue() 17 | { 18 | 19 | } 20 | 21 | BOOL SPropertyGroup::HasValue() const 22 | { 23 | return ChildrenCount()!=0; 24 | } 25 | 26 | void SPropertyGroup::OnChildValueChanged(IPropertyItem *pChild) 27 | { 28 | GetOwner()->OnItemValueChanged(pChild); 29 | } 30 | 31 | } -------------------------------------------------------------------------------- /ExtendCtrls/controls.extend/propgrid/propitem/SPropertyItem-Group.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../SPropertyItemBase.h" 3 | 4 | 5 | namespace SOUI{ 6 | 7 | class SPropertyGroup : public SPropertyItemBase 8 | { 9 | friend class SPropertyGrid; 10 | DEF_SOBJECT(SPropertyItemBase,L"propgroup") 11 | public: 12 | static LPCWSTR GetInplaceItemStyleName(){return NULL;} 13 | virtual PropType GetType() const {return PT_GROUP;} 14 | virtual void DrawItem(IRenderTarget *pRT,CRect rc); 15 | virtual BOOL HasValue() const ; 16 | virtual void ClearValue() ; 17 | virtual void OnChildValueChanged( IPropertyItem *pChild ); 18 | protected: 19 | SPropertyGroup(SPropertyGrid *pOwner); 20 | }; 21 | 22 | } -------------------------------------------------------------------------------- /ExtendCtrls/controls.extend/propgrid/propitem/SPropertyItem-Rect.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "SPropertyItem-Text.h" 4 | 5 | namespace SOUI 6 | { 7 | class SPropertyItemRect : public SPropertyItemText 8 | { 9 | friend class SPropertyGrid; 10 | DEF_SOBJECT(SPropertyItemText,L"proprect") 11 | 12 | enum{ 13 | CHILD_LEFT=1, 14 | CHILD_TOP, 15 | CHILD_RIGHT, 16 | CHILD_BOTTOM, 17 | }; 18 | public: 19 | static LPCWSTR GetInplaceItemStyleName(){return NULL;} 20 | 21 | virtual PropType GetType() const {return PT_SIZE;} 22 | virtual void SetValue(const SStringT & strValue); 23 | 24 | virtual SStringT GetValue() const; 25 | virtual void OnValueChanged(); 26 | virtual void OnChildValueChanged(IPropertyItem *pChild); 27 | 28 | RECT GetValue2() const{return m_rcValue;} 29 | virtual BOOL HasValue() const ; 30 | virtual void ClearValue() ; 31 | 32 | SOUI_ATTRS_BEGIN() 33 | ATTR_BOOL(L"digit",m_bDigit,FALSE) 34 | ATTR_CUSTOM(L"value",OnAttrValue) 35 | ATTR_CUSTOM(L"childrenTitles",OnAttrChildrenTitles) 36 | SOUI_ATTRS_END() 37 | 38 | protected: 39 | HRESULT OnAttrValue(const SStringW & strValue,BOOL bLoading); 40 | HRESULT OnAttrChildrenTitles(const SStringW & strValue,BOOL bLoading); 41 | 42 | BOOL m_bDigit; 43 | CRect m_rcValue; 44 | SStringT m_strValue[4]; 45 | BOOL m_bChildChanged; 46 | protected: 47 | SPropertyItemRect(SPropertyGrid *pOwner); 48 | }; 49 | } 50 | -------------------------------------------------------------------------------- /ExtendCtrls/controls.extend/propgrid/propitem/SPropertyItem-Size.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "SPropertyItem-Text.h" 4 | 5 | namespace SOUI 6 | { 7 | class SPropertyItemSize : public SPropertyItemText 8 | { 9 | friend class SPropertyGrid; 10 | DEF_SOBJECT(SPropertyItemText,L"propsize") 11 | 12 | enum{ 13 | CHILD_WIDTH=1, 14 | CHILD_HEIGHT=2 15 | }; 16 | public: 17 | static LPCWSTR GetInplaceItemStyleName(){return NULL;} 18 | 19 | virtual PropType GetType() const {return PT_SIZE;} 20 | virtual void SetValue(const SStringT & strValue); 21 | 22 | virtual SStringT GetValue() const; 23 | virtual void OnValueChanged(); 24 | virtual void OnChildValueChanged(IPropertyItem *pChild); 25 | 26 | SIZE GetValue2() const{return m_szValue;} 27 | virtual BOOL HasValue() const ; 28 | virtual void ClearValue() ; 29 | 30 | SOUI_ATTRS_BEGIN() 31 | ATTR_BOOL(L"digit",m_bDigit,FALSE) 32 | ATTR_CUSTOM(L"value",OnAttrValue) 33 | ATTR_CUSTOM(L"childrenTitles",OnAttrChildrenTitles) 34 | SOUI_ATTRS_END() 35 | 36 | protected: 37 | HRESULT OnAttrValue(const SStringW & strValue,BOOL bLoading); 38 | HRESULT OnAttrChildrenTitles(const SStringW & strValue,BOOL bLoading); 39 | 40 | SIZE m_szValue; 41 | SStringT m_strValue[2]; 42 | BOOL m_bDigit; 43 | BOOL m_bChildChanged; 44 | protected: 45 | SPropertyItemSize(SPropertyGrid *pOwner); 46 | }; 47 | } 48 | -------------------------------------------------------------------------------- /ExtendCtrls/controls.extend/propgrid/propitem/SPropertyItem-Text.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../SPropertyItemBase.h" 4 | 5 | namespace SOUI 6 | { 7 | class SPropertyItemText : public SPropertyItemBase 8 | { 9 | friend class SPropertyGrid; 10 | DEF_SOBJECT(SPropertyItemBase,L"proptext") 11 | public: 12 | static LPCWSTR GetInplaceItemStyleName(); 13 | 14 | virtual PropType GetType() const {return PT_TEXT;} 15 | 16 | virtual void SetValue(const SStringT & strValue); 17 | virtual SStringT GetValue() const {return m_strValue;} 18 | virtual BOOL HasButton() const; 19 | 20 | virtual void DrawItem(IRenderTarget *pRT,CRect rc); 21 | virtual BOOL HasValue() const ; 22 | virtual void ClearValue() ; 23 | 24 | void OnValueChanged() override; 25 | 26 | SOUI_ATTRS_BEGIN() 27 | ATTR_STRINGT(L"value",m_strValue,TRUE) 28 | ATTR_BOOL(L"hasButton",m_hasButton,TRUE) 29 | SOUI_ATTRS_END() 30 | 31 | protected: 32 | virtual void OnInplaceActive(BOOL bActive); 33 | protected: 34 | SStringT m_strValue; 35 | BOOL m_hasButton; 36 | SEdit * m_pEdit; 37 | protected: 38 | SPropertyItemText(SPropertyGrid *pOwner); 39 | }; 40 | } 41 | -------------------------------------------------------------------------------- /ExtendCtrls/controls.extend/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/ExtendCtrls/controls.extend/readme.txt -------------------------------------------------------------------------------- /ExtendCtrls/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #define _CRT_SECURE_NO_WARNINGS 9 | #define DLL_SOUI 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 setoutsoft 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Scintilla/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # 1394020320@qq.com 3 | # 4 | 5 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src) 6 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) 7 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/lexlib) 8 | 9 | file(GLOB_RECURSE CURRENT_HEADERS *.h *.hpp) 10 | file(GLOB_RECURSE CURRENT_SRCS *.cxx) 11 | file(GLOB_RECURSE CURRENT_RC *.rc *.rc2) 12 | 13 | source_group("Header Files" FILES ${CURRENT_HEADERS}) 14 | source_group("Source Files" FILES ${CURRENT_SRCS}) 15 | source_group("Resource Files" FILES ${CURRENT_RC}) 16 | 17 | add_definitions(-DSTATIC_BUILD -D_CRT_SECURE_NO_WARNINGS) 18 | 19 | add_library(Scintilla STATIC ${CURRENT_HEADERS} ${CURRENT_SRCS} ${CURRENT_RC}) 20 | -------------------------------------------------------------------------------- /Scintilla/License.txt: -------------------------------------------------------------------------------- 1 | License for Scintilla and SciTE 2 | 3 | Copyright 1998-2003 by Neil Hodgson 4 | 5 | All Rights Reserved 6 | 7 | Permission to use, copy, modify, and distribute this software and its 8 | documentation for any purpose and without fee is hereby granted, 9 | provided that the above copyright notice appear in all copies and that 10 | both that copyright notice and this permission notice appear in 11 | supporting documentation. 12 | 13 | NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 14 | SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 15 | AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY 16 | SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 17 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 18 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 19 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE 20 | OR PERFORMANCE OF THIS SOFTWARE. -------------------------------------------------------------------------------- /Scintilla/include/Sci_Position.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file Sci_Position.h 3 | ** Define the Sci_Position type used in Scintilla's external interfaces. 4 | ** These need to be available to clients written in C so are not in a C++ namespace. 5 | **/ 6 | // Copyright 2015 by Neil Hodgson 7 | // The License.txt file describes the conditions under which this software may be distributed. 8 | 9 | #ifndef SCI_POSITION_H 10 | #define SCI_POSITION_H 11 | 12 | // Basic signed type used throughout interface 13 | typedef int Sci_Position; 14 | 15 | // Unsigned variant used for ILexer::Lex and ILexer::Fold 16 | typedef unsigned int Sci_PositionU; 17 | 18 | // For Sci_CharacterRange which is defined as long to be compatible with Win32 CHARRANGE 19 | typedef long Sci_PositionCR; 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /Scintilla/lexlib/Accessor.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file Accessor.h 3 | ** Interfaces between Scintilla and lexers. 4 | **/ 5 | // Copyright 1998-2010 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef ACCESSOR_H 9 | #define ACCESSOR_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | enum { wsSpace=1, wsTab=2, wsSpaceTab=4, wsInconsistent=8 }; 16 | 17 | class Accessor; 18 | class WordList; 19 | class PropSetSimple; 20 | 21 | typedef bool (*PFNIsCommentLeader)(Accessor &styler, Sci_Position pos, Sci_Position len); 22 | 23 | class Accessor : public LexAccessor { 24 | public: 25 | PropSetSimple *pprops; 26 | Accessor(IDocument *pAccess_, PropSetSimple *pprops_); 27 | int GetPropertyInt(const char *, int defaultValue=0) const; 28 | int IndentAmount(Sci_Position line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0); 29 | }; 30 | 31 | #ifdef SCI_NAMESPACE 32 | } 33 | #endif 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /Scintilla/lexlib/CharacterCategory.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file CharacterCategory.h 3 | ** Returns the Unicode general category of a character. 4 | **/ 5 | // Copyright 2013 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef CHARACTERCATEGORY_H 9 | #define CHARACTERCATEGORY_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | enum CharacterCategory { 16 | ccLu, ccLl, ccLt, ccLm, ccLo, 17 | ccMn, ccMc, ccMe, 18 | ccNd, ccNl, ccNo, 19 | ccPc, ccPd, ccPs, ccPe, ccPi, ccPf, ccPo, 20 | ccSm, ccSc, ccSk, ccSo, 21 | ccZs, ccZl, ccZp, 22 | ccCc, ccCf, ccCs, ccCo, ccCn 23 | }; 24 | 25 | CharacterCategory CategoriseCharacter(int character); 26 | 27 | #ifdef SCI_NAMESPACE 28 | } 29 | #endif 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /Scintilla/lexlib/CharacterSet.cxx: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file CharacterSet.cxx 3 | ** Simple case functions for ASCII. 4 | ** Lexer infrastructure. 5 | **/ 6 | // Copyright 1998-2010 by Neil Hodgson 7 | // The License.txt file describes the conditions under which this software may be distributed. 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "CharacterSet.h" 16 | 17 | #ifdef SCI_NAMESPACE 18 | using namespace Scintilla; 19 | #endif 20 | 21 | #ifdef SCI_NAMESPACE 22 | namespace Scintilla { 23 | #endif 24 | 25 | int CompareCaseInsensitive(const char *a, const char *b) { 26 | while (*a && *b) { 27 | if (*a != *b) { 28 | char upperA = MakeUpperCase(*a); 29 | char upperB = MakeUpperCase(*b); 30 | if (upperA != upperB) 31 | return upperA - upperB; 32 | } 33 | a++; 34 | b++; 35 | } 36 | // Either *a or *b is nul 37 | return *a - *b; 38 | } 39 | 40 | int CompareNCaseInsensitive(const char *a, const char *b, size_t len) { 41 | while (*a && *b && len) { 42 | if (*a != *b) { 43 | char upperA = MakeUpperCase(*a); 44 | char upperB = MakeUpperCase(*b); 45 | if (upperA != upperB) 46 | return upperA - upperB; 47 | } 48 | a++; 49 | b++; 50 | len--; 51 | } 52 | if (len == 0) 53 | return 0; 54 | else 55 | // Either *a or *b is nul 56 | return *a - *b; 57 | } 58 | 59 | #ifdef SCI_NAMESPACE 60 | } 61 | #endif 62 | -------------------------------------------------------------------------------- /Scintilla/lexlib/LexerBase.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file LexerBase.h 3 | ** A simple lexer with no state. 4 | **/ 5 | // Copyright 1998-2010 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef LEXERBASE_H 9 | #define LEXERBASE_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | // A simple lexer with no state 16 | class LexerBase : public ILexer { 17 | protected: 18 | PropSetSimple props; 19 | enum {numWordLists=KEYWORDSET_MAX+1}; 20 | WordList *keyWordLists[numWordLists+1]; 21 | public: 22 | LexerBase(); 23 | virtual ~LexerBase(); 24 | void SCI_METHOD Release(); 25 | int SCI_METHOD Version() const; 26 | const char * SCI_METHOD PropertyNames(); 27 | int SCI_METHOD PropertyType(const char *name); 28 | const char * SCI_METHOD DescribeProperty(const char *name); 29 | Sci_Position SCI_METHOD PropertySet(const char *key, const char *val); 30 | const char * SCI_METHOD DescribeWordListSets(); 31 | Sci_Position SCI_METHOD WordListSet(int n, const char *wl); 32 | void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) = 0; 33 | void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) = 0; 34 | void * SCI_METHOD PrivateCall(int operation, void *pointer); 35 | }; 36 | 37 | #ifdef SCI_NAMESPACE 38 | } 39 | #endif 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /Scintilla/lexlib/LexerNoExceptions.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file LexerNoExceptions.h 3 | ** A simple lexer with no state. 4 | **/ 5 | // Copyright 1998-2010 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef LEXERNOEXCEPTIONS_H 9 | #define LEXERNOEXCEPTIONS_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | // A simple lexer with no state 16 | class LexerNoExceptions : public LexerBase { 17 | public: 18 | // TODO Also need to prevent exceptions in constructor and destructor 19 | Sci_Position SCI_METHOD PropertySet(const char *key, const char *val); 20 | Sci_Position SCI_METHOD WordListSet(int n, const char *wl); 21 | void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess); 22 | void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *); 23 | 24 | virtual void Lexer(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess, Accessor &styler) = 0; 25 | virtual void Folder(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess, Accessor &styler) = 0; 26 | }; 27 | 28 | #ifdef SCI_NAMESPACE 29 | } 30 | #endif 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /Scintilla/lexlib/LexerSimple.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file LexerSimple.h 3 | ** A simple lexer with no state. 4 | **/ 5 | // Copyright 1998-2010 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef LEXERSIMPLE_H 9 | #define LEXERSIMPLE_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | // A simple lexer with no state 16 | class LexerSimple : public LexerBase { 17 | const LexerModule *module; 18 | std::string wordLists; 19 | public: 20 | explicit LexerSimple(const LexerModule *module_); 21 | const char * SCI_METHOD DescribeWordListSets(); 22 | void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess); 23 | void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess); 24 | }; 25 | 26 | #ifdef SCI_NAMESPACE 27 | } 28 | #endif 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /Scintilla/lexlib/PropSetSimple.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file PropSetSimple.h 3 | ** A basic string to string map. 4 | **/ 5 | // Copyright 1998-2009 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef PROPSETSIMPLE_H 9 | #define PROPSETSIMPLE_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | class PropSetSimple { 16 | void *impl; 17 | void Set(const char *keyVal); 18 | public: 19 | PropSetSimple(); 20 | virtual ~PropSetSimple(); 21 | void Set(const char *key, const char *val, int lenKey=-1, int lenVal=-1); 22 | void SetMultiple(const char *); 23 | const char *Get(const char *key) const; 24 | int GetExpanded(const char *key, char *result) const; 25 | int GetInt(const char *key, int defaultValue=0) const; 26 | }; 27 | 28 | #ifdef SCI_NAMESPACE 29 | } 30 | #endif 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /Scintilla/lexlib/StringCopy.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file StringCopy.h 3 | ** Safe string copy function which always NUL terminates. 4 | ** ELEMENTS macro for determining array sizes. 5 | **/ 6 | // Copyright 2013 by Neil Hodgson 7 | // The License.txt file describes the conditions under which this software may be distributed. 8 | 9 | #ifndef STRINGCOPY_H 10 | #define STRINGCOPY_H 11 | 12 | #ifdef SCI_NAMESPACE 13 | namespace Scintilla { 14 | #endif 15 | 16 | // Safer version of string copy functions like strcpy, wcsncpy, etc. 17 | // Instantiate over fixed length strings of both char and wchar_t. 18 | // May truncate if source doesn't fit into dest with room for NUL. 19 | 20 | template 21 | void StringCopy(T (&dest)[count], const T* source) { 22 | for (size_t i=0; i 6 | // This file is in the public domain. 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | #include "ILexer.h" 15 | 16 | #include "LexAccessor.h" 17 | #include "Accessor.h" 18 | #include "StyleContext.h" 19 | 20 | #ifdef SCI_NAMESPACE 21 | using namespace Scintilla; 22 | #endif 23 | 24 | static void getRange(Sci_PositionU start, 25 | Sci_PositionU end, 26 | LexAccessor &styler, 27 | char *s, 28 | Sci_PositionU len) { 29 | Sci_PositionU i = 0; 30 | while ((i < end - start + 1) && (i < len-1)) { 31 | s[i] = styler[start + i]; 32 | i++; 33 | } 34 | s[i] = '\0'; 35 | } 36 | 37 | void StyleContext::GetCurrent(char *s, Sci_PositionU len) { 38 | getRange(styler.GetStartSegment(), currentPos - 1, styler, s, len); 39 | } 40 | 41 | static void getRangeLowered(Sci_PositionU start, 42 | Sci_PositionU end, 43 | LexAccessor &styler, 44 | char *s, 45 | Sci_PositionU len) { 46 | Sci_PositionU i = 0; 47 | while ((i < end - start + 1) && (i < len-1)) { 48 | s[i] = static_cast(tolower(styler[start + i])); 49 | i++; 50 | } 51 | s[i] = '\0'; 52 | } 53 | 54 | void StyleContext::GetCurrentLowered(char *s, Sci_PositionU len) { 55 | getRangeLowered(styler.GetStartSegment(), currentPos - 1, styler, s, len); 56 | } 57 | -------------------------------------------------------------------------------- /Scintilla/lexlib/WordList.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file WordList.h 3 | ** Hold a list of words. 4 | **/ 5 | // Copyright 1998-2010 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef WORDLIST_H 9 | #define WORDLIST_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | /** 16 | */ 17 | class WordList { 18 | // Each word contains at least one character - a empty word acts as sentinel at the end. 19 | char **words; 20 | char *list; 21 | int len; 22 | bool onlyLineEnds; ///< Delimited by any white space or only line ends 23 | int starts[256]; 24 | public: 25 | explicit WordList(bool onlyLineEnds_ = false); 26 | ~WordList(); 27 | operator bool() const; 28 | bool operator!=(const WordList &other) const; 29 | int Length() const; 30 | void Clear(); 31 | void Set(const char *s); 32 | bool InList(const char *s) const; 33 | bool InListAbbreviated(const char *s, const char marker) const; 34 | const char *WordAt(int n) const; 35 | }; 36 | 37 | #ifdef SCI_NAMESPACE 38 | } 39 | #endif 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /Scintilla/src/CaseFolder.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file CaseFolder.h 3 | ** Classes for case folding. 4 | **/ 5 | // Copyright 1998-2013 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef CASEFOLDER_H 9 | #define CASEFOLDER_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | class CaseFolder { 16 | public: 17 | virtual ~CaseFolder(); 18 | virtual size_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) = 0; 19 | }; 20 | 21 | class CaseFolderTable : public CaseFolder { 22 | protected: 23 | char mapping[256]; 24 | public: 25 | CaseFolderTable(); 26 | virtual ~CaseFolderTable(); 27 | virtual size_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed); 28 | void SetTranslation(char ch, char chTranslation); 29 | void StandardASCII(); 30 | }; 31 | 32 | class ICaseConverter; 33 | 34 | class CaseFolderUnicode : public CaseFolderTable { 35 | ICaseConverter *converter; 36 | public: 37 | CaseFolderUnicode(); 38 | virtual size_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed); 39 | }; 40 | 41 | #ifdef SCI_NAMESPACE 42 | } 43 | #endif 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /Scintilla/src/Catalogue.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file Catalogue.h 3 | ** Lexer infrastructure. 4 | **/ 5 | // Copyright 1998-2010 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef CATALOGUE_H 9 | #define CATALOGUE_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | class Catalogue { 16 | public: 17 | static const LexerModule *Find(int language); 18 | static const LexerModule *Find(const char *languageName); 19 | static void AddLexerModule(LexerModule *plm); 20 | }; 21 | 22 | #ifdef SCI_NAMESPACE 23 | } 24 | #endif 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /Scintilla/src/CharClassify.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file CharClassify.h 3 | ** Character classifications used by Document and RESearch. 4 | **/ 5 | // Copyright 2006-2009 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef CHARCLASSIFY_H 9 | #define CHARCLASSIFY_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | class CharClassify { 16 | public: 17 | CharClassify(); 18 | 19 | enum cc { ccSpace, ccNewLine, ccWord, ccPunctuation }; 20 | void SetDefaultCharClasses(bool includeWordClass); 21 | void SetCharClasses(const unsigned char *chars, cc newCharClass); 22 | int GetCharsOfClass(cc charClass, unsigned char *buffer); 23 | cc GetClass(unsigned char ch) const { return static_cast(charClass[ch]);} 24 | bool IsWord(unsigned char ch) const { return static_cast(charClass[ch]) == ccWord;} 25 | 26 | private: 27 | enum { maxChar=256 }; 28 | unsigned char charClass[maxChar]; // not type cc to save space 29 | }; 30 | 31 | #ifdef SCI_NAMESPACE 32 | } 33 | #endif 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /Scintilla/src/FontQuality.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file FontQuality.h 3 | ** Definitions to control font anti-aliasing. 4 | ** Redefine constants from Scintilla.h to avoid including Scintilla.h in PlatWin.cxx. 5 | **/ 6 | // Copyright 1998-2009 by Neil Hodgson 7 | // The License.txt file describes the conditions under which this software may be distributed. 8 | 9 | #ifndef FONTQUALITY_H 10 | #define FONTQUALITY_H 11 | 12 | #ifdef SCI_NAMESPACE 13 | namespace Scintilla { 14 | #endif 15 | 16 | // These definitions match Scintilla.h 17 | #define SC_EFF_QUALITY_MASK 0xF 18 | #define SC_EFF_QUALITY_DEFAULT 0 19 | #define SC_EFF_QUALITY_NON_ANTIALIASED 1 20 | #define SC_EFF_QUALITY_ANTIALIASED 2 21 | #define SC_EFF_QUALITY_LCD_OPTIMIZED 3 22 | 23 | // These definitions must match SC_TECHNOLOGY_* in Scintilla.h 24 | #define SCWIN_TECH_GDI 0 25 | #define SCWIN_TECH_DIRECTWRITE 1 26 | 27 | #ifdef SCI_NAMESPACE 28 | } 29 | #endif 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /Scintilla/src/Position.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file Position.h 3 | ** Defines global type name Position in the Sci internal namespace. 4 | **/ 5 | // Copyright 2015 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef POSITION_H 9 | #define POSITION_H 10 | 11 | /** 12 | * A Position is a position within a document between two characters or at the beginning or end. 13 | * Sometimes used as a character index where it identifies the character after the position. 14 | */ 15 | 16 | namespace Sci { 17 | 18 | typedef int Position; 19 | 20 | // A later version (4.x) of this file may: 21 | //#if defined(SCI_LARGE_FILE_SUPPORT) 22 | //typedef std::ptrdiff_t Position; 23 | // or may allow runtime choice between different position sizes. 24 | 25 | const Position invalidPosition = -1; 26 | 27 | } 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /Scintilla/src/UnicodeFromUTF8.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file UnicodeFromUTF8.h 3 | ** Lexer infrastructure. 4 | **/ 5 | // Copyright 2013 by Neil Hodgson 6 | // This file is in the public domain. 7 | 8 | #ifndef UNICODEFROMUTF8_H 9 | #define UNICODEFROMUTF8_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | inline int UnicodeFromUTF8(const unsigned char *us) { 16 | if (us[0] < 0xC2) { 17 | return us[0]; 18 | } else if (us[0] < 0xE0) { 19 | return ((us[0] & 0x1F) << 6) + (us[1] & 0x3F); 20 | } else if (us[0] < 0xF0) { 21 | return ((us[0] & 0xF) << 12) + ((us[1] & 0x3F) << 6) + (us[2] & 0x3F); 22 | } else if (us[0] < 0xF5) { 23 | return ((us[0] & 0x7) << 18) + ((us[1] & 0x3F) << 12) + ((us[2] & 0x3F) << 6) + (us[3] & 0x3F); 24 | } 25 | return us[0]; 26 | } 27 | 28 | #ifdef SCI_NAMESPACE 29 | } 30 | #endif 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /Scintilla/version.txt: -------------------------------------------------------------------------------- 1 | 365 2 | -------------------------------------------------------------------------------- /Scintilla/win32/HanjaDic.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file HanjaDic.h 3 | ** Korean Hanja Dictionary 4 | ** Convert between Korean Hanja and Hangul by COM interface. 5 | **/ 6 | // Copyright 2015 by Neil Hodgson 7 | // The License.txt file describes the conditions under which this software may be distributed. 8 | 9 | #ifndef HANJADIC_H 10 | #define HANJADIC_H 11 | 12 | #ifdef SCI_NAMESPACE 13 | namespace Scintilla { 14 | #endif 15 | 16 | namespace HanjaDict { 17 | 18 | int GetHangulOfHanja(wchar_t *inout); 19 | 20 | } 21 | 22 | #ifdef SCI_NAMESPACE 23 | } 24 | #endif 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /Scintilla/win32/PlatWin.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file PlatWin.h 3 | ** Implementation of platform facilities on Windows. 4 | **/ 5 | // Copyright 1998-2011 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef PLATWIN_H 9 | #define PLATWIN_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | extern void Platform_Initialise(void *hInstance); 16 | extern void Platform_Finalise(bool fromDllMain); 17 | 18 | #if defined(USE_D2D) 19 | extern bool LoadD2D(); 20 | extern ID2D1Factory *pD2DFactory; 21 | extern IDWriteFactory *pIDWriteFactory; 22 | #endif 23 | 24 | #ifdef SCI_NAMESPACE 25 | } 26 | #endif 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /Scintilla/win32/ScintRes.rc: -------------------------------------------------------------------------------- 1 | // Resource file for Scintilla 2 | // Copyright 1998-2010 by Neil Hodgson 3 | // The License.txt file describes the conditions under which this software may be distributed. 4 | 5 | #include 6 | 7 | #define VERSION_SCINTILLA "3.6.5" 8 | #define VERSION_WORDS 3, 6, 5, 0 9 | 10 | VS_VERSION_INFO VERSIONINFO 11 | FILEVERSION VERSION_WORDS 12 | PRODUCTVERSION VERSION_WORDS 13 | FILEFLAGSMASK 0x3fL 14 | FILEFLAGS 0 15 | FILEOS VOS_NT_WINDOWS32 16 | FILETYPE VFT_APP 17 | FILESUBTYPE VFT2_UNKNOWN 18 | BEGIN 19 | BLOCK "VarFileInfo" 20 | BEGIN 21 | VALUE "Translation", 0x409, 1200 22 | END 23 | BLOCK "StringFileInfo" 24 | BEGIN 25 | BLOCK "040904b0" 26 | BEGIN 27 | VALUE "CompanyName", "Neil Hodgson neilh@scintilla.org\0" 28 | VALUE "FileDescription", "Scintilla.DLL - a Source Editing Component\0" 29 | VALUE "FileVersion", VERSION_SCINTILLA "\0" 30 | VALUE "InternalName", "Scintilla\0" 31 | VALUE "LegalCopyright", "Copyright 1998-2012 by Neil Hodgson\0" 32 | VALUE "OriginalFilename", "Scintilla.DLL\0" 33 | VALUE "ProductName", "Scintilla\0" 34 | VALUE "ProductVersion", VERSION_SCINTILLA "\0" 35 | END 36 | END 37 | END 38 | -------------------------------------------------------------------------------- /Scintilla/win32/Scintilla.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | Scintilla_DirectFunction -------------------------------------------------------------------------------- /copy_files/soui-sys-resource.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/copy_files/soui-sys-resource.zip -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Debug/httpclient.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Debug/httpclient.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Debug/imgdecoder-gdip.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Debug/imgdecoder-gdip.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Debug/imgdecoder-stb.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Debug/imgdecoder-stb.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Debug/imgdecoder-wic.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Debug/imgdecoder-wic.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Debug/log4z.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Debug/log4z.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Debug/render-d2d.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Debug/render-d2d.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Debug/render-gdi.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Debug/render-gdi.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Debug/render-skia.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Debug/render-skia.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Debug/resprovider-7zip.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Debug/resprovider-7zip.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Debug/resprovider-zip.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Debug/resprovider-zip.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Debug/scriptmodule-lua.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Debug/scriptmodule-lua.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Debug/sipcobject.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Debug/sipcobject.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Debug/soui-sys-resource.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Debug/soui-sys-resource.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Debug/soui-sys-resource2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Debug/soui-sys-resource2.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Debug/soui4.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Debug/soui4.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Debug/taskloop.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Debug/taskloop.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Debug/translator.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Debug/translator.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Debug/utilities4.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Debug/utilities4.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Release/httpclient.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Release/httpclient.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Release/imgdecoder-gdip.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Release/imgdecoder-gdip.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Release/imgdecoder-stb.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Release/imgdecoder-stb.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Release/imgdecoder-wic.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Release/imgdecoder-wic.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Release/log4z.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Release/log4z.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Release/render-d2d.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Release/render-d2d.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Release/render-gdi.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Release/render-gdi.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Release/render-skia.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Release/render-skia.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Release/resprovider-7zip.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Release/resprovider-7zip.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Release/resprovider-zip.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Release/resprovider-zip.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Release/scriptmodule-lua.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Release/scriptmodule-lua.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Release/sipcobject.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Release/sipcobject.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Release/soui-sys-resource.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Release/soui-sys-resource.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Release/soui-sys-resource2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Release/soui-sys-resource2.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Release/soui4.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Release/soui4.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Release/taskloop.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Release/taskloop.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Release/translator.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Release/translator.dll -------------------------------------------------------------------------------- /depends/soui4/bin/Win32/Release/utilities4.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/Win32/Release/utilities4.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Debug/httpclient.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Debug/httpclient.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Debug/imgdecoder-gdip.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Debug/imgdecoder-gdip.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Debug/imgdecoder-stb.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Debug/imgdecoder-stb.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Debug/imgdecoder-wic.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Debug/imgdecoder-wic.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Debug/log4z.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Debug/log4z.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Debug/render-d2d.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Debug/render-d2d.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Debug/render-gdi.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Debug/render-gdi.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Debug/render-skia.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Debug/render-skia.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Debug/resprovider-7zip.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Debug/resprovider-7zip.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Debug/resprovider-zip.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Debug/resprovider-zip.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Debug/scriptmodule-lua.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Debug/scriptmodule-lua.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Debug/sipcobject.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Debug/sipcobject.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Debug/soui-sys-resource.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Debug/soui-sys-resource.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Debug/soui4.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Debug/soui4.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Debug/taskloop.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Debug/taskloop.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Debug/translator.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Debug/translator.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Debug/utilities4.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Debug/utilities4.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Release/httpclient.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Release/httpclient.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Release/imgdecoder-gdip.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Release/imgdecoder-gdip.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Release/imgdecoder-stb.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Release/imgdecoder-stb.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Release/imgdecoder-wic.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Release/imgdecoder-wic.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Release/log4z.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Release/log4z.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Release/render-d2d.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Release/render-d2d.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Release/render-gdi.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Release/render-gdi.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Release/render-skia.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Release/render-skia.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Release/resprovider-7zip.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Release/resprovider-7zip.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Release/resprovider-zip.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Release/resprovider-zip.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Release/scriptmodule-lua.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Release/scriptmodule-lua.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Release/sipcobject.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Release/sipcobject.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Release/soui-sys-resource.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Release/soui-sys-resource.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Release/soui-sys-resource2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Release/soui-sys-resource2.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Release/soui4.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Release/soui4.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Release/taskloop.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Release/taskloop.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Release/translator.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Release/translator.dll -------------------------------------------------------------------------------- /depends/soui4/bin/X64/Release/utilities4.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/bin/X64/Release/utilities4.dll -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/SGuidDef.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | #ifdef DEFINE_SGUID 6 | #undef DEFINE_SGUID 7 | #endif 8 | 9 | #ifdef DEFINE_SGUID2 10 | #undef DEFINE_SGUID2 11 | #endif 12 | 13 | #ifdef INITGUID 14 | #define DEFINE_SGUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ 15 | EXTERN_C const GUID SOUI_EXP name \ 16 | = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } 17 | #define DEFINE_SGUID2(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ 18 | EXTERN_C const GUID name \ 19 | = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } 20 | 21 | #else 22 | #define DEFINE_SGUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ 23 | EXTERN_C const GUID SOUI_EXP name 24 | #define DEFINE_SGUID2(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ 25 | EXTERN_C const GUID name 26 | #endif // INITGUID 27 | -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/SInitGuid.h: -------------------------------------------------------------------------------- 1 | #define INITGUID 2 | #include 3 | -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/SouiFactory.h: -------------------------------------------------------------------------------- 1 | #ifndef __SOUIFACTORY__H__ 2 | #define __SOUIFACTORY__H__ 3 | #include 4 | #include 5 | 6 | SNSBEGIN 7 | 8 | class SOUI_EXP SouiFactory : public TObjRefImpl { 9 | public: 10 | SouiFactory(void); 11 | ~SouiFactory(void); 12 | 13 | public: 14 | STDMETHOD_(IApplication *, CreateApp)(THIS_ IRenderFactory *pRenderFac,HMODULE hInst,LPCTSTR pszHostClassName DEF_VAL(_T("SOUIHOST")), BOOL bImeApp DEF_VAL(FALSE)) OVERRIDE; 15 | STDMETHOD_(INativeWnd *, CreateNativeWnd)(THIS) OVERRIDE; 16 | STDMETHOD_(IHostWnd *, CreateHostWnd)(THIS_ LPCTSTR pszResID DEF_VAL(NULL)) OVERRIDE; 17 | STDMETHOD_(IHostDialog *, CreateHostDialog)(THIS_ LPCTSTR pszResID DEF_VAL(NULL)) OVERRIDE; 18 | STDMETHOD_(IStringA *, CreateStringA)(THIS_ LPCSTR pszSrc) OVERRIDE; 19 | STDMETHOD_(IStringW *, CreateStringW)(THIS_ LPCWSTR pszSrc) OVERRIDE; 20 | STDMETHOD_(IXmlDoc *, CreateXmlDoc)(THIS) OVERRIDE; 21 | STDMETHOD_(IResProvider*, CreateResProvider)(THIS_ BUILTIN_RESTYPE resType) OVERRIDE; 22 | STDMETHOD_(IEvtSlot *, CreateFuncSlot)(THIS_ FunCallback fun, void *ctx) OVERRIDE; 23 | STDMETHOD_(IMenu*, CreateMenu)(THIS_ HMENU hMenu DEF_VAL(0)) OVERRIDE; 24 | STDMETHOD_(IMenuEx*,CreateMenuEx)(THIS) OVERRIDE; 25 | STDMETHOD_(ITimer*,CreateTimer)(THIS_ IEvtSlot *pEvtSlot) OVERRIDE; 26 | STDMETHOD_(IAnimatorGroup*,CreateAnimatorGroup)(THIS) OVERRIDE; 27 | 28 | }; 29 | 30 | SNSEND 31 | #endif // __SOUIFACTORY__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/control/SFrame.h: -------------------------------------------------------------------------------- 1 | #ifndef __SFRAME__H__ 2 | #define __SFRAME__H__ 3 | #include 4 | 5 | SNSBEGIN 6 | 7 | class SOUI_EXP SFrame : public SWindow { 8 | DEF_SOBJECT(SWindow, L"frame") 9 | public: 10 | SFrame(void); 11 | ~SFrame(void); 12 | 13 | public: 14 | STDMETHOD_(BOOL, IsFocusable)(THIS) SCONST OVERRIDE; 15 | 16 | protected: 17 | SWND SwndFromPoint(CPoint &pt, BOOL bIncludeMsgTransparent) const override; 18 | }; 19 | 20 | SNSEND 21 | #endif // __SFRAME__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/control/SMenuBar.h: -------------------------------------------------------------------------------- 1 | #ifndef __SMENUBAR__H__ 2 | #define __SMENUBAR__H__ 3 | 4 | #include 5 | #include 6 | 7 | SNSBEGIN 8 | 9 | class SMenuBarItem; 10 | 11 | class SOUI_EXP SMenuBar : public SWindow { 12 | DEF_SOBJECT(SWindow, L"menubar") 13 | friend class SMenuBarItem; 14 | 15 | public: 16 | SMenuBar(); 17 | ~SMenuBar(); 18 | 19 | BOOL Insert(LPCTSTR pszTitle, LPCTSTR pszResName, int iPos = -1); 20 | BOOL Insert(IXmlNode *pNode, int iPos = -1); 21 | 22 | SMenu *GetMenu(DWORD dwPos); 23 | 24 | int HitTest(CPoint pt); 25 | 26 | protected: 27 | SMenuBarItem *GetMenuItem(DWORD dwPos); 28 | virtual BOOL CreateChildren(SXmlNode xmlNode); 29 | 30 | static LRESULT CALLBACK MenuSwitch(int code, WPARAM wParam, LPARAM lParam); 31 | 32 | SArray m_lstMenuItem; 33 | HWND m_hWnd; 34 | SXmlDoc m_xmlStyle; 35 | BOOL m_bIsShow; 36 | SMenuBarItem *m_pNowMenu; 37 | int m_iNowMenu; 38 | CPoint m_ptMouse; 39 | 40 | static HHOOK m_hMsgHook; 41 | static SMenuBar *m_pMenuBar; 42 | }; 43 | 44 | SNSEND 45 | #endif // __SMENUBAR__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/control/SouiCtrls.h: -------------------------------------------------------------------------------- 1 | #ifndef __SOUICTRLS__H__ 2 | #define __SOUICTRLS__H__ 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #ifdef _WIN32 32 | #include 33 | #endif 34 | 35 | #endif // __SOUICTRLS__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/core/SDefine.h: -------------------------------------------------------------------------------- 1 | #ifndef __SDEFINE__H__ 2 | #define __SDEFINE__H__ 3 | 4 | // DISALLOW_COPY_AND_ASSIGN禁用拷贝和赋值构造函数. 5 | // 需要在类的private:访问控制域中使用. 6 | #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ 7 | TypeName(const TypeName &); \ 8 | void operator=(const TypeName &) 9 | 10 | #ifndef NOSMINMAX 11 | #ifndef smax 12 | #define smax(a, b) (((a) > (b)) ? (a) : (b)) 13 | #endif 14 | 15 | #ifndef smin 16 | #define smin(a, b) (((a) < (b)) ? (a) : (b)) 17 | #endif 18 | #endif 19 | 20 | #define sround(x) ((int)(x + 0.5f)) 21 | 22 | #ifndef GET_X_LPARAM 23 | #define GET_X_LPARAM(lParam) ((int)(short)LOWORD(lParam)) 24 | #endif 25 | #ifndef GET_Y_LPARAM 26 | #define GET_Y_LPARAM(lParam) ((int)(short)HIWORD(lParam)) 27 | #endif 28 | 29 | #ifdef _DISABLE_NO_VTABLE 30 | #define S_NO_VTABLE 31 | #else 32 | #define S_NO_VTABLE __declspec(novtable) 33 | #endif 34 | 35 | // SWindow Handle 36 | typedef DWORD SWND; 37 | typedef ULONG_PTR HSTREEITEM; 38 | 39 | #endif // __SDEFINE__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/core/SGradient.h: -------------------------------------------------------------------------------- 1 | #ifndef _SGRADIENT_H_ 2 | #define _SGRADIENT_H_ 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | SNSBEGIN 10 | class SOUI_EXP SGradient : public TObjRefImpl> { 11 | DEF_SOBJECT(SObjectImpl, L"gradient") 12 | public: 13 | SGradient(); 14 | 15 | public: 16 | STDMETHOD_(const GradientItem *, GetGradientData)(CTHIS) SCONST OVERRIDE; 17 | 18 | STDMETHOD_(int, GetGradientLength)(CTHIS) SCONST OVERRIDE; 19 | 20 | protected: 21 | STDMETHOD_(void, OnInitFinished)(THIS_ IXmlNode *pNode) OVERRIDE; 22 | 23 | public: 24 | SOUI_ATTRS_BEGIN() 25 | ATTR_CUSTOM(L"colors", OnAttrColors) 26 | SOUI_ATTRS_END() 27 | protected: 28 | HRESULT OnAttrColors(const SStringW &value, BOOL bLoading); 29 | int LoadColorTable(IXmlNode *xmlNode); 30 | 31 | protected: 32 | SArray m_arrGradient; 33 | }; 34 | 35 | SNSEND 36 | 37 | #endif //_SGRADIENT_H_ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/core/SSingleton.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014-2050 3 | * All rights reserved. 4 | * 5 | * @file SSingleton.h 6 | * @brief 7 | * @version v1.0 8 | * @author SOUI group 9 | * @date 2014/08/02 10 | * 11 | * Describe SOUI系统中使用的单件模块 12 | */ 13 | 14 | #ifndef __SSINGLETON__H__ 15 | #define __SSINGLETON__H__ 16 | 17 | #include 18 | 19 | SNSBEGIN 20 | 21 | /** 22 | * @class SSingleton 23 | * @brief 单件模板 24 | * 25 | * Describe 26 | */ 27 | template 28 | class SSingleton { 29 | protected: 30 | static T *ms_Singleton; 31 | 32 | public: 33 | SSingleton(void) 34 | { 35 | assert(!ms_Singleton); 36 | ms_Singleton = static_cast(this); 37 | } 38 | virtual ~SSingleton(void) 39 | { 40 | assert(ms_Singleton); 41 | ms_Singleton = 0; 42 | } 43 | static T &getSingleton(void) 44 | { 45 | assert(ms_Singleton); 46 | return (*ms_Singleton); 47 | } 48 | static T *getSingletonPtr(void) 49 | { 50 | return (ms_Singleton); 51 | } 52 | 53 | private: 54 | SSingleton &operator=(const SSingleton &) 55 | { 56 | return *this; 57 | } 58 | SSingleton(const SSingleton &) 59 | { 60 | } 61 | }; 62 | 63 | SNSEND 64 | #endif // __SSINGLETON__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/core/SSingletonMap.h: -------------------------------------------------------------------------------- 1 | #ifndef __SSINGLETONMAP__H__ 2 | #define __SSINGLETONMAP__H__ 3 | #include "SSingleton2.h" 4 | #include "SCmnMap.h" 5 | SNSBEGIN 6 | 7 | template 8 | class SSingletonMap 9 | : public SSingleton2 10 | , public SCmnMap { 11 | }; 12 | 13 | SNSEND 14 | #endif // __SSINGLETONMAP__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/core/STimerlineHandlerMgr.h: -------------------------------------------------------------------------------- 1 | #ifndef __STIMERLINEHANDLERMGR__H__ 2 | #define __STIMERLINEHANDLERMGR__H__ 3 | 4 | #include 5 | #include 6 | 7 | SNSBEGIN 8 | 9 | class STimerlineHandlerMgr : public ITimelineHandler { 10 | public: 11 | STimerlineHandlerMgr(void); 12 | ~STimerlineHandlerMgr(void); 13 | 14 | bool RegisterTimelineHandler(ITimelineHandler *pHandler); 15 | 16 | bool UnregisterTimelineHandler(ITimelineHandler *pHandler); 17 | 18 | bool IsEmpty() const; 19 | 20 | public: 21 | STDMETHOD_(void, OnNextFrame)(THIS_) OVERRIDE; 22 | 23 | protected: 24 | typedef SMap TLMAP; 25 | TLMAP m_mapHandlers; 26 | }; 27 | 28 | SNSEND 29 | 30 | #endif // __STIMERLINEHANDLERMGR__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/core/SWindowMgr.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014-2050 3 | * All rights reserved. 4 | * 5 | * @file SWindowMgr.h 6 | * @brief 7 | * @version v1.0 8 | * @author SOUI group 9 | * @date 2014/08/02 10 | * 11 | * Describe SOUI系统中的DUI窗口管理模块 12 | */ 13 | 14 | #ifndef __SWINDOWMGR__H__ 15 | #define __SWINDOWMGR__H__ 16 | #include 17 | #include 18 | #include 19 | 20 | SNSBEGIN 21 | 22 | class SWindow; 23 | 24 | class SOUI_EXP SWindowMgr : public SSingletonMap { 25 | SINGLETON2_TYPE(SINGLETON_SWNDMGR) 26 | public: 27 | enum 28 | { 29 | SWND_INVALID = 0 30 | }; 31 | 32 | SWindowMgr(); 33 | 34 | ~SWindowMgr(); 35 | 36 | // Get SWindow pointer from handle 37 | static SWindow *GetWindow(SWND swnd); 38 | 39 | static bool IsWindow(SWND swnd); 40 | 41 | // Specify a handle to a SWindow 42 | static SWND NewWindow(SWindow *pWnd); 43 | 44 | // Destroy SWindow 45 | static BOOL DestroyWindow(SWND swnd); 46 | 47 | protected: 48 | SCriticalSection m_lockWndMap; 49 | 50 | SWND m_hNextWnd; 51 | }; 52 | 53 | SNSEND 54 | #endif // __SWINDOWMGR__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/helper/SAppDir.h: -------------------------------------------------------------------------------- 1 | #ifndef __SAPPDIR__H__ 2 | #define __SAPPDIR__H__ 3 | 4 | SNSBEGIN 5 | class SOUI_EXP SAppDir { 6 | public: 7 | SAppDir(HINSTANCE hInst); 8 | 9 | const SStringT &AppDir(); 10 | 11 | protected: 12 | SStringT m_strAppPath; 13 | }; 14 | 15 | SNSEND 16 | 17 | #endif // __SAPPDIR__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/helper/SAssertFmt.h: -------------------------------------------------------------------------------- 1 | #ifndef __SASSERTFMT__H__ 2 | #define __SASSERTFMT__H__ 3 | 4 | #ifdef _DEBUG 5 | #include 6 | #define SASSERT_FMTW(expr, format, ...) (void)((!!(expr)) || (1 != _CrtDbgReportW(_CRT_ASSERT, _CRT_WIDE(__FILE__), __LINE__, NULL, format, __VA_ARGS__)) || (_CrtDbgBreak(), 0)) 7 | 8 | #define SASSERT_FMTA(expr, format, ...) (void)((!!(expr)) || (1 != _CrtDbgReport(_CRT_ASSERT, __FILE__, __LINE__, NULL, format, __VA_ARGS__)) || (_CrtDbgBreak(), 0)) 9 | 10 | #define SASSERT_MSGW(expr, msg) (void)((!!(expr)) || (1 != _CrtDbgReportW(_CRT_ASSERT, _CRT_WIDE(__FILE__), __LINE__, NULL, msg)) || (_CrtDbgBreak(), 0)) 11 | 12 | #define SASSERT_MSGA(expr, msg) (void)((!!(expr)) || (1 != _CrtDbgReport(_CRT_ASSERT, __FILE__, __LINE__, NULL, msg)) || (_CrtDbgBreak(), 0)) 13 | #else 14 | #define SASSERT_FMTW(expr, format, ...) \ 15 | if (!(expr)) \ 16 | SSLOGFMTW(format, ##__VA_ARGS__); 17 | 18 | #define SASSERT_FMTA(expr, format, ...) \ 19 | if (!(expr)) \ 20 | SSLOGFMTW(format, ##__VA_ARGS__); 21 | 22 | #define SASSERT_MSGA(expr, msg) \ 23 | if (!(expr)) \ 24 | SSLOGW() << msg; 25 | 26 | #define SASSERT_MSGW(expr, msg) SASSERT_MSGA(expr, msg) 27 | #endif 28 | 29 | #ifdef _UNICODE 30 | #define SASSERT_FMT SASSERT_FMTW 31 | #define SASSERT_MSG SASSERT_MSGW 32 | #else 33 | #define SASSERT_FMT SASSERT_FMTA 34 | #define SASSERT_MSG SASSERT_MSGA 35 | #endif //_UNICODE 36 | #endif // __SASSERTFMT__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/helper/SDIBHelper.h: -------------------------------------------------------------------------------- 1 | #ifndef __SDIBHELPER__H__ 2 | #define __SDIBHELPER__H__ 3 | 4 | #include "interface/SRender-i.h" 5 | 6 | SNSBEGIN 7 | /// 8 | /// 简洁版本,简版去掉了对8、16、24位的支持, 9 | /// 10 | class SOUI_EXP SDIBHelper { 11 | public: 12 | static bool Colorize(IBitmapS *pBmp, COLORREF crRef); 13 | 14 | static bool Colorize(COLORREF &crTarget, COLORREF crRef); 15 | 16 | static bool GrayImage(IBitmapS *pBmp); 17 | 18 | //计算图片的平均色 19 | // IBitmap *pBmp:图片源 20 | // int nPercent:有效值百分比,90代表最高和最低5%的值会丢掉,不参与平均。 21 | // int int nBlockSize:分块大小, 每次计算一个块的颜色平均值。 22 | static COLORREF CalcAvarageColor(IBitmapS *pBmp, int nPercent = 90, int nBlockSize = 5); 23 | }; 24 | 25 | SNSEND 26 | #endif // __SDIBHELPER__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/helper/SDpiScale.h: -------------------------------------------------------------------------------- 1 | #ifndef __SDPISCALE__H__ 2 | #define __SDPISCALE__H__ 3 | SNSBEGIN 4 | class SOUI_EXP SDpiScale { 5 | public: 6 | static int GetBuiltinScaleCount(); 7 | 8 | static const int *GetBuiltinScales(); 9 | 10 | /** 11 | * NormalizeScale 12 | * @brief 标准化放大比例, 选择比自己指定比例小一号的比例 13 | * @param [in] nScale -- input scale 14 | * @return int -- normalized scale 15 | * 16 | * Describe 17 | */ 18 | static int NormalizeScale(int nScale); 19 | }; 20 | 21 | SNSEND 22 | 23 | #endif // __SDPISCALE__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/helper/SDragWnd.h: -------------------------------------------------------------------------------- 1 | #ifndef __SDRAGWND__H__ 2 | #define __SDRAGWND__H__ 3 | 4 | #include 5 | 6 | SNSBEGIN 7 | 8 | class SDragWnd : public SNativeWnd { 9 | public: 10 | SDragWnd(void); 11 | ~SDragWnd(void); 12 | 13 | static BOOL BeginDrag(HBITMAP hBmp, POINT ptHot, COLORREF crKey, BYTE byAlpha, DWORD dwFlags); 14 | static void DragMove(POINT pt); 15 | static void EndDrag(); 16 | 17 | protected: 18 | void OnPaint(HDC dc); 19 | 20 | BEGIN_MSG_MAP_EX(SDragWnd) 21 | MSG_WM_PAINT(OnPaint) 22 | END_MSG_MAP() 23 | 24 | CPoint m_ptHot; 25 | HBITMAP m_bmp; 26 | 27 | static SDragWnd *s_pCurDragWnd; 28 | }; 29 | 30 | SNSEND 31 | 32 | #endif // __SDRAGWND__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/helper/SHostMgr.h: -------------------------------------------------------------------------------- 1 | #ifndef __SHOSTMGR__H__ 2 | #define __SHOSTMGR__H__ 3 | #include 4 | 5 | SNSBEGIN 6 | class SOUI_EXP SHostMgr : public SSingleton2 { 7 | SINGLETON2_TYPE(SINGLETON_HOSTMGR) 8 | friend class SHostWnd; 9 | 10 | public: 11 | SHostMgr(void); 12 | ~SHostMgr(void); 13 | 14 | void DispatchMessage(UINT uMsg, WPARAM wp = 0, LPARAM lp = 0); 15 | 16 | protected: 17 | bool AddHostMsgHandler(HWND hHost); 18 | 19 | bool RemoveHostMsgHandler(HWND hHost); 20 | 21 | protected: 22 | SMap m_mapHostMsgHandler; 23 | SCriticalSection m_cs; 24 | }; 25 | SNSEND 26 | 27 | #endif // __SHOSTMGR__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/helper/SMemDC.h: -------------------------------------------------------------------------------- 1 | #ifndef __SMEMDC__H__ 2 | #define __SMEMDC__H__ 3 | 4 | SNSBEGIN 5 | 6 | class SOUI_EXP SMemDC { 7 | public: 8 | SMemDC(); 9 | SMemDC(HDC hdc, const CRect &rc); 10 | SMemDC(HDC hdc, HBITMAP hBmp); 11 | ~SMemDC(void); 12 | 13 | HBITMAP SelectBitmap(HBITMAP hBmp); 14 | 15 | BOOL HasBitmap() 16 | { 17 | return m_bHasBitmap; 18 | } 19 | 20 | void SetBitmapOwner(BOOL bOwner) 21 | { 22 | m_bBmpOwner = bOwner; 23 | } 24 | BOOL IsBitmapOwner() 25 | { 26 | return m_bBmpOwner; 27 | } 28 | 29 | void DeleteDC(); 30 | 31 | BOOL InitDC(HDC hdc, const CRect &rc); 32 | 33 | operator HDC() const 34 | { 35 | return m_hDC; 36 | } 37 | 38 | protected: 39 | HDC m_hDC; 40 | 41 | HBITMAP m_hOldBmp; 42 | BOOL m_bBmpOwner; 43 | BOOL m_bHasBitmap; 44 | }; 45 | 46 | SNSEND 47 | #endif // __SMEMDC__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/helper/STimer.h: -------------------------------------------------------------------------------- 1 | #ifndef __STIMER__H__ 2 | #define __STIMER__H__ 3 | #include 4 | #include 5 | 6 | SNSBEGIN 7 | 8 | class SOUI_EXP STimer : public TObjRefImpl { 9 | public: 10 | STimer(IEvtSlot *pSlot); 11 | ~STimer(void); 12 | 13 | public: 14 | STDMETHOD_(BOOL, StartTimer)(THIS_ int nElapse, BOOL bRepeat, LPARAM uData DEF_VAL(0)) OVERRIDE; 15 | 16 | STDMETHOD_(void, KillTimer)(THIS) OVERRIDE; 17 | 18 | private: 19 | UINT m_uTimerId; 20 | SAutoRefPtr m_evtSlot; 21 | }; 22 | 23 | SNSEND 24 | #endif // __STIMER__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/helper/STimerGenerator.h: -------------------------------------------------------------------------------- 1 | #ifndef __STIMERGENERATOR__H__ 2 | #define __STIMERGENERATOR__H__ 3 | 4 | #include "core/SSingletonMap.h" 5 | 6 | SNSBEGIN 7 | 8 | struct TIMERINFO 9 | { 10 | SAutoRefPtr pEvtSlot; 11 | BOOL bRepeat; 12 | LPARAM uData; 13 | }; 14 | 15 | class STimerGenerator : public SSingletonMap { 16 | SINGLETON2_TYPE(SINGLETON_TIMERGENERATOR) 17 | public: 18 | ~STimerGenerator(); 19 | 20 | UINT SetTimer(IEvtSlot *pEvtSlot, UINT nElapse, BOOL bRepeat, LPARAM uData); 21 | 22 | void ClearTimer(UINT_PTR uID); 23 | 24 | static VOID CALLBACK _TimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime); 25 | }; 26 | 27 | SNSEND 28 | #endif // __STIMERGENERATOR__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/helper/SToolTip.h: -------------------------------------------------------------------------------- 1 | #ifndef __STOOLTIP__H__ 2 | #define __STOOLTIP__H__ 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | SNSBEGIN 9 | class STipCtrl 10 | : public IToolTip 11 | , public SNativeWnd { 12 | public: 13 | STipCtrl(void); 14 | virtual ~STipCtrl(void); 15 | 16 | BOOL Create(); 17 | 18 | public: // IToolTip 19 | STDMETHOD_(BOOL, PreTranslateMessage)(THIS_ MSG *pMsg) OVERRIDE; 20 | 21 | STDMETHOD_(void, UpdateTip) 22 | (THIS_ const TIPID *id, RECT rc, LPCTSTR pszTip, int nScale) OVERRIDE; 23 | 24 | STDMETHOD_(void, ClearTip)(THIS) OVERRIDE; 25 | 26 | STDMETHOD_(void, RelayEvent)(THIS_ const MSG *pMsg) OVERRIDE; 27 | 28 | STDMETHOD_(void, SetToolTip)(THIS_ LPCRECT rc, UINT tipAlign, LPCTSTR pszTip, int nScale) OVERRIDE; 29 | 30 | protected: 31 | virtual void OnFinalMessage(HWND hWnd); 32 | 33 | void UpdateFont(int nScale); 34 | void OnTimer(UINT_PTR idEvent); 35 | void OnPaint(HDC dc); 36 | void ShowTip(BOOL bShow); 37 | 38 | BEGIN_MSG_MAP_EX(STipCtrl) 39 | MSG_WM_PAINT(OnPaint) 40 | MSG_WM_TIMER(OnTimer) 41 | REFLECT_NOTIFICATIONS_EX() 42 | END_MSG_MAP() 43 | 44 | protected: 45 | int m_nDelay; 46 | int m_nShowSpan; 47 | SStringT m_strTip; 48 | int m_nScale; 49 | CRect m_rcTarget; 50 | HFONT m_font; 51 | 52 | TIPID m_id; 53 | 54 | UINT m_tipAlign; 55 | }; 56 | SNSEND 57 | 58 | #endif // __STOOLTIP__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/helper/swndspy.h: -------------------------------------------------------------------------------- 1 | #ifndef __SWNDSPY__H__ 2 | #define __SWNDSPY__H__ 3 | 4 | #define SWND_MAX_NAME 250 5 | #define SWND_MAX_CLASS 50 6 | #define SWND_MAX_XML 5000 7 | 8 | #pragma pack(push, 1) 9 | struct SWNDINFO 10 | { 11 | DWORD swnd; 12 | RECT rcWnd; 13 | RECT rcClient; 14 | BOOL bVisible; 15 | int nID; 16 | wchar_t szName[SWND_MAX_NAME + 1]; 17 | wchar_t szClassName[SWND_MAX_CLASS + 1]; 18 | wchar_t szXmlStr[SWND_MAX_XML + 1]; 19 | }; 20 | #pragma pack(pop) 21 | #endif // __SWNDSPY__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/interface/SGradient-i.h: -------------------------------------------------------------------------------- 1 | #ifndef _GRADIENT_I_H_ 2 | #define _GRADIENT_I_H_ 3 | 4 | #include 5 | 6 | SNSBEGIN 7 | 8 | typedef struct _GradientItem 9 | { 10 | COLORREF cr; 11 | float pos; 12 | } GradientItem; 13 | 14 | #undef INTERFACE 15 | #define INTERFACE IGradient 16 | DECLARE_INTERFACE_(IGradient, IObject) 17 | { 18 | /** 19 | * @brief 添加引用 20 | * @return long -- 引用计数 21 | */ 22 | STDMETHOD_(long, AddRef)(THIS) PURE; 23 | 24 | /** 25 | * @brief 释放引用 26 | * @return long -- 引用计数 27 | */ 28 | STDMETHOD_(long, Release)(THIS) PURE; 29 | 30 | /** 31 | * @brief 释放对象 32 | * @return void 33 | */ 34 | STDMETHOD_(void, OnFinalRelease)(THIS) PURE; 35 | 36 | /** 37 | * @brief 获取渐变数据 38 | * @return const GradientItem* -- 渐变数据 39 | */ 40 | STDMETHOD_(const GradientItem *, GetGradientData)(CTHIS) SCONST PURE; 41 | 42 | /** 43 | * @brief 获取渐变长度 44 | * @return int -- 渐变长度 45 | */ 46 | STDMETHOD_(int, GetGradientLength)(CTHIS) SCONST PURE; 47 | }; 48 | 49 | SNSEND 50 | #endif //_GRADIENT_I_H_ 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/interface/SHostPresenter-i.h: -------------------------------------------------------------------------------- 1 | #ifndef __SHOSTPRESENTER_I__H__ 2 | #define __SHOSTPRESENTER_I__H__ 3 | #include 4 | #include 5 | SNSBEGIN 6 | 7 | #undef INTERFACE 8 | #define INTERFACE IHostPresenter 9 | DECLARE_INTERFACE_(IHostPresenter, IObjRef) 10 | { 11 | //!添加引用 12 | /*! 13 | */ 14 | STDMETHOD_(long, AddRef)(THIS) PURE; 15 | 16 | //!释放引用 17 | /*! 18 | */ 19 | STDMETHOD_(long, Release)(THIS) PURE; 20 | 21 | //!释放对象 22 | /*! 23 | */ 24 | STDMETHOD_(void, OnFinalRelease)(THIS) PURE; 25 | 26 | ////////////////////////////////////////////////////////////////////////// 27 | STDMETHOD_(void, OnHostCreate)(THIS) PURE; 28 | STDMETHOD_(void, OnHostDestroy)(THIS) PURE; 29 | STDMETHOD_(void, OnHostResize)(THIS_ SIZE szHost) PURE; 30 | STDMETHOD_(void, OnHostPresent)(THIS_ HDC hdc, IRenderTarget * pMemRT, LPCRECT rcDirty, BYTE byAlpha) PURE; 31 | }; 32 | 33 | SNSEND 34 | #endif // __SHOSTPRESENTER_I__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/interface/SMessageBox-i.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | SNSBEGIN 5 | 6 | EXTERN_C INT_PTR SOUI_EXP SMessageBox(HWND hWnd, LPCTSTR lpText, LPCTSTR lpCaption, UINT uType); 7 | 8 | SNSEND -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/interface/SNativeWnd-i.h: -------------------------------------------------------------------------------- 1 | #ifndef __SNATIVEWND_I__H__ 2 | #define __SNATIVEWND_I__H__ 3 | #include 4 | #include 5 | SNSBEGIN 6 | 7 | typedef BOOL (*FunMsgHandler)(const LPMSG pMsg, LRESULT *pRes, void *ctx); 8 | 9 | typedef struct _MsgHandlerInfo 10 | { 11 | FunMsgHandler fun; 12 | void *ctx; 13 | } MsgHandlerInfo; 14 | 15 | #undef INTERFACE 16 | #define INTERFACE INativeWnd 17 | DECLARE_INTERFACE_(INativeWnd, IObjRef){ 18 | #include "SNativeWndApi.h" 19 | }; 20 | 21 | SNSEND 22 | #endif // __SNATIVEWND_I__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/interface/SNativeWndApi.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/include/SOUI/include/interface/SNativeWndApi.h -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/interface/SNcPainter-i.h: -------------------------------------------------------------------------------- 1 | #ifndef __SNCPAINTER_I__H__ 2 | #define __SNCPAINTER_I__H__ 3 | #include 4 | 5 | SNSBEGIN 6 | 7 | #undef INTERFACE 8 | #define INTERFACE INcPainter 9 | DECLARE_INTERFACE_(INcPainter, IObject) 10 | { 11 | DEF_OBJ_BASE(INcPainter, Undef) 12 | #include 13 | 14 | //-------------------------------------------------------------------------------- 15 | 16 | /** 17 | * @brief 获取绘制非客户区的根窗口 18 | * @return IWindow *--root 19 | */ 20 | STDMETHOD_(IWindow *, GetRoot)(THIS) PURE; 21 | }; 22 | 23 | SNSEND 24 | #endif // __SNCPAINTER_I__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/interface/SObjFactory-i.h: -------------------------------------------------------------------------------- 1 | #ifndef __SOBJFACTORY_I__H__ 2 | #define __SOBJFACTORY_I__H__ 3 | #include 4 | SNSBEGIN 5 | 6 | #define MAX_OBJNAME 100 7 | 8 | typedef struct _SObjectInfo 9 | { 10 | wchar_t szName[MAX_OBJNAME]; 11 | LPCWSTR szAlise; 12 | int nType; 13 | } SObjectInfo; 14 | 15 | #undef INTERFACE 16 | #define INTERFACE IObjectFactory 17 | DECLARE_INTERFACE_(IObjectFactory, IObjRef) 18 | { 19 | /** 20 | * @brief 增加引用计数 21 | * @return 新引用计数 22 | */ 23 | STDMETHOD_(long, AddRef)(THIS) PURE; 24 | 25 | /** 26 | * @brief 减少引用计数 27 | * @return 新引用计数 28 | */ 29 | STDMETHOD_(long, Release)(THIS) PURE; 30 | 31 | /** 32 | * @brief 释放对象 33 | * @return void 34 | */ 35 | STDMETHOD_(void, OnFinalRelease)(THIS) PURE; 36 | 37 | STDMETHOD_(IObject *, NewObject)(CTHIS) SCONST PURE; 38 | STDMETHOD_(LPCWSTR, BaseClassName)(CTHIS) SCONST PURE; 39 | STDMETHOD_(SObjectInfo, GetObjectInfo)(CTHIS) SCONST PURE; 40 | STDMETHOD_(IObjectFactory *, Clone)(CTHIS) SCONST PURE; 41 | }; 42 | 43 | SNSEND 44 | #endif // __SOBJFACTORY_I__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/interface/SRunnable-i.h: -------------------------------------------------------------------------------- 1 | #ifndef __SRUNNABLE_I__H__ 2 | #define __SRUNNABLE_I__H__ 3 | #include 4 | 5 | SNSBEGIN 6 | 7 | #undef INTERFACE 8 | #define INTERFACE IRunnable 9 | DECLARE_INTERFACE_(IRunnable, IObjRef) 10 | { 11 | /** 12 | * @brief 增加引用计数 13 | * @return 新引用计数 14 | */ 15 | STDMETHOD_(long, AddRef)(THIS) PURE; 16 | 17 | /** 18 | * @brief 减少引用计数 19 | * @return 新引用计数 20 | */ 21 | STDMETHOD_(long, Release)(THIS) PURE; 22 | 23 | /** 24 | * @brief 释放对象 25 | * @return void 26 | */ 27 | STDMETHOD_(void, OnFinalRelease)(THIS) PURE; 28 | 29 | /** 30 | * @brief clone当前对象 31 | * @return IRunnable *--clone得到的新对象 32 | */ 33 | STDMETHOD_(IRunnable *, clone)(CTHIS) SCONST PURE; 34 | 35 | /** 36 | * @brief 运行该对象 37 | * @return 38 | */ 39 | STDMETHOD_(void, run)(THIS) PURE; 40 | 41 | /** 42 | * @brief 获取该Runnable的宿主 43 | * @return void *--宿主指针,对于FreeFunction对象,该值为NULL 44 | */ 45 | STDMETHOD_(void *, getObject)(THIS) PURE; 46 | 47 | /** 48 | * @brief 获取runnable的描述 49 | * @return const char *--描述 50 | */ 51 | STDMETHOD_(const char *, getClassInfo)(CTHIS) SCONST PURE; 52 | }; 53 | 54 | SNSEND 55 | #endif // __SRUNNABLE_I__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/interface/STimelineHandler-i.h: -------------------------------------------------------------------------------- 1 | #ifndef __STIMELINEHANDLER_I__H__ 2 | #define __STIMELINEHANDLER_I__H__ 3 | #include 4 | 5 | SNSBEGIN 6 | /** 7 | * @struct ITimelineHandler 8 | * @brief 时间轴处理接口 9 | * 10 | * Describe 11 | */ 12 | #undef INTERFACE 13 | #define INTERFACE ITimelineHandler 14 | DECLARE_INTERFACE(ITimelineHandler) 15 | { 16 | /** 17 | * @brief 下一个动画帧处理接口 18 | * @return 19 | */ 20 | STDMETHOD_(void, OnNextFrame)(THIS) PURE; 21 | }; 22 | 23 | #undef INTERFACE 24 | #define INTERFACE ITimelineHandlersMgr 25 | DECLARE_INTERFACE(ITimelineHandlersMgr) 26 | { 27 | /** 28 | * @brief 注册动画帧处理接口 29 | * @param pHandler ITimelineHandler *--动画帧处理接口 30 | * @return TRUE--成功 31 | */ 32 | STDMETHOD_(BOOL, RegisterTimelineHandler)(THIS_ ITimelineHandler * pHandler) PURE; 33 | 34 | /** 35 | * @brief 注销动画帧处理接口 36 | * @param pHandler ITimelineHandler *--动画帧处理接口 37 | * @return TRUE--成功 38 | */ 39 | STDMETHOD_(BOOL, UnregisterTimelineHandler)(THIS_ ITimelineHandler * pHandler) PURE; 40 | }; 41 | SNSEND 42 | #endif // __STIMELINEHANDLER_I__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/interface/STimer-i.h: -------------------------------------------------------------------------------- 1 | #ifndef __STIMER_I__H__ 2 | #define __STIMER_I__H__ 3 | #include 4 | #include 5 | 6 | SNSBEGIN 7 | 8 | #undef INTERFACE 9 | #define INTERFACE ITimer 10 | DECLARE_INTERFACE_(ITimer, IObjRef) 11 | { 12 | //!添加引用 13 | /*! 14 | */ 15 | STDMETHOD_(long, AddRef)(THIS) PURE; 16 | 17 | //!释放引用 18 | /*! 19 | */ 20 | STDMETHOD_(long, Release)(THIS) PURE; 21 | 22 | //!释放对象 23 | /*! 24 | */ 25 | STDMETHOD_(void, OnFinalRelease)(THIS) PURE; 26 | 27 | ////////////////////////////////////////////////////////////////////////// 28 | 29 | /** 30 | * StartTimer 31 | * @brief 启动定时器 32 | * @param int nElapse -- 延时(ms) 33 | * @param BOOL bRepeat -- 重复标志 34 | * @param LPARAM uData -- Timer 自定义参数 35 | * @return BOOL, TRUE--成功 36 | * Describe 37 | */ 38 | STDMETHOD_(BOOL, StartTimer)(THIS_ int nElapse, BOOL bRepeat, LPARAM uData DEF_VAL(0)) PURE; 39 | 40 | /** 41 | * KillTimer 42 | * @brief 停止定时器 43 | * @return void 44 | * Describe 45 | */ 46 | STDMETHOD_(void, KillTimer)(THIS) PURE; 47 | }; 48 | 49 | SNSEND 50 | #endif // __STIMER_I__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/interface/sacchelper-i.h: -------------------------------------------------------------------------------- 1 | #ifndef __SACCHELPER_I__H__ 2 | #define __SACCHELPER_I__H__ 3 | 4 | #include 5 | SNSBEGIN 6 | 7 | typedef struct IWindow IWindow; 8 | // {727E4EAB-CFFA-4073-8C01-2815053FA44F} 9 | DEFINE_SGUID(IID_IAccHelper, 0x727e4eab, 0xcffa, 0x4073, 0x8c, 0x1, 0x28, 0x15, 0x5, 0x3f, 0xa4, 0x4f); 10 | #undef INTERFACE 11 | #define INTERFACE IAccHelper 12 | DECLARE_INTERFACE_(IAccHelper, IUnknown) 13 | { 14 | DECLARE_CLASS_SIID(IID_IAccHelper) 15 | 16 | STDMETHOD_(HRESULT, QueryInterface) 17 | (THIS_ REFIID riid, void **ppvObject) PURE; 18 | 19 | STDMETHOD_(ULONG, AddRef)(THIS) PURE; 20 | 21 | STDMETHOD_(ULONG, Release)(THIS) PURE; 22 | 23 | STDMETHOD_(void, SetOwner)(THIS_ IWindow * pOwner) PURE; 24 | STDMETHOD_(IWindow *, GetOwner)(CTHIS) SCONST PURE; 25 | }; 26 | 27 | SNSEND 28 | #endif // __SACCHELPER_I__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/interface/saccproxy-i.h: -------------------------------------------------------------------------------- 1 | #ifndef __SACCPROXY_I__H__ 2 | #define __SACCPROXY_I__H__ 3 | 4 | #include 5 | 6 | SNSBEGIN 7 | 8 | #ifdef _WIN32 9 | 10 | #undef INTERFACE 11 | #define INTERFACE IAccProxy 12 | DECLARE_INTERFACE_(IAccProxy, IObjRef) 13 | { 14 | //!添加引用 15 | /*! 16 | */ 17 | STDMETHOD_(long, AddRef)(THIS) PURE; 18 | 19 | //!释放引用 20 | /*! 21 | */ 22 | STDMETHOD_(long, Release)(THIS) PURE; 23 | 24 | //!释放对象 25 | /*! 26 | */ 27 | STDMETHOD_(void, OnFinalRelease)(THIS) PURE; 28 | STDMETHOD(get_accName)(THIS_ BSTR * pszName) PURE; 29 | STDMETHOD(get_accValue)(THIS_ BSTR * pszValue) PURE; 30 | STDMETHOD(get_accDescription)(THIS_ BSTR * pszDescription) PURE; 31 | STDMETHOD(get_accRole)(THIS_ VARIANT * pvarRole) PURE; 32 | STDMETHOD(get_accState)(THIS_ VARIANT * pvarState) PURE; 33 | STDMETHOD(get_accHelp)(THIS_ BSTR * pszHelp) PURE; 34 | STDMETHOD(get_accHelpTopic)(THIS_ BSTR * pszHelpFile, long *pidTopic) PURE; 35 | STDMETHOD(get_accKeyboardShortcut)(THIS_ BSTR * pszKeyboardShortcut) PURE; 36 | STDMETHOD(get_accDefaultAction)(THIS_ BSTR * pszDefaultAction) PURE; 37 | STDMETHOD(accSelect)(THIS_ long flagsSelect) PURE; 38 | STDMETHOD(accDoDefaultAction)(THIS) PURE; 39 | STDMETHOD(put_accName)(THIS_ BSTR szName) PURE; 40 | STDMETHOD(put_accValue)(THIS_ BSTR szValue) PURE; 41 | }; 42 | 43 | #endif //_WIN32 44 | 45 | SNSEND 46 | #endif // __SACCPROXY_I__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/interface/sinterpolator-i.h: -------------------------------------------------------------------------------- 1 | #ifndef __SINTERPOLATOR_I__H__ 2 | #define __SINTERPOLATOR_I__H__ 3 | #include 4 | SNSBEGIN 5 | 6 | #undef INTERFACE 7 | #define INTERFACE IInterpolator 8 | DECLARE_INTERFACE_(IInterpolator, IObject) 9 | { 10 | DEF_OBJ_BASE(IInterpolator, Interpolator) 11 | #include 12 | 13 | //---------------------------------------------------------------------------------- 14 | 15 | /** 16 | * getInterpolation 17 | * @brief 计算出插值 18 | * @param float input -- 输入值[0,1] 19 | * @return float -- 输出插值结果 20 | * Describe 21 | */ 22 | STDMETHOD_(float, getInterpolation)(CTHIS_ float input) SCONST PURE; 23 | }; 24 | SNSEND 25 | #endif // __SINTERPOLATOR_I__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/layout/SGridLayoutParamStruct.h: -------------------------------------------------------------------------------- 1 | #ifndef __SGRIDLAYOUTPARAMSTRUCT__H__ 2 | #define __SGRIDLAYOUTPARAMSTRUCT__H__ 3 | 4 | #include "SLayoutSize.h" 5 | 6 | SNSBEGIN 7 | 8 | enum GridGravity 9 | { 10 | gUndef = -1, /**< 未定义 */ 11 | gLeft = 0, /**< 左对齐 */ 12 | gTop = 0, /**< 上对齐 */ 13 | gCenter = 1, /**< 居中对齐 */ 14 | gRight = 2, /**< 右对齐 */ 15 | gBottom = 2, /**< 底对齐 */ 16 | gFill = 3, /**< 扩展对齐 */ 17 | }; 18 | 19 | /* 20 | * 网格布局单元格参数 21 | * remark: 22 | * 如果同一行中多个单无格指定了rowWeight,只有最大的那一个有效,相应的同一列中也只有最大的colWeight有效 23 | */ 24 | struct SGridLayoutParamStruct 25 | { 26 | int nColSpan; /**< 网格占列数 */ 27 | int nRowSpan; /**< 网格占行数 */ 28 | GridGravity layoutGravityX; /**< 网格水平对齐方式 */ 29 | GridGravity layoutGravityY; /**< 网格垂直对齐方式 */ 30 | SLayoutSize width; /**< 网格宽度 */ 31 | SLayoutSize height; /**< 网格高度 */ 32 | float fColWeight; /**< 网格宽度的加权 */ 33 | float fRowWeight; /**< 网格高度的加权 */ 34 | }; 35 | 36 | SNSEND 37 | #endif // __SGRIDLAYOUTPARAMSTRUCT__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/layout/SLayoutSize.h: -------------------------------------------------------------------------------- 1 | #ifndef __SLAYOUTSIZE__H__ 2 | #define __SLAYOUTSIZE__H__ 3 | 4 | SNSBEGIN 5 | 6 | class SOUI_EXP SLayoutSize { 7 | public: 8 | enum Unit 9 | { 10 | unknow = -1, 11 | px = 0, 12 | dp, 13 | dip, 14 | sp 15 | }; 16 | 17 | SLayoutSize(float fSize = 0.0f); 18 | 19 | SLayoutSize(float fSize, Unit unit); 20 | float fSize; 21 | Unit unit; 22 | 23 | void setWrapContent(); 24 | bool isWrapContent() const; 25 | 26 | void setMatchParent(); 27 | bool isMatchParent() const; 28 | 29 | void setSize(float fSize, Unit unit); 30 | bool isSpecifiedSize() const; 31 | 32 | void setInvalid(); 33 | bool isValid() const; 34 | 35 | int toPixelSize(int scale) const; 36 | 37 | SStringW toString() const; 38 | 39 | bool isZero() const; 40 | 41 | void parseString(const SStringW &strSize); 42 | 43 | SLayoutSize &operator=(const SLayoutSize &src); 44 | 45 | bool valueEqual(float value); 46 | 47 | static SLayoutSize fromString(const SStringW &strSize); 48 | static bool fequal(float a, float b); 49 | 50 | static Unit unitFromString(const SStringW &strUnit); 51 | static SLayoutSize::Unit defUnit; 52 | }; 53 | 54 | SNSEND 55 | #endif // __SLAYOUTSIZE__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/layout/SLinearLayoutParamStruct.h: -------------------------------------------------------------------------------- 1 | #ifndef __SLINEARLAYOUTPARAMSTRUCT__H__ 2 | #define __SLINEARLAYOUTPARAMSTRUCT__H__ 3 | 4 | #include "SLayoutSize.h" 5 | SNSBEGIN 6 | enum Gravity 7 | { 8 | G_Undefined = -1, 9 | G_Left = 0, 10 | G_Top = 0, 11 | G_Center = 1, 12 | G_Right = 2, 13 | G_Bottom = 2, 14 | }; 15 | 16 | struct SLinearLayoutParamStruct 17 | { 18 | SLayoutSize width; 19 | SLayoutSize height; 20 | SLayoutSize extend_left, extend_right; //相当于android的margin属性 21 | SLayoutSize extend_top, extend_bottom; //相当于android的margin属性 22 | float weight; 23 | Gravity gravity; 24 | }; 25 | SNSEND 26 | #endif // __SLINEARLAYOUTPARAMSTRUCT__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/matrix/SCamera.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 The Android Open Source Project 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | // Inspired by Rob Johnson's most excellent QuickDraw GX sample code 9 | 10 | #ifndef _SCamera_DEFINED_ 11 | #define _SCamera_DEFINED_ 12 | 13 | #include "SMatrix.h" 14 | 15 | SNSBEGIN 16 | class S3DView; 17 | class SOUI_EXP SCamera { 18 | public: 19 | SCamera(); 20 | ~SCamera(); 21 | 22 | void save(); 23 | void restore(); 24 | 25 | void translate(float x, float y, float z); 26 | void rotateX(float deg); 27 | void rotateY(float deg); 28 | void rotateZ(float deg); 29 | 30 | void setCameraLocation(float x, float y, float z); 31 | float getCameraLocationX(); 32 | float getCameraLocationY(); 33 | float getCameraLocationZ(); 34 | 35 | void getMatrix(SMatrix *out) const; 36 | 37 | private: 38 | SCamera(const SCamera &); 39 | SCamera &operator=(const SCamera &); 40 | 41 | S3DView *m_priv; 42 | }; 43 | SNSEND 44 | #endif 45 | -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/msaa/SAccProxyWindow.h: -------------------------------------------------------------------------------- 1 | #ifndef __SACCPROXYWINDOW__H__ 2 | #define __SACCPROXYWINDOW__H__ 3 | #include "interface/saccproxy-i.h" 4 | 5 | SNSBEGIN 6 | #ifdef SOUI_ENABLE_ACC 7 | class SOUI_EXP SAccProxyWindow : public TObjRefImpl { 8 | public: 9 | SAccProxyWindow(SWindow *pWnd) 10 | : m_pWnd(pWnd) 11 | { 12 | } 13 | virtual ~SAccProxyWindow() 14 | { 15 | } 16 | 17 | public: 18 | virtual STDMETHODIMP get_accName(BSTR *pszName); 19 | virtual STDMETHODIMP get_accValue(BSTR *pszValue); 20 | virtual STDMETHODIMP get_accDescription(BSTR *pszDescription); 21 | virtual STDMETHODIMP get_accRole(VARIANT *pvarRole); 22 | virtual STDMETHODIMP get_accState(VARIANT *pvarState); 23 | virtual STDMETHODIMP get_accHelp(BSTR *pszHelp); 24 | virtual STDMETHODIMP get_accHelpTopic(BSTR *pszHelpFile, long *pidTopic); 25 | virtual STDMETHODIMP get_accKeyboardShortcut(BSTR *pszKeyboardShortcut); 26 | virtual STDMETHODIMP get_accDefaultAction(BSTR *pszDefaultAction); 27 | virtual STDMETHODIMP accSelect(long flagsSelect); 28 | virtual STDMETHODIMP accDoDefaultAction(); 29 | virtual STDMETHODIMP put_accName(BSTR szName); 30 | virtual STDMETHODIMP put_accValue(BSTR szValue); 31 | 32 | protected: 33 | SWindow *m_pWnd; 34 | }; 35 | 36 | #endif 37 | SNSEND 38 | 39 | #endif // __SACCPROXYWINDOW__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/proxy/SCtrlProxy.h: -------------------------------------------------------------------------------- 1 | #ifndef _SCTRL_PROXY_H_ 2 | #define _SCTRL_PROXY_H_ 3 | 4 | SNSBEGIN 5 | 6 | template 7 | class TCtrlProxy 8 | : public T 9 | , public Base 10 | { 11 | public: 12 | STDMETHOD_(long, AddRef)(THIS) OVERRIDE 13 | { 14 | return Base::AddRef(); 15 | } 16 | STDMETHOD_(long, Release)(THIS) OVERRIDE 17 | { 18 | return Base::Release(); 19 | } 20 | STDMETHOD_(void, OnFinalRelease)(THIS) OVERRIDE 21 | { 22 | return Base::OnFinalRelease(); 23 | } 24 | 25 | STDMETHOD_(IWindow *, ToIWindow)(THIS) OVERRIDE 26 | { 27 | return (IWindow *)this; 28 | } 29 | 30 | STDMETHOD_(HRESULT, QueryInterface)(REFGUID id, IObjRef **ppRet) OVERRIDE 31 | { 32 | if (id == T::GetIID()) 33 | { 34 | *ppRet = (T *)this; 35 | AddRef(); 36 | return S_OK; 37 | } 38 | else 39 | { 40 | return Base::QueryInterface(id, ppRet); 41 | } 42 | } 43 | }; 44 | 45 | SNSEND 46 | 47 | #endif//_SCTRL_PROXY_H_ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/proxy/SWindowProxy.h: -------------------------------------------------------------------------------- 1 | #ifndef __SWINDOWPROXY__H__ 2 | #define __SWINDOWPROXY__H__ 3 | 4 | SNSBEGIN 5 | 6 | template 7 | class TWindowProxy 8 | : public T 9 | , public SWindow { 10 | public: 11 | 12 | STDMETHOD_(long, AddRef)(THIS) OVERRIDE 13 | { 14 | return SWindow::AddRef(); 15 | } 16 | STDMETHOD_(long, Release)(THIS) OVERRIDE 17 | { 18 | return SWindow::Release(); 19 | } 20 | STDMETHOD_(void, OnFinalRelease)(THIS) OVERRIDE 21 | { 22 | SWindow::OnFinalRelease(); 23 | } 24 | 25 | STDMETHOD_(IWindow *, ToIWindow)(THIS) OVERRIDE 26 | { 27 | return this; 28 | } 29 | 30 | STDMETHOD_(HRESULT, QueryInterface)(REFGUID id, IObjRef **ppRet) OVERRIDE 31 | { 32 | if (id == T::GetIID()) 33 | { 34 | *ppRet = (T *)this; 35 | AddRef(); 36 | return S_OK; 37 | } 38 | else 39 | { 40 | return E_NOTIMPL; 41 | } 42 | } 43 | }; 44 | 45 | SNSEND 46 | #endif // __SWINDOWPROXY__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/res.mgr/SDpiAwareFont.h: -------------------------------------------------------------------------------- 1 | #ifndef __SDPIAWAREFONT__H__ 2 | #define __SDPIAWAREFONT__H__ 3 | 4 | SNSBEGIN 5 | class SOUI_EXP SDpiAwareFont { 6 | public: 7 | SDpiAwareFont(void); 8 | ~SDpiAwareFont(void); 9 | 10 | IFontS *GetFontPtr(); 11 | 12 | void SetFontDesc(const SStringW &strDesc, int nScale); 13 | 14 | void UpdateFont(int nScale); 15 | 16 | protected: 17 | IFontS *OnGetFont(const SStringW &strDesc, int nScale); 18 | 19 | SStringW m_strDesc; 20 | SAutoRefPtr m_object; 21 | }; 22 | 23 | SNSEND 24 | 25 | #endif // __SDPIAWAREFONT__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/res.mgr/SFontInfo.h: -------------------------------------------------------------------------------- 1 | #ifndef __SFONTINFO__H__ 2 | #define __SFONTINFO__H__ 3 | 4 | SNSBEGIN 5 | 6 | /** 7 | * @union FONTSTYLE 8 | * @brief FONT的风格 9 | * 10 | * Describe 11 | */ 12 | union FONTSTYLE { 13 | uint64_t syle; // DWORD版本的风格 14 | struct 15 | { 16 | uint64_t byCharset : 8; //字符集 17 | uint64_t byWeight : 8; // weight/4 18 | uint64_t fItalic : 1; //斜体标志位 19 | uint64_t fUnderline : 1; //下划线标志位 20 | uint64_t fBold : 1; //粗体标志位 21 | uint64_t fStrike : 1; //删除线标志位 22 | uint64_t fEscapement : 12; //角度, 以0.1角度为单位 23 | uint64_t reserved : 13; // reserved 24 | uint64_t szIsAdding : 1; // cSize is adding 25 | uint64_t szUnit : 2; // cSize unit,(0-3) 26 | uint64_t nSize : 16; //字体大小,为short有符号类型 27 | } attr; 28 | 29 | FONTSTYLE(uint64_t _style = 0) 30 | : syle(_style) 31 | { 32 | } 33 | }; 34 | 35 | struct FontInfo 36 | { 37 | FONTSTYLE style; 38 | SStringW strFaceName; 39 | SStringW strPropEx; 40 | int scale; 41 | }; 42 | SNSEND 43 | #endif // __SFONTINFO__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/res.mgr/SGradientPool.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014-2050 SOUI团队 3 | * All rights reserved. 4 | * 5 | * @file SStylePool.h 6 | * @brief SkinObj Pool 7 | * @version v1.0 8 | * @author soui 9 | * @date 2014-05-28 10 | * 11 | * Describe 管理Style 12 | */ 13 | 14 | #ifndef __SGRADIENTPOOL__H__ 15 | #define __SGRADIENTPOOL__H__ 16 | #include 17 | #include 18 | #include 19 | 20 | SNSBEGIN 21 | /** 22 | * @class SGradientPool 23 | * @brief name和IGradient的映射表 24 | * 25 | * Describe 26 | */ 27 | class SOUI_EXP SGradientPool 28 | : public SCmnMap, SStringW> 29 | , public TObjRefImpl { 30 | public: 31 | /** 32 | * GetStyle 33 | * @brief Get IGradient from pool by name 34 | * @param LPCWSTR lpszName -- name of gradient 35 | * @return IGradient -- gradient object 36 | * Describe 37 | */ 38 | IGradient *GetGradient(const SStringW &strName); 39 | 40 | /** 41 | * Init 42 | * @brief Load Style table from xml node 43 | * @param SXmlNode xmlNode -- xml node that describe style list 44 | * @return BOOL -- TRUE: loaded; FALSE:failed; 45 | * Describe 46 | */ 47 | BOOL Init(SXmlNode xmlNode); 48 | }; 49 | 50 | SNSEND 51 | #endif // __SGRADIENTPOOL__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/res.mgr/SObjDefAttr.h: -------------------------------------------------------------------------------- 1 | #ifndef __SOBJDEFATTR__H__ 2 | #define __SOBJDEFATTR__H__ 3 | 4 | #include "core/SSingletonMap.h" 5 | 6 | SNSBEGIN 7 | 8 | class SOUI_EXP SObjDefAttr 9 | : public SCmnMap 10 | , public TObjRefImpl { 11 | public: 12 | SObjDefAttr() 13 | { 14 | } 15 | virtual ~SObjDefAttr() 16 | { 17 | } 18 | 19 | BOOL Init(SXmlNode xmlNode); 20 | 21 | bool IsEmpty() 22 | { 23 | return !!m_xmlRoot.root(); 24 | } 25 | 26 | SXmlNode GetDefAttribute(LPCWSTR pszClassName); 27 | 28 | protected: 29 | void BuildClassAttribute(SXmlNode &xmlNode, LPCWSTR pszClassName); 30 | 31 | SXmlDoc m_xmlRoot; 32 | }; 33 | 34 | SNSEND 35 | 36 | #endif // __SOBJDEFATTR__H__ -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/soui-version.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014-2050 3 | * All rights reserved. 4 | * 5 | * @file soui-version.h 6 | * @brief 7 | * soui version: ${SOUI_VER1}.${SOUI_VER2}.${SOUI_VER3}.${SOUI_VER4} 8 | */ 9 | 10 | #define SOUI_VER1 5 11 | #define SOUI_VER2 0 12 | #define SOUI_VER3 0 13 | #define SOUI_VER4 1 14 | -------------------------------------------------------------------------------- /depends/soui4/include/SOUI/include/soui_exp.h: -------------------------------------------------------------------------------- 1 | #if defined(DLL_CORE) && defined(_WIN32) 2 | #ifdef SOUI_EXPORTS 3 | #define SOUI_EXP __declspec(dllexport) 4 | #else 5 | #define SOUI_EXP __declspec(dllimport) 6 | #endif // SOUI_EXPORTS 7 | #else 8 | #define SOUI_EXP 9 | #endif 10 | -------------------------------------------------------------------------------- /depends/soui4/include/components/commask.h: -------------------------------------------------------------------------------- 1 | #ifndef _SOUI_COM_MASK_H_ 2 | #define _SOUI_COM_MASK_H_ 3 | 4 | #define scom_mask_translator (1 << 0) 5 | #define scom_mask_log4z (1 << 1) 6 | #define scom_mask_taskloop (1 << 2) 7 | 8 | #define scom_mask_render_skia (1 << 3) 9 | #define scom_mask_render_gdi (1 << 4) 10 | #define scom_mask_render_d2d (1 << 14) 11 | 12 | #define scom_mask_imgdecoder_gdip (1 << 5) 13 | #define scom_mask_imgdecoder_stb (1 << 7) 14 | #define scom_mask_imgdecoder_wic (1 << 8) 15 | 16 | #define scom_mask_resprovider_zip (1 << 9) 17 | #define scom_mask_resprovider_7z (1 << 10) 18 | #define scom_mask_script_lua (1 << 11) 19 | 20 | #define scom_mask_ipcobject (1<<12) 21 | #define scom_mask_httpclient (1<<13) 22 | 23 | #define scom_mask_scom_all (0xffffffff) 24 | 25 | #endif //_SOUI_COM_MASK_H_ -------------------------------------------------------------------------------- /depends/soui4/include/config/build.cfg: -------------------------------------------------------------------------------- 1 | [BuiltConfig] 2 | UNICODE=0 3 | WCHAR=1 4 | MT=0 5 | SUPPORT_XP=1 6 | -------------------------------------------------------------------------------- /depends/soui4/include/config/config.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/include/config/config.h -------------------------------------------------------------------------------- /depends/soui4/include/swinx/include/hook.h: -------------------------------------------------------------------------------- 1 | #ifndef _HOOK_H_ 2 | #define _HOOK_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" 6 | { 7 | #endif //__cplusplus 8 | 9 | typedef LRESULT(CALLBACK *HOOKPROC)(int code, WPARAM wParam, LPARAM lParam); 10 | typedef struct hook *HHOOK; 11 | 12 | HHOOK WINAPI SetWindowsHookA(INT id, HOOKPROC proc); 13 | 14 | HHOOK WINAPI SetWindowsHookW(INT id, HOOKPROC proc); 15 | 16 | HHOOK WINAPI SetWindowsHookExA(INT idHook, HOOKPROC lpfn, HINSTANCE hmod, tid_t dwThreadId); 17 | 18 | HHOOK WINAPI SetWindowsHookExW(INT idHook, HOOKPROC lpfn, HINSTANCE hmod, tid_t dwThreadId); 19 | 20 | BOOL WINAPI UnhookWindowsHookEx(HHOOK hhk); 21 | 22 | LRESULT WINAPI CallNextHookEx(HHOOK hhk, int nCode, WPARAM wParam, LPARAM lParam); 23 | BOOL WINAPI CallHook(INT id, int nCode, WPARAM wParam, LPARAM lParam); 24 | #ifdef UNICODE 25 | #define SetWindowsHookEx SetWindowsHookExW 26 | #define SetWindowsHook SetWindowsHookW 27 | #else 28 | #define SetWindowsHookEx SetWindowsHookExA 29 | #define SetWindowsHook SetWindowsHookA 30 | #endif // UNICODE 31 | 32 | #ifdef UNICODE 33 | #define SetWindowsHook SetWindowsHookW 34 | #define SetWindowsHookEx SetWindowsHookExW 35 | #else 36 | #define SetWindowsHook SetWindowsHookA 37 | #define SetWindowsHookEx SetWindowsHookExA 38 | #endif // UNICODE 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif //__cplusplus 43 | 44 | #endif //_HOOK_H_ -------------------------------------------------------------------------------- /depends/soui4/include/swinx/include/initguid.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | * * 3 | * initguid.h - Definitions for controlling GUID initialization * 4 | * * 5 | * OLE Version 2.0 * 6 | * * 7 | * Copyright (c) Microsoft Corporation. All rights reserved. * 8 | * * 9 | \*****************************************************************************/ 10 | #define INITGUID 11 | #include 12 | -------------------------------------------------------------------------------- /depends/soui4/include/swinx/include/logdef.h: -------------------------------------------------------------------------------- 1 | #ifndef _LOG_DEF_H_ 2 | #define _LOG_DEF_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" 6 | { 7 | #endif //__cplusplus 8 | 9 | enum LogPriority { 10 | SLOG_VERBOSE=0, 11 | /** Debug logging. Should typically be disabled for a release apk. */ 12 | SLOG_DEBUG, 13 | /** Informational logging. Should typically be disabled for a release apk. */ 14 | SLOG_INFO, 15 | /** Warning logging. For use with recoverable failures. */ 16 | SLOG_WARN, 17 | /** Error logging. For use with unrecoverable failures. */ 18 | SLOG_ERROR, 19 | /** Fatal logging. For use when aborting. */ 20 | SLOG_FATAL, 21 | }; 22 | 23 | typedef void (*SWinxLogCallback)(const char* pLogStr, int level); 24 | 25 | void WINAPI SetSwinxLogCallback(SWinxLogCallback cb,int level); 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif //__cplusplus 30 | #endif//_LOG_DEF_H_ -------------------------------------------------------------------------------- /depends/soui4/include/swinx/include/mmsystem.h: -------------------------------------------------------------------------------- 1 | #ifndef __MMSYSTEM_H__ 2 | #define __MMSYSTEM_H__ 3 | 4 | #include 5 | #ifdef __cplusplus 6 | extern "C" 7 | { 8 | #endif //__cplusplus 9 | 10 | DWORD WINAPI timeGetTime(void); 11 | 12 | typedef UINT MMRESULT; 13 | 14 | MMRESULT timeBeginPeriod(UINT uPeriod); 15 | 16 | typedef struct timecaps_tag 17 | { 18 | UINT wPeriodMin; /* minimum period supported */ 19 | UINT wPeriodMax; /* maximum period supported */ 20 | } TIMECAPS, *PTIMECAPS, NEAR *NPTIMECAPS, FAR *LPTIMECAPS; 21 | 22 | #define MMSYSERR_BASE 0 23 | #define WAVERR_BASE 32 24 | #define MIDIERR_BASE 64 25 | #define TIMERR_BASE 96 26 | #define JOYERR_BASE 160 27 | #define MCIERR_BASE 256 28 | 29 | #define TIMERR_NOERROR (0) /* no error */ 30 | #define TIMERR_NOCANDO (TIMERR_BASE + 1) /* request not completed */ 31 | #define TIMERR_STRUCT (TIMERR_BASE + 33) /* time struct size */ 32 | 33 | MMRESULT WINAPI timeGetDevCaps(LPTIMECAPS ptc, UINT cbtc); 34 | MMRESULT WINAPI timeBeginPeriod(UINT uPeriod); 35 | MMRESULT WINAPI timeEndPeriod(UINT uPeriod); 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif //__cplusplus 40 | 41 | #endif //__MMSYSTEM_H__ -------------------------------------------------------------------------------- /depends/soui4/include/swinx/include/shlobj.h: -------------------------------------------------------------------------------- 1 | #ifndef __SHELL_OBJ_H__ 2 | #define __SHELL_OBJ_H__ 3 | #include 4 | #include 5 | 6 | #ifdef __cplusplus 7 | extern "C" 8 | { 9 | #endif //__cplusplus 10 | 11 | HRESULT WINAPI SHCreateStdEnumFmtEtc(_In_ UINT cfmt, _In_reads_(cfmt) const FORMATETC afmt[], _Outptr_ IEnumFORMATETC **ppenumFormatEtc); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif //__cplusplus 16 | 17 | #endif //__SHELL_OBJ_H__ 18 | -------------------------------------------------------------------------------- /depends/soui4/include/swinx/include/unknwn.h: -------------------------------------------------------------------------------- 1 | #ifndef __UNKNWN_H_ 2 | #define __UNKNWN_H_ 3 | #include 4 | #include 5 | #include 6 | 7 | #define __RPC__in 8 | #define __RPC__deref_out_opt 9 | #define __RPC__in_opt 10 | #define __RPC__deref_opt_in_opt 11 | #define __RPC__out 12 | #define __RPC__in_ecount_full(x) 13 | #define __RPC__out_ecount_full(x) 14 | #define __RPC_unique_pointer 15 | 16 | DEFINE_GUID(IID_IUnknown, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1); 17 | #undef INTERFACE 18 | #define INTERFACE IUnknown 19 | DECLARE_INTERFACE(IUnknown) 20 | { 21 | DECLARE_CLASS_SIID(IID_IUnknown) 22 | STDMETHOD_(HRESULT, QueryInterface)(THIS_ REFGUID riid, void **ppvObject) PURE; 23 | STDMETHOD_(ULONG, AddRef)(THIS) PURE; 24 | STDMETHOD_(ULONG, Release)(THIS) PURE; 25 | }; 26 | 27 | typedef /* [unique] */ IUnknown *LPUNKNOWN; 28 | 29 | DEFINE_GUID(GUID_NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); 30 | 31 | #define IID_NULL GUID_NULL 32 | #define CLSID_NULL GUID_NULL 33 | #define FMTID_NULL GUID_NULL 34 | 35 | #endif //__UNKNWN_H_ -------------------------------------------------------------------------------- /depends/soui4/include/swinx/include/windows.h: -------------------------------------------------------------------------------- 1 | #ifndef __WIN4XCB_H_ 2 | #define __WIN4XCB_H_ 3 | 4 | #ifndef WINVER 5 | #define WINVER 0x0500 6 | #endif // WINVER 7 | #ifndef _WIN32_WINNT 8 | #define _WIN32_WINNT 0x0502 9 | #endif //_WIN32_WINNT 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | 40 | #undef NULL 41 | #define NULL 0 42 | 43 | #endif //__WIN4XCB_H_ 44 | -------------------------------------------------------------------------------- /depends/soui4/include/utilities/include/atl.mini/atldef.h: -------------------------------------------------------------------------------- 1 | #ifndef __ATLDEF__H__ 2 | #define __ATLDEF__H__ 3 | 4 | #ifdef _WIN32 5 | #define HIMETRIC_PER_INCH 2540 6 | #define MAP_PIX_TO_LOGHIM(x,ppli) MulDiv(HIMETRIC_PER_INCH, (x), (ppli)) 7 | #define MAP_LOGHIM_TO_PIX(x,ppli) MulDiv((ppli), (x), HIMETRIC_PER_INCH) 8 | #endif 9 | 10 | #ifndef ATLTRACENOTIMPL 11 | #define ATLENSURE_THROW(a,b) 12 | #endif 13 | 14 | #ifndef ATLTRACENOTIMPL 15 | #define ATLTRACENOTIMPL(funcname) return E_NOTIMPL 16 | #endif 17 | 18 | #ifndef ATLASSERT 19 | #define ATLASSERT SASSERT 20 | #endif // ATLASSERT 21 | 22 | #ifndef ATLASSUME 23 | #define ATLASSUME(expr) do { ATLASSERT(expr); } while(0) 24 | #endif // ATLASSUME 25 | 26 | #ifndef ATL_NO_VTABLE 27 | #ifdef _WIN32 28 | #define ATL_NO_VTABLE __declspec(novtable) 29 | #else 30 | #define ATL_NO_VTABLE 31 | #endif 32 | #endif 33 | 34 | #endif // __ATLDEF__H__ -------------------------------------------------------------------------------- /depends/soui4/include/utilities/include/gdialpha.h: -------------------------------------------------------------------------------- 1 | #ifndef __GDIALPHA__H__ 2 | #define __GDIALPHA__H__ 3 | #ifdef _WIN32 4 | 5 | #include "utilities-def.h" 6 | #include 7 | 8 | SNSBEGIN 9 | 10 | #define MAX_ALPHABUF 1<<16 11 | 12 | typedef struct tagALPHAINFO 13 | { 14 | BITMAP bm; 15 | LPBYTE lpBuf; 16 | RECT rc; 17 | tagALPHAINFO() 18 | { 19 | lpBuf=NULL; 20 | rc.left=rc.top=rc.right=rc.bottom=0; 21 | } 22 | } ALPHAINFO,* LPALPHAINFO; 23 | 24 | class UTILITIES_API CGdiAlpha 25 | { 26 | private: 27 | static BYTE s_byAlphaBack[MAX_ALPHABUF]; 28 | 29 | static LPBYTE ALPHABACKUP(BITMAP *pBitmap,int x,int y,int cx,int cy); 30 | //恢复位图的Alpha通道 31 | static void ALPHARESTORE(BITMAP *pBitmap,int x,int y,int cx,int cy,LPBYTE lpAlpha); 32 | public: 33 | 34 | static BOOL AlphaBackup(HDC hdc,LPCRECT pRect,ALPHAINFO &alphaInfo); 35 | 36 | static void AlphaRestore(ALPHAINFO &alphaInfo); 37 | }; 38 | 39 | SNSEND 40 | 41 | #endif //_WIN32 42 | #endif // __GDIALPHA__H__ -------------------------------------------------------------------------------- /depends/soui4/include/utilities/include/helper/SAutoBuf.h: -------------------------------------------------------------------------------- 1 | #ifndef __SAUTOBUF__H__ 2 | #define __SAUTOBUF__H__ 3 | 4 | #include 5 | 6 | SNSBEGIN 7 | 8 | class UTILITIES_API SAutoBuf 9 | { 10 | public: 11 | SAutoBuf(); 12 | 13 | SAutoBuf(size_t nElements); 14 | 15 | ~SAutoBuf(); 16 | 17 | operator char *() const; 18 | 19 | char* operator ->() const; 20 | 21 | const char & operator[] (int i) const; 22 | 23 | char & operator[] (int i); 24 | 25 | void Attach(char *pBuf,size_t size); 26 | 27 | //return buffer, must be freed using soui_mem_wrapper::SouiFree 28 | char *Detach(); 29 | 30 | char* Allocate(size_t nElements); 31 | 32 | size_t size(); 33 | 34 | void Free(); 35 | private: 36 | char * m_pBuf; 37 | size_t m_nSize; 38 | bool m_bExternalBuf; 39 | }; 40 | 41 | SNSEND 42 | 43 | #endif // __SAUTOBUF__H__ -------------------------------------------------------------------------------- /depends/soui4/include/utilities/include/helper/SCriticalSection.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014-2050 3 | * All rights reserved. 4 | * 5 | * @file SCriticalSection.h 6 | * @brief 7 | * @version v1.0 8 | * @author SOUI group 9 | * @date 2014/09/27 10 | * 11 | * Describe CriticalSection 包装 12 | */ 13 | 14 | #ifndef __SCRITICALSECTION__H__ 15 | #define __SCRITICALSECTION__H__ 16 | #include 17 | 18 | SNSBEGIN 19 | 20 | class SCriticalSectionImpl; 21 | class UTILITIES_API SCriticalSection 22 | { 23 | public: 24 | SCriticalSection(); 25 | virtual ~SCriticalSection(); 26 | 27 | void Enter(); 28 | void Leave(); 29 | protected: 30 | 31 | SCriticalSectionImpl* m_cs; 32 | }; 33 | 34 | class UTILITIES_API SAutoLock 35 | { 36 | public: 37 | SAutoLock(SCriticalSection & cs):m_cs(cs) 38 | { 39 | m_cs.Enter(); 40 | } 41 | 42 | ~SAutoLock() 43 | { 44 | m_cs.Leave(); 45 | } 46 | protected: 47 | SCriticalSection & m_cs; 48 | }; 49 | SNSEND 50 | 51 | #endif // __SCRITICALSECTION__H__ -------------------------------------------------------------------------------- /depends/soui4/include/utilities/include/helper/SNoCopyable.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _NO_COPYABLE_H_ 2 | #define _NO_COPYABLE_H_ 3 | 4 | #include 5 | SNSBEGIN 6 | /** 7 | * Inheriate this class to make your class cannot be copy and assign. 8 | * 9 | */ 10 | class UTILITIES_API SNoCopyable 11 | { 12 | public: 13 | SNoCopyable() {} 14 | ~SNoCopyable() {} 15 | private: 16 | SNoCopyable(const SNoCopyable &); 17 | const SNoCopyable &operator=(const SNoCopyable &); 18 | }; 19 | 20 | SNSEND 21 | 22 | #endif//_NO_COPYABLE_H_ -------------------------------------------------------------------------------- /depends/soui4/include/utilities/include/helper/SRwLock.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef _SRW_LOCK_H_ 12 | #define _SRW_LOCK_H_ 13 | 14 | #include 15 | #include 16 | 17 | SNSBEGIN 18 | 19 | struct IRwLock; 20 | class UTILITIES_API SRwLock : public SNoCopyable { 21 | public: 22 | SRwLock(); 23 | ~SRwLock(); 24 | 25 | void LockExclusive(); 26 | void UnlockExclusive(); 27 | 28 | void LockShared(); 29 | void UnlockShared(); 30 | 31 | private: 32 | IRwLock* impl; 33 | }; 34 | 35 | class UTILITIES_API SAutoReadLock : public SNoCopyable{ 36 | public: 37 | SAutoReadLock(SRwLock *plock):m_pLock(plock){ 38 | m_pLock->LockShared(); 39 | } 40 | ~SAutoReadLock(){ 41 | m_pLock->UnlockShared(); 42 | } 43 | private: 44 | SRwLock * m_pLock; 45 | }; 46 | 47 | 48 | class UTILITIES_API SAutoWriteLock : public SNoCopyable{ 49 | public: 50 | SAutoWriteLock(SRwLock *plock):m_pLock(plock){ 51 | m_pLock->LockExclusive(); 52 | } 53 | ~SAutoWriteLock(){ 54 | m_pLock->UnlockExclusive(); 55 | } 56 | private: 57 | SRwLock * m_pLock; 58 | }; 59 | 60 | SNSEND 61 | 62 | #endif // _SRW_LOCK_H_ 63 | -------------------------------------------------------------------------------- /depends/soui4/include/utilities/include/helper/SSemaphore.h: -------------------------------------------------------------------------------- 1 | #ifndef __SSEMAPHORE__H__ 2 | #define __SSEMAPHORE__H__ 3 | 4 | #include 5 | #include 6 | SNSBEGIN 7 | 8 | enum 9 | { 10 | RETURN_OK = 0, 11 | RETURN_TIMEOUT = 1, 12 | RETURN_ERROR = -1, 13 | }; 14 | 15 | class SemaphorePrivate; 16 | /** 17 | * Semaphore class for thread synchronization. 18 | */ 19 | class UTILITIES_API SSemaphore : public SNoCopyable 20 | { 21 | public: 22 | /** 23 | * Wait for notified permanently. 24 | * @return RETURN_OK if notified. RETURN_ERROR if error occurs. 25 | */ 26 | int wait(); 27 | 28 | /** 29 | * Wait for notified during a time. 30 | * @param msec waiting time in milliseconds. 31 | * @return RETURN_OK if notified. RETURN_TIMEOUT if time out. RETURN_ERROR 32 | * if error occurs. 33 | */ 34 | int wait(unsigned int msec); 35 | 36 | /** 37 | * Notify object. This function could be called before wait, and the notify 38 | * count will increase. 39 | */ 40 | void notify(); 41 | 42 | /** 43 | * Default constructor. 44 | */ 45 | SSemaphore(); 46 | 47 | /** 48 | * Destructor. 49 | */ 50 | virtual ~SSemaphore(); 51 | 52 | private: 53 | SemaphorePrivate &_private; 54 | }; 55 | 56 | SNSEND 57 | 58 | #endif // __SSEMAPHORE__H__ -------------------------------------------------------------------------------- /depends/soui4/include/utilities/include/interface/obj-ref-i.h: -------------------------------------------------------------------------------- 1 | #ifndef __OBJ_REF_I__H__ 2 | #define __OBJ_REF_I__H__ 3 | 4 | #include 5 | #include 6 | #ifdef _WIN32 7 | #include 8 | #else 9 | #include 10 | #endif//_WIN32 11 | 12 | #undef INTERFACE 13 | #define INTERFACE IObjRef 14 | DECLARE_INTERFACE(IObjRef) 15 | { 16 | /** 17 | * @brief 增加引用计数 18 | * @return 新引用计数 19 | */ 20 | STDMETHOD_(long,AddRef) (THIS) PURE; 21 | 22 | /** 23 | * @brief 减少引用计数 24 | * @return 新引用计数 25 | */ 26 | STDMETHOD_(long,Release) (THIS) PURE; 27 | 28 | /** 29 | * @brief 释放对象 30 | * @return void 31 | */ 32 | STDMETHOD_(void,OnFinalRelease) (THIS) PURE; 33 | }; 34 | 35 | #endif // __OBJ_REF_I__H__ -------------------------------------------------------------------------------- /depends/soui4/include/utilities/include/pugixml/pugixml.soui.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/include/utilities/include/pugixml/pugixml.soui.txt -------------------------------------------------------------------------------- /depends/soui4/include/utilities/include/sdef.h: -------------------------------------------------------------------------------- 1 | #ifndef __SDEF__H__ 2 | #define __SDEF__H__ 3 | 4 | #include 5 | 6 | #ifdef __cplusplus 7 | #define SNS SOUI //replase it to your ns 8 | #define SCONST const 9 | #define SNSBEGIN namespace SNS{ 10 | #define SNSEND }//end of namespace SOUI 11 | #define OVERRIDE override 12 | #define CTHIS_ THIS_ 13 | #define CTHIS THIS 14 | #define DEF_VAL(x) =x 15 | #else 16 | #define SCONST 17 | #define SNSBEGIN 18 | #define SNSEND 19 | #define OVERRIDE 20 | #define CTHIS_ const THIS_ 21 | #define CTHIS const THIS 22 | #define DEF_VAL(x) 23 | #endif 24 | 25 | #ifndef smax 26 | #define smax(a,b) ((a)>(b)?(a):(b)) 27 | #endif 28 | #ifndef smin 29 | #define smin(a,b) ((a)<(b)?(a):(b)) 30 | #endif 31 | 32 | 33 | #ifndef SASSERT 34 | #include 35 | #define SASSERT(x) assert(x) 36 | #endif 37 | 38 | #ifdef LIB_SOUI_COM 39 | #define SOUI_COM_API 40 | #define SOUI_COM_C 41 | #else 42 | #ifdef _WIN32 43 | #define SOUI_COM_API __declspec(dllexport) 44 | #else 45 | #define SOUI_COM_API 46 | #endif 47 | #define SOUI_COM_C EXTERN_C 48 | #endif//LIB_SOUI_COM 49 | 50 | #ifndef NULL 51 | #define NULL 0 52 | #endif 53 | 54 | #ifdef _WIN32 55 | typedef unsigned int tid_t; 56 | #endif//_WIN32 57 | 58 | #endif // __SDEF__H__ -------------------------------------------------------------------------------- /depends/soui4/include/utilities/include/sguid.h: -------------------------------------------------------------------------------- 1 | #ifndef __SGUID_H_ 2 | #define __SGUID_H_ 3 | 4 | #define __suidof(ClassName) IID_##ClassName 5 | 6 | #ifdef __cplusplus 7 | 8 | #define DECLARE_CLASS_SIID(cls_id) \ 9 | static GUID GetIID(){ return cls_id;} 10 | 11 | template 12 | GUID TGuidOf(const T * obj=NULL)// specialize by class 13 | { 14 | return T::GetIID(); 15 | } 16 | 17 | #else 18 | 19 | #define DECLARE_CLASS_SIID(cls_id) 20 | 21 | #endif 22 | 23 | 24 | #endif//__SGUID_H_ -------------------------------------------------------------------------------- /depends/soui4/include/utilities/include/snew.h: -------------------------------------------------------------------------------- 1 | //copy from 2 | #ifndef __PLACEMENT_NEW_INLINE 3 | #define __PLACEMENT_NEW_INLINE 4 | #ifdef _MSC_VER 5 | inline void *__CRTDECL operator new(size_t, void *_Where) 6 | {return (_Where); } 7 | #if _MSC_VER >= 1200 8 | inline void __CRTDECL operator delete(void *, void *) 9 | {return; } 10 | #endif 11 | #else 12 | //mingw 已经定义了,不能重新定义。 13 | #include 14 | #endif 15 | #endif 16 | -------------------------------------------------------------------------------- /depends/soui4/include/utilities/include/soui_mem_wrapper.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | created: 2014/10/30 3 | created: 30:10:2014 10:24 4 | filename: soui_mem_wrapper.h 5 | author: soui group 6 | 7 | purpose: 包装内存动态分配 8 | *********************************************************************/ 9 | #ifndef __SOUI_MEM_WRAPPER__H__ 10 | #define __SOUI_MEM_WRAPPER__H__ 11 | #include "utilities-def.h" 12 | 13 | namespace SOUI 14 | { 15 | class UTILITIES_API soui_mem_wrapper 16 | { 17 | public: 18 | static void * SouiMalloc(size_t szMem); 19 | static void * SouiRealloc(void *p,size_t szMem); 20 | static void * SouiCalloc(size_t count, size_t szEle); 21 | static void SouiFree(void *p); 22 | }; 23 | } 24 | 25 | #endif // __SOUI_MEM_WRAPPER__H__ -------------------------------------------------------------------------------- /depends/soui4/include/utilities/include/string/sstringdata.h: -------------------------------------------------------------------------------- 1 | #ifndef __SSTRINGDATA__H__ 2 | #define __SSTRINGDATA__H__ 3 | #include "utilities-def.h" 4 | 5 | SNSBEGIN 6 | 7 | struct TStringData 8 | { 9 | int nRefs; // Reference count: negative == locked 10 | int nDataLength; // Length of currently used data in XCHARs (not including terminating null) 11 | int nAllocLength; // Length of allocated data in XCHARs (not including terminating null) 12 | 13 | void* data() const; 14 | 15 | void AddRef(); 16 | void Release(); 17 | bool IsShared() const; 18 | bool IsLocked() const; 19 | 20 | void Lock(); 21 | void Unlock(); 22 | 23 | static TStringData* InitDataNil(); 24 | static const void* InitPszNil(); 25 | }; 26 | 27 | SNSEND 28 | #endif // __SSTRINGDATA__H__ -------------------------------------------------------------------------------- /depends/soui4/include/utilities/include/string/strcpcvt.h: -------------------------------------------------------------------------------- 1 | #ifndef __STRCPCVT__H__ 2 | #define __STRCPCVT__H__ 3 | 4 | #include 5 | 6 | #ifndef CP_ACP 7 | #define CP_ACP 0 8 | #endif//CP_ACP 9 | 10 | #include "utilities-def.h" 11 | #include "tstring.h" 12 | 13 | 14 | SNSBEGIN 15 | class UTILITIES_API SStrCpCvt 16 | { 17 | public: 18 | static SStringA CvtW2A(const SStringW & str,unsigned int cp=CP_ACP); 19 | 20 | static SStringW CvtA2W(const SStringA & str,unsigned int cp=CP_ACP,unsigned int cp2=0); 21 | 22 | static SStringA CvtA2A(const SStringA & str,unsigned int cpFrom=CP_UTF8,unsigned int cpTo=CP_ACP); 23 | 24 | static SStringW CvtW2W(const SStringW &str,unsigned int cp=CP_ACP); 25 | 26 | }; 27 | 28 | SNSEND 29 | 30 | #define S_CA2W SStrCpCvt::CvtA2W 31 | #define S_CW2A SStrCpCvt::CvtW2A 32 | #define S_CA2A SStrCpCvt::CvtA2A 33 | #define S_CW2W SStrCpCvt::CvtW2W 34 | 35 | #ifdef UNICODE 36 | #define S_CA2T S_CA2W 37 | #define S_CT2A S_CW2A 38 | #define S_CW2T S_CW2W 39 | #define S_CT2W S_CW2W 40 | #else 41 | #define S_CA2T S_CA2A 42 | #define S_CT2A S_CA2A 43 | #define S_CW2T S_CW2A 44 | #define S_CT2W S_CA2W 45 | #endif // UNICODE 46 | 47 | #endif // __STRCPCVT__H__ -------------------------------------------------------------------------------- /depends/soui4/include/utilities/include/utilities-def.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if defined(DLL_CORE) && defined(_WIN32) 4 | #ifdef UTILITIES_EXPORTS 5 | #define UTILITIES_API __declspec(dllexport) 6 | #else 7 | #define UTILITIES_API __declspec(dllimport) 8 | #endif 9 | #else 10 | #define UTILITIES_API 11 | #endif 12 | 13 | 14 | #ifndef SASSERT 15 | #include 16 | #define SASSERT(x) assert(x) 17 | #endif 18 | 19 | #ifdef LIB_SOUI_COM 20 | #define SOUI_COM_API 21 | #define SOUI_COM_C 22 | #else 23 | #ifdef _WIN32 24 | #define SOUI_COM_API __declspec(dllexport) 25 | #else 26 | #define SOUI_COM_API 27 | #endif 28 | #define SOUI_COM_C EXTERN_C 29 | #endif//LIB_SOUI_COM 30 | 31 | #ifndef NULL 32 | #define NULL 0 33 | #endif 34 | 35 | #include 36 | #include 37 | #include 38 | -------------------------------------------------------------------------------- /depends/soui4/lib/Win32/soui4.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/lib/Win32/soui4.lib -------------------------------------------------------------------------------- /depends/soui4/lib/Win32/utilities4.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/lib/Win32/utilities4.lib -------------------------------------------------------------------------------- /depends/soui4/lib/X64/soui4.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/lib/X64/soui4.lib -------------------------------------------------------------------------------- /depends/soui4/lib/X64/utilities4.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/lib/X64/utilities4.lib -------------------------------------------------------------------------------- /depends/soui4/lib/deb/libimgdecoder-stb.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/lib/deb/libimgdecoder-stb.so -------------------------------------------------------------------------------- /depends/soui4/lib/deb/liblog4z.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/lib/deb/liblog4z.so -------------------------------------------------------------------------------- /depends/soui4/lib/deb/libmsftedit.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/lib/deb/libmsftedit.so -------------------------------------------------------------------------------- /depends/soui4/lib/deb/librender-gdi.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/lib/deb/librender-gdi.so -------------------------------------------------------------------------------- /depends/soui4/lib/deb/librender-skia.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/lib/deb/librender-skia.so -------------------------------------------------------------------------------- /depends/soui4/lib/deb/libresprovider-zip.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/lib/deb/libresprovider-zip.so -------------------------------------------------------------------------------- /depends/soui4/lib/deb/libscriptmodule-lua.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/lib/deb/libscriptmodule-lua.so -------------------------------------------------------------------------------- /depends/soui4/lib/deb/libsipcobject.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/lib/deb/libsipcobject.so -------------------------------------------------------------------------------- /depends/soui4/lib/deb/libsoui4.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/lib/deb/libsoui4.so -------------------------------------------------------------------------------- /depends/soui4/lib/deb/libswinx.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/lib/deb/libswinx.so -------------------------------------------------------------------------------- /depends/soui4/lib/deb/libtaskloop.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/lib/deb/libtaskloop.so -------------------------------------------------------------------------------- /depends/soui4/lib/deb/libtranslator.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/lib/deb/libtranslator.so -------------------------------------------------------------------------------- /depends/soui4/lib/deb/libutilities4.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/depends/soui4/lib/deb/libutilities4.so -------------------------------------------------------------------------------- /docimage/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/docimage/1.gif -------------------------------------------------------------------------------- /docimage/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/docimage/1.png -------------------------------------------------------------------------------- /docimage/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/docimage/2.png -------------------------------------------------------------------------------- /docimage/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/docimage/3.gif -------------------------------------------------------------------------------- /license.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/license.txt -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | **编译** 2 | 3 | 请将代码Clone到 SOUI目录/Demos\SouiEditor 4 | 5 | 编译SouiEditor后, 需要将SouiEditor目录的**Config目录拷贝到SouiEditor可执行文件**所在目录. 6 | 7 | **使用** 8 | 9 | 运行后主界面如下图: 10 | 11 | ![img](https://raw.githubusercontent.com/soui3-demo/SouiEditor/master/docimage/1.png) 12 | 13 | 14 | 15 | 主界面上, **Layout**标签页中列出所有窗体的XML文件, **XML文件** 列表中是除了窗体文件外的其它XML文件(如string, color 等的定义文件)。 16 | 17 | 在主界面中间, 切换到窗体标签页时, 双击Layout下的窗体文件, 将进入可视化编辑窗体. 18 | 19 | 如果是在XML编辑标签页激活时, 双击Layout下的窗体文件, 则直接以文件的方式打开窗体文件进行编辑(这时就相当于一个普通的文本编辑器, 修改后按Ctrl+S保存文件) 20 | 21 | 除窗体文件外的其它XML文件, 双击后在**XML编辑标签页** 打开,以文本方式编辑 22 | 23 | 24 | 25 | 在可视化编辑模式时,在窗体可视编辑窗口中点击控件,代码窗口会自动定位此控件代码。演示如下 26 | 27 | ![img](https://raw.githubusercontent.com/soui3-demo/SouiEditor/master/docimage/1.gif) 28 | 29 | 30 | 31 | 32 | 33 | **SouiEditor也支持以命令行方式打开工程, 如VS中可设置如下, 方便随时编辑**. 34 | 35 | ![img](https://raw.githubusercontent.com/soui3-demo/SouiEditor/master/docimage/2.png) 36 | 37 | 38 | 39 | 编辑器的代码编辑窗口提供了自动完成功能,省去了记忆很多控件名与属性等。 40 | 41 | **目前支持的自动完成功能如下。** 42 | 43 | 1、 增加控件提示 44 | 45 | > 按<后将出现所有控件的列表 46 | 47 | 2、 属性提示 48 | 49 | > 在任意控件范围内,输入任意属性则会进行提示 50 | 51 | 3、 自定义skin提示 52 | 53 | > 如在skin=” 按 . 将出现所有已定义的skin列表 54 | 55 | 4、 自定义class提示 56 | 57 | > 如在class=” 按 / 将出现所有已定义的style列表 58 | 59 | 5、 自定义string提示 60 | 61 | > @string/ 在已输入@string后按下/将出现所有已定义的字符串列表 62 | 63 | 6、 自定义color提示 64 | 65 | > @color/ 在已输入@ color后按下/将出现所有已定义的颜色列表 66 | 67 | 68 | 69 | 自动提示功能的演示参见下图: 70 | 71 | ![img](https://raw.githubusercontent.com/soui3-demo/SouiEditor/master/docimage/3.gif) -------------------------------------------------------------------------------- /uiPreview/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # 1394020320@qq.com 3 | # 4 | 5 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}) 6 | include_directories(${SOUI_INCLUDE}/config) 7 | include_directories(${SOUI_INCLUDE}/components) 8 | include_directories(${SOUI_INCLUDE}/utilities/include) 9 | include_directories(${SOUI_INCLUDE}/SOUI/include) 10 | include_directories(${SOUI_SRC_ROOT}/controls.extend) 11 | 12 | 13 | file(GLOB_RECURSE CURRENT_MONITOR monitor/*.*) 14 | file(GLOB_RECURSE CURRENT_SRCS src/*.*) 15 | 16 | file(GLOB BASE_SRCS *.h *.cpp) 17 | 18 | file(GLOB_RECURSE CURRENT_SOUIS *.xml *.idx *.ico) 19 | file(GLOB_RECURSE CURRENT_RC *.rc *.rc2) 20 | 21 | source_group("Base Files" FILES ${BASE_SRCS}) 22 | source_group("Monitor Files" FILES ${CURRENT_MONITOR}) 23 | source_group("Source Files" FILES ${CURRENT_SRCS}) 24 | source_group("SoUI Resouece" FILES ${CURRENT_SOUIS}) 25 | source_group("Resource Files" FILES ${CURRENT_RC}) 26 | 27 | if(CMAKE_SYSTEM_NAME MATCHES "Windows") 28 | add_executable(uiPreview WIN32 ${BASE_SRCS} ${CURRENT_MONITOR} ${CURRENT_SRCS} ${CURRENT_SOUIS} ${CURRENT_RC}) 29 | target_link_libraries(uiPreview soui4 utilities4) 30 | else() 31 | add_executable(uiPreview WIN32 ${BASE_SRCS} ${CURRENT_SRCS} ${CURRENT_SOUIS} ${CURRENT_RC}) 32 | target_link_libraries(uiPreview soui4 utilities4 swinx) 33 | endif() 34 | 35 | 36 | 37 | target_precompile_headers(uiPreview PRIVATE "stdafx.h") 38 | 39 | -------------------------------------------------------------------------------- /uiPreview/license.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/uiPreview/license.txt -------------------------------------------------------------------------------- /uiPreview/monitor/PathMonitor.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "PathMonitor.h" 3 | #include "../src/MainDlg.h" 4 | #include 5 | 6 | CPathMonitor::CPathMonitor(CMainDlg *pMainDlg):m_pMainDlg(pMainDlg) 7 | { 8 | } 9 | 10 | CPathMonitor::~CPathMonitor(void) 11 | { 12 | } 13 | 14 | UINT CPathMonitor::Run() 15 | { 16 | HANDLE h = FindFirstChangeNotification(m_strPath.c_str(),TRUE,FILE_NOTIFY_CHANGE_LAST_WRITE|FILE_NOTIFY_CHANGE_FILE_NAME|FILE_NOTIFY_CHANGE_DIR_NAME); 17 | if(h!=INVALID_HANDLE_VALUE) 18 | { 19 | HANDLE hs[2]={m_evtStop,h}; 20 | for(;;) 21 | { 22 | DWORD dwRet = WaitForMultipleObjects(2,hs,FALSE,INFINITE); 23 | if(dwRet==WAIT_OBJECT_0) 24 | { 25 | break; 26 | } 27 | STaskHelper::post(m_pMainDlg->GetMsgLoop(),m_pMainDlg,&CMainDlg::OnFileChanged); 28 | if(!FindNextChangeNotification(h)) 29 | { 30 | break; 31 | } 32 | } 33 | FindCloseChangeNotification(h); 34 | } 35 | return 0; 36 | } 37 | 38 | void CPathMonitor::SetPath(LPCTSTR pszPath) 39 | { 40 | if(IsRunning()) 41 | EndThread(); 42 | m_strPath = pszPath; 43 | BeginThread(); 44 | } 45 | -------------------------------------------------------------------------------- /uiPreview/monitor/PathMonitor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "ThreadObject.h" 3 | 4 | class CMainDlg; 5 | class CPathMonitor : public CThreadObject 6 | { 7 | CMainDlg * m_pMainDlg; 8 | std::tstring m_strPath; 9 | public: 10 | CPathMonitor(CMainDlg *pMainDlg); 11 | ~CPathMonitor(void); 12 | 13 | void SetPath(LPCTSTR pszPath); 14 | protected: 15 | virtual UINT Run() ; 16 | }; 17 | -------------------------------------------------------------------------------- /uiPreview/monitor/ThreadObject.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class CThreadObject 4 | { 5 | public: 6 | CThreadObject(); 7 | ~CThreadObject(); 8 | 9 | BOOL BeginThread(); 10 | 11 | BOOL EndThread(DWORD dwWaitEndMS = INFINITE); 12 | 13 | BOOL IsRunning() const; 14 | 15 | BOOL IsStoped() const; 16 | protected: 17 | //Work Function. 18 | virtual UINT Run() = 0; 19 | 20 | UINT ThreadProc(); 21 | static UINT __stdcall StaticTheadProc(LPVOID param); 22 | 23 | HANDLE m_evtStart; //工作线程通知宿主线程“线程启动”事件 24 | HANDLE m_evtStop; //宿主线程通知工作线程“线程结束”事件 25 | HANDLE m_hThread; //线程句柄 26 | }; 27 | 28 | -------------------------------------------------------------------------------- /uiPreview/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/uiPreview/readme.txt -------------------------------------------------------------------------------- /uiPreview/res/soui_res.rc2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/uiPreview/res/soui_res.rc2 -------------------------------------------------------------------------------- /uiPreview/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by uiPreview.rc 4 | // 5 | 6 | // Next default values for new objects 7 | // 8 | #ifdef APSTUDIO_INVOKED 9 | #ifndef APSTUDIO_READONLY_SYMBOLS 10 | #define _APS_NEXT_RESOURCE_VALUE 114 11 | #define _APS_NEXT_COMMAND_VALUE 40037 12 | #define _APS_NEXT_CONTROL_VALUE 1000 13 | #define _APS_NEXT_SYMED_VALUE 101 14 | #endif 15 | #endif 16 | -------------------------------------------------------------------------------- /uiPreview/src/LayoutAdapter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | 6 | class CLayoutAdapter : public SOUI::SAdapterBase 7 | { 8 | typedef std::pair FILEPAIR; 9 | typedef std::vector LAYOUTLIST; 10 | typedef std::vector INDEXLIST; 11 | LAYOUTLIST m_lstLayout; 12 | INDEXLIST m_lstIndex; 13 | SStringT m_strFilter; 14 | SStringT m_strDir; 15 | public: 16 | CLayoutAdapter(void); 17 | ~CLayoutAdapter(void); 18 | 19 | void SetFilter(SStringT strFilter); 20 | bool OpenUires(SStringT strUires); 21 | void CloseUires(); 22 | SStringT GetPath(int iItem) const; 23 | SStringT GetName(int iItem) const; 24 | SStringT GetDir() const; 25 | protected: 26 | virtual int WINAPI getCount() override; 27 | 28 | virtual void WINAPI getView(int position, SItemPanel * pItem, SXmlNode xmlTemplate) override; 29 | 30 | }; 31 | -------------------------------------------------------------------------------- /uiPreview/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // SkinTest.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | -------------------------------------------------------------------------------- /uiPreview/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #define _CRT_SECURE_NO_WARNINGS 9 | #define DLL_SOUI 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include "resource.h" 17 | #include "res/resource.h" 18 | using namespace SOUI; 19 | 20 | #include 21 | #ifdef _UNICODE 22 | #define tstring wstring 23 | #else 24 | #define tstring string 25 | #endif 26 | 27 | #include "../uieditor/Global.h" -------------------------------------------------------------------------------- /uiPreview/uiPreview.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/uiPreview/uiPreview.rc -------------------------------------------------------------------------------- /uiPreview/uires/image/item_bk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/uiPreview/uires/image/item_bk.png -------------------------------------------------------------------------------- /uiPreview/uires/image/soui.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/uiPreview/uires/image/soui.ico -------------------------------------------------------------------------------- /uiPreview/uires/uidef/init.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /uiPreview/uires/uires.idx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /uiPreview/uires/values/color.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /uiPreview/uires/values/skin.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /uiPreview/uires/values/string.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | <ver value="1.0"/> 5 | <about value="关于"/> 6 | </string> 7 | -------------------------------------------------------------------------------- /uiPreview/uires/xml/dlg_about.xml: -------------------------------------------------------------------------------- 1 | <SOUI name="mainWindow" title="@string/title" bigIcon="ICON_LOGO:32" smallIcon="ICON_LOGO:16" margin="5,5,5,5" resizable="1" wndType="normal" 2 | translucent="1" 3 | > 4 | <root skin="_skin.sys.wnd.bkgnd" cache="1" width="300" height="200" layout="vbox"> 5 | <caption size="-2,30" layout="hbox" gravity="center" padding_left="5"> 6 | <icon src="ICON_LOGO:16"/> 7 | <text extend_left="5">@string/about</text> 8 | <window size="0,0" weight="1"/> 9 | <imgbtn id="IDCANCEL" skin="_skin.sys.btn.close" tip="close" animate="1"/> 10 | </caption> 11 | <window layout="vbox" interval="10" gravity="left" size="-2,-2" padding="10,50,10,10"> 12 | <text>SOUI资源包预览器1.0版</text> 13 | <text>版权所有:启程软件</text> 14 | <window size="-1,-1" layout="hbox" interval="10" layout_gravity="center"> 15 | <link href="http://www.cnblogs.com/setoutsoft/" class="cls_btn_weblink">SOUI教程</link> 16 | <link href="http://www.soui.vip" class="cls_btn_weblink">SOUI论坛</link> 17 | </window> 18 | </window> 19 | </root> 20 | </SOUI> -------------------------------------------------------------------------------- /uieditor/CDebug.h: -------------------------------------------------------------------------------- 1 |  2 | class CDebug 3 | { 4 | public: 5 | CDebug(){}; 6 | ~CDebug(){}; 7 | 8 | static void Debug(pugi::xml_node xmlNode) 9 | { 10 | pugi::xml_writer_buff writer; 11 | xmlNode.print(writer,L"\t",pugi::format_default,pugi::encoding_utf16); 12 | SStringW strDebug(writer.buffer(),writer.size()); 13 | SMessageBox(0, S_CW2T(strDebug), _T("提示"), MB_OK); 14 | }; 15 | 16 | static void Debug(SStringT str) 17 | { 18 | SMessageBox(0, str, _T("提示"), MB_OK); 19 | }; 20 | static SStringT Debug1(pugi::xml_node xmlNode) 21 | { 22 | pugi::xml_writer_buff writer; 23 | xmlNode.print(writer,L"\t",pugi::format_default,pugi::encoding_utf16); 24 | return S_CW2T(SStringW(writer.buffer(),writer.size())); 25 | }; 26 | 27 | private: 28 | 29 | }; -------------------------------------------------------------------------------- /uieditor/Config/LayoutTmpl/Dialog.xml: -------------------------------------------------------------------------------- 1 | <SOUI name="window" title="布局" 2 | bigIcon="ICON_LOGO:32" smallIcon="ICON_LOGO:16" 3 | width="800" height="600" margin="1,5,5,5" 4 | wndType="8" 5 | toolWindow="1" 6 | > 7 | <root cache="1"> 8 | <window pos="0,0,-0,-0" colorBkgnd="rgb(50,126,173)" colorText="#ffffff"> 9 | <caption pos="0,0,-0,30" focusable="1" drawfocusrect="0"> 10 | 11 | <text pos="5,4" name="txt_title">标题</text> 12 | 13 | <imgbtn skin="_skin.sys.btn.close" pos="-45,0" tip="close" animate="1"/> 14 | <imgbtn skin="_skin.sys.btn.maximize" pos="-83,0" animate="1" /> 15 | <imgbtn skin="_skin.sys.btn.restore" pos="-83,0" show="0" animate="1" /> 16 | <imgbtn skin="_skin.sys.btn.minimize" pos="-121,0" animate="1" /> 17 | 18 | </caption> 19 | </window> 20 | 21 | 22 | 23 | </root> 24 | </SOUI> -------------------------------------------------------------------------------- /uieditor/Config/LayoutTmpl/Include.xml: -------------------------------------------------------------------------------- 1 | <window size="500,500"> 2 | 3 | </window> -------------------------------------------------------------------------------- /uieditor/Config/img/ctrl_icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/uieditor/Config/img/ctrl_icons.png -------------------------------------------------------------------------------- /uieditor/Config/img/skin_icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/uieditor/Config/img/skin_icons.png -------------------------------------------------------------------------------- /uieditor/DesignWnd.cpp: -------------------------------------------------------------------------------- 1 | // ScintillaWnd.cpp : 实现文件 2 | // 3 | 4 | #include "stdafx.h" 5 | #include "DesignWnd.h" 6 | #include <shellapi.h> 7 | #pragma comment(lib,"Msimg32.lib") 8 | 9 | ////////////////////////////////////////////////////////////////////////// 10 | 11 | 12 | CDesignWnd::CDesignWnd() 13 | { 14 | } 15 | 16 | CDesignWnd::~CDesignWnd() 17 | { 18 | } 19 | 20 | 21 | void CDesignWnd::RefreshDesignLayout() 22 | { 23 | HWND hChild = ::GetWindow(m_hWnd,GW_CHILD); 24 | if ( hChild ) 25 | { 26 | CRect rc; 27 | SNativeWnd::GetClientRect(&rc); 28 | ::SetWindowPos(hChild,NULL,0,0,rc.Width(),rc.Height(),SWP_NOZORDER); 29 | }else 30 | { 31 | SNativeWnd::Invalidate(); 32 | } 33 | } 34 | 35 | void CDesignWnd::OnSize(UINT nType, CSize size) 36 | { 37 | RefreshDesignLayout(); 38 | SetMsgHandled(FALSE); 39 | } 40 | -------------------------------------------------------------------------------- /uieditor/DesignWnd.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class CDesignWnd : public SHostWnd 4 | { 5 | public: 6 | CDesignWnd(); 7 | virtual ~CDesignWnd(); 8 | 9 | protected: 10 | void RefreshDesignLayout(); 11 | void OnSize(UINT nType, CSize size); 12 | 13 | BEGIN_MSG_MAP_EX(CDesignWnd) 14 | MSG_WM_SIZE(OnSize) 15 | CHAIN_MSG_MAP(SHostWnd) 16 | END_MSG_MAP() 17 | }; 18 | -------------------------------------------------------------------------------- /uieditor/Dialog/DlgAbout.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "DlgAbout.h" 3 | #include "CDebug.h" 4 | 5 | namespace SOUI 6 | { 7 | 8 | SDlgAbout::SDlgAbout(): 9 | SHostDialog(_T("LAYOUT:UIDESIGNER_XML_ABOUT")) 10 | { 11 | } 12 | 13 | //TODO:消息映射 14 | void SDlgAbout::OnClose() 15 | { 16 | SHostDialog::OnCancel(); 17 | } 18 | 19 | void SDlgAbout::OnOK() 20 | { 21 | 22 | SHostDialog::OnOK(); 23 | } 24 | 25 | BOOL SDlgAbout::OnInitDialog(HWND wndFocus, LPARAM lInitParam) 26 | { 27 | 28 | return TRUE; 29 | } 30 | 31 | } 32 | 33 | 34 | -------------------------------------------------------------------------------- /uieditor/Dialog/DlgAbout.h: -------------------------------------------------------------------------------- 1 | #ifndef _DLG_ABOUT_H_ 2 | #define _DLG_ABOUT_H_ 3 | 4 | #include "core/SHostDialog.h" 5 | 6 | namespace SOUI 7 | { 8 | class SDlgAbout: public SHostDialog 9 | { 10 | public: 11 | SDlgAbout(); 12 | 13 | ~SDlgAbout(void) 14 | { 15 | 16 | } 17 | 18 | void OnClose(); 19 | void OnBtnDlgOpenFile(); 20 | 21 | BOOL OnInitDialog(HWND wndFocus, LPARAM lInitParam); 22 | protected: 23 | void OnOK(); 24 | 25 | EVENT_MAP_BEGIN() 26 | 27 | EVENT_ID_COMMAND(IDOK,OnOK) 28 | EVENT_MAP_END2(SHostDialog) 29 | 30 | BEGIN_MSG_MAP_EX(SDlgAbout) 31 | MSG_WM_INITDIALOG(OnInitDialog) 32 | CHAIN_MSG_MAP(SHostDialog) 33 | REFLECT_NOTIFICATIONS_EX() 34 | END_MSG_MAP() 35 | }; 36 | 37 | } 38 | 39 | #endif//_DLG_ABOUT_H_ -------------------------------------------------------------------------------- /uieditor/Dialog/DlgCreatePro.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "DlgCreatePro.h" 3 | 4 | namespace SOUI 5 | { 6 | void SDlgCreatePro::OnOK() 7 | { 8 | SEdit *edit = FindChildByName2<SEdit>(L"UIDESIGNER_edit_input"); 9 | m_strinput = edit->GetWindowText(); 10 | SHostDialog::OnOK(); 11 | } 12 | } -------------------------------------------------------------------------------- /uieditor/Dialog/DlgCreatePro.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014-2050 3 | * All rights reserved. 4 | * 5 | * @file SHostDialog.h 6 | * @brief 7 | * @version v1.0 8 | * @author SOUI group 9 | * @date 2014/08/02 10 | * 11 | * Describe SOUI的Dialog模块 12 | */ 13 | 14 | #pragma once 15 | #include "core/SMsgLoop.h" 16 | #include "core/SHostDialog.h" 17 | #include "control/SRichEdit.h" 18 | 19 | namespace SOUI 20 | { 21 | class SDlgCreatePro: public SHostDialog 22 | { 23 | public: 24 | SDlgCreatePro(LPCTSTR pszXmlName):SHostDialog(pszXmlName) 25 | { 26 | 27 | } 28 | ~SDlgCreatePro(void) 29 | { 30 | 31 | } 32 | 33 | protected: 34 | void OnOK(); 35 | 36 | EVENT_MAP_BEGIN() 37 | EVENT_ID_COMMAND(IDOK,OnOK) 38 | EVENT_MAP_END2(SHostDialog) 39 | 40 | BEGIN_MSG_MAP_EX(SCreateProDlg) 41 | CHAIN_MSG_MAP(SHostDialog) 42 | REFLECT_NOTIFICATIONS_EX() 43 | END_MSG_MAP() 44 | 45 | public: 46 | SStringT m_strinput; 47 | }; 48 | 49 | } -------------------------------------------------------------------------------- /uieditor/Dialog/DlgInput.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "DlgInput.h" 3 | #include "CDebug.h" 4 | 5 | namespace SOUI 6 | { 7 | 8 | SDlgInput::SDlgInput():SHostDialog(_T("LAYOUT:UIDESIGNER_XML_INPUT")) 9 | { 10 | 11 | } 12 | 13 | //TODO:消息映射 14 | void SDlgInput::OnClose() 15 | { 16 | SHostDialog::OnCancel(); 17 | } 18 | 19 | void SDlgInput::OnOK() 20 | { 21 | 22 | m_strValue = m_edt->GetWindowText(); 23 | if (m_strValue.IsEmpty()) 24 | { 25 | CDebug::Debug(_T("请输入内容")); 26 | return; 27 | } 28 | SHostDialog::OnOK(); 29 | } 30 | 31 | BOOL SDlgInput::OnInitDialog(HWND wndFocus, LPARAM lInitParam) 32 | { 33 | m_edt = FindChildByName2<SEdit>(L"edtInput"); 34 | 35 | return TRUE; 36 | } 37 | 38 | } 39 | 40 | 41 | -------------------------------------------------------------------------------- /uieditor/Dialog/DlgInput.h: -------------------------------------------------------------------------------- 1 | #ifndef _DLGINPUT_H_ 2 | #define _DLGINPUT_H_ 3 | 4 | #include "core/SHostDialog.h" 5 | 6 | namespace SOUI 7 | { 8 | class SDlgInput: public SHostDialog 9 | { 10 | public: 11 | SDlgInput(); 12 | 13 | ~SDlgInput(void) 14 | { 15 | 16 | } 17 | 18 | 19 | void OnBtnDlgOpenFile(); 20 | 21 | BOOL OnInitDialog(HWND wndFocus, LPARAM lInitParam); 22 | 23 | 24 | 25 | protected: 26 | void OnOK(); 27 | void OnClose(); 28 | 29 | EVENT_MAP_BEGIN() 30 | 31 | EVENT_NAME_COMMAND(L"btnOK", OnOK) 32 | EVENT_NAME_COMMAND(L"btnCancel", OnClose) 33 | EVENT_MAP_END2(SHostDialog) 34 | 35 | BEGIN_MSG_MAP_EX(SDlgInput) 36 | MSG_WM_INITDIALOG(OnInitDialog) 37 | CHAIN_MSG_MAP(SHostDialog) 38 | REFLECT_NOTIFICATIONS_EX() 39 | END_MSG_MAP() 40 | 41 | protected: 42 | 43 | public: 44 | SStringT m_strValue; 45 | SEdit *m_edt; 46 | }; 47 | 48 | } 49 | 50 | #endif//_DLGINPUT_H_ -------------------------------------------------------------------------------- /uieditor/Global.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | const LPCTSTR ksz_editor_wnd = _T("soui editor"); 4 | const LPCTSTR ksz_editor_cls = _T("soui_editor_cls"); 5 | 6 | const LPCTSTR ksz_uipreview_wnd = _T("soui preview"); 7 | const LPCTSTR ksz_uipreview_cls = _T("soui_preview_cls"); 8 | 9 | const int update_buf_id = 500; 10 | const int exitviewer_id = 501; 11 | const int selctrl_id = 502; 12 | const int setviewerpos_id = 503; 13 | const int update_file_id = 504; 14 | const int select_id = 505; 15 | const int kmsg_viewer_create = (WM_USER+300); 16 | const int kmsg_heart = (WM_USER + 301); 17 | const int kmsg_viewer_destroy = (WM_USER + 303); 18 | const LPCTSTR uiedit_SpecAttr = _T("UiEdit_windowText"); 19 | -------------------------------------------------------------------------------- /uieditor/SImageBtnEx.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "SImageBtnEx.h" 3 | 4 | void SOUI::SImageBtnEx::OnPaint( IRenderTarget *pRT ) 5 | { 6 | __baseCls::OnPaint(pRT); 7 | SPainter painter; 8 | 9 | BeforePaint(pRT, painter); 10 | 11 | if (m_pIcon) 12 | { 13 | SIZE sz = m_pIcon->GetSkinSize(); 14 | CRect rc = GetWindowRect(); 15 | rc.left += m_IconOffsetX; 16 | rc.top += m_IconOffsetY; 17 | rc.right = rc.left + sz.cx; 18 | rc.bottom = rc.top + sz.cy; 19 | m_pIcon->DrawByIndex(pRT, rc, 0); 20 | } 21 | 22 | if (!m_strText.IsEmpty()) 23 | { 24 | SIZE szChar; 25 | pRT->MeasureText(m_strText, m_strText.GetLength(), &szChar); 26 | CRect chRc = GetWindowRect(); 27 | chRc.left += (chRc.Width() - szChar.cx)/2 + m_TextOffsetX; 28 | chRc.top += (chRc.Height() - szChar.cy)/2 ; 29 | if (GetState() & WndState_PushDown) chRc.top++; 30 | chRc.right = chRc.left + szChar.cx; 31 | chRc.bottom = chRc.top + szChar.cy; 32 | pRT->DrawText(m_strText, m_strText.GetLength(), chRc, GetTextAlign()); 33 | } 34 | 35 | AfterPaint(pRT, painter); 36 | } -------------------------------------------------------------------------------- /uieditor/SImageBtnEx.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include <core/SWnd.h> 3 | #include <control/SCmnCtrl.h> 4 | 5 | namespace SOUI 6 | { 7 | class SImageBtnEx :public SImageButton 8 | { 9 | DEF_SOBJECT(SImageButton, L"imgbtnex") 10 | public: 11 | SImageBtnEx() :m_IconOffsetX(5), m_IconOffsetY(8), m_TextOffsetX(0), m_TextOffsetY(18), m_pIcon(NULL) 12 | { 13 | 14 | } 15 | ~SImageBtnEx() {} 16 | protected://消息处理,SOUI控件的消息处理和WTL,MFC很相似,采用相似的映射表,相同或者相似的消息映射宏 17 | void OnPaint(IRenderTarget *pRT); 18 | //SOUI控件消息映射表 19 | SOUI_MSG_MAP_BEGIN() 20 | MSG_WM_PAINT_EX(OnPaint) 21 | SOUI_MSG_MAP_END() 22 | 23 | ISkinObj *m_pIcon; //图标 24 | SStringT m_strText; //文字 25 | int m_IconOffsetX, m_IconOffsetY, m_TextOffsetX, m_TextOffsetY;//相对居中位置偏移量 26 | SOUI_ATTRS_BEGIN() 27 | ATTR_SKIN(L"icon", m_pIcon, TRUE) 28 | ATTR_STRINGT(L"text", m_strText, FALSE) 29 | SOUI_ATTRS_END() 30 | }; 31 | } -------------------------------------------------------------------------------- /uieditor/SImgCanvas.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace SOUI 4 | { 5 | class SImgCanvas : public SWindow 6 | { 7 | DEF_SOBJECT(SWindow, L"imgcanvas") 8 | public: 9 | SImgCanvas(void); 10 | ~SImgCanvas(void); 11 | 12 | BOOL AddFile(LPCTSTR pszFileName); 13 | void Clear(); 14 | 15 | // 获取当前显示图像的长和宽 16 | CSize GetImgInfo(); 17 | 18 | CSize GetDesiredSize(LPCRECT pRcContainer); 19 | 20 | BOOL Save2File(LPCWSTR pszFileName,int nSplit=1); 21 | void SetVertical(BOOL bVert); 22 | protected: 23 | void OnPaint(IRenderTarget *pRT); 24 | 25 | 26 | SOUI_MSG_MAP_BEGIN() 27 | MSG_WM_PAINT_EX(OnPaint) 28 | SOUI_MSG_MAP_END() 29 | 30 | BOOL m_bVert; 31 | SList<IBitmapS*> m_lstImg; 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /uieditor/SouiEditor.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/uieditor/SouiEditor.rc -------------------------------------------------------------------------------- /uieditor/SouiEditorApp.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "SouiEditorApp.h" 3 | 4 | 5 | SouiEditorApp::SouiEditorApp(IRenderFactory *pRendFactory, HINSTANCE hInst, LPCTSTR pszHostClassName /*= _T("SOUIHOST")*/) : SApplication(pRendFactory, hInst, pszHostClassName) 6 | { 7 | } 8 | 9 | -------------------------------------------------------------------------------- /uieditor/SouiEditorApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class SouiEditorApp :public SApplication 4 | { 5 | public: 6 | SouiEditorApp(IRenderFactory *pRendFactory, HINSTANCE hInst, LPCTSTR pszHostClassName); 7 | }; 8 | -------------------------------------------------------------------------------- /uieditor/SouiRealWndHandler.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <helper/obj-ref-impl.hpp> 4 | 5 | namespace SOUI 6 | { 7 | class CSouiRealWndHandler :public TObjRefImpl2<IRealWndHandler,CSouiRealWndHandler> 8 | { 9 | public: 10 | CSouiRealWndHandler(void); 11 | ~CSouiRealWndHandler(void); 12 | 13 | /** 14 | * SRealWnd::OnRealWndCreate 15 | * @brief 窗口创建 16 | * @param SRealWnd *pRealWnd -- 窗口指针 17 | * 18 | * Describe 窗口创建 19 | */ 20 | STDMETHOD_(HWND, OnRealWndCreate)(THIS_ IWindow * pRealWnd) OVERRIDE; 21 | 22 | /** 23 | * SRealWnd::OnRealWndDestroy 24 | * @brief 销毁窗口 25 | * @param SRealWnd *pRealWnd -- 窗口指针 26 | * 27 | * Describe 销毁窗口 28 | */ 29 | STDMETHOD_(void, OnRealWndDestroy)(THIS_ IWindow * pRealWnd) OVERRIDE; 30 | 31 | /** 32 | * SRealWnd::OnRealWndInit 33 | * @brief 初始化窗口 34 | * @param SRealWnd *pRealWnd -- 窗口指针 35 | * @return BOOL -- FALSE:交由系统处理,TRUE:用户处理 36 | * 37 | * Describe 初始化窗口 38 | */ 39 | STDMETHOD_(BOOL, OnRealWndInit)(THIS_ IWindow * pRealWnd) OVERRIDE; 40 | 41 | /** 42 | * SRealWnd::OnRealWndPosition 43 | * @brief 调整窗口位置 44 | * @param SRealWnd *pRealWnd -- 窗口指针 45 | * @return BOOL -- FALSE:交由SOUI处理; TRUE:用户管理窗口的移动 46 | * 47 | * Describe 调整窗口大小 48 | */ 49 | STDMETHOD_(BOOL, OnRealWndPosition)(THIS_ IWindow * pRealWnd, const RECT *rcWnd) OVERRIDE; 50 | 51 | }; 52 | 53 | } 54 | -------------------------------------------------------------------------------- /uieditor/SysdataMgr.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <set> 4 | 5 | class CSysDataMgr : public SOUI::SSingleton<CSysDataMgr> 6 | { 7 | public: 8 | struct CtrlAttrItem 9 | { 10 | SStringT attrname; 11 | pugi::xml_document* attrdoc; 12 | CtrlAttrItem() { ; } 13 | CtrlAttrItem(SStringT name, pugi::xml_node xmlnode) 14 | { 15 | attrname = name; 16 | attrdoc = new pugi::xml_document(); 17 | attrdoc->append_copy(xmlnode); 18 | } 19 | }; 20 | 21 | typedef SArray<CtrlAttrItem> CTRL_ATTR_VALUE; 22 | 23 | CSysDataMgr(); 24 | ~CSysDataMgr(); 25 | 26 | // 读取系统数据, 控件属性表 27 | bool LoadSysData(LPCTSTR cfgDir); 28 | 29 | SStringT GetConfigDir() const; 30 | 31 | void InitSkinProp(); 32 | 33 | void InitCtrlDef(); 34 | 35 | // 获取控件名称列表 36 | SStringA GetCtrlAutos(); 37 | 38 | // 获取指定控件的自动完成字串 39 | SStringA GetCtrlAttrAutos(SStringW ctrlname); 40 | 41 | SStringA GetSkinAutos(); 42 | 43 | SStringA GetSkinAttrAutos(SStringW skinName); 44 | 45 | pugi::xml_node getCtrlDefNode(); 46 | 47 | pugi::xml_node getSkinDefNode(); 48 | private: 49 | void _GetSkinAttrs(SStringW skinName,std::set<SStringW> &attrs); 50 | void _GetCtrlAttrs(SStringW skinName,std::set<SStringW> &attrs); 51 | 52 | pugi::xml_document m_xmlCtrlDef; 53 | 54 | pugi::xml_document m_xmlSkinProp; 55 | 56 | SStringT m_strConfigDir; 57 | }; -------------------------------------------------------------------------------- /uieditor/XmlParser.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "spugixml/pugixml.hpp" 4 | 5 | struct NodeRange 6 | { 7 | int begin; 8 | int _break; 9 | int end; 10 | }; 11 | 12 | class CXmlParser : public spugi::xml_document, spugi::xml_parse_listener 13 | { 14 | public: 15 | CXmlParser(void); 16 | ~CXmlParser(void); 17 | 18 | bool loadUtf8(const char *utf8,int nLen); 19 | 20 | NodeRange getNodePos(int *nodePos,int nLen); 21 | 22 | bool isRootLayout() const; 23 | SStringA getRootName() const; 24 | protected: 25 | virtual void on_node_begin(spugi::xml_node node,int pos); 26 | 27 | virtual void on_node_end(spugi::xml_node node,int pos); 28 | 29 | virtual void on_node_free(spugi::xml_node node); 30 | 31 | virtual void on_node_break(xml_node node,int pos); 32 | 33 | const char *m_utf8Loading; 34 | int m_utf8Len; 35 | DWORD m_tsLoad; 36 | }; 37 | 38 | -------------------------------------------------------------------------------- /uieditor/build_rc2.bat: -------------------------------------------------------------------------------- 1 | %SOUI4PATH%\tools\uiresbuilder.exe -i "uires\uires.idx" -p uires -r .\res\soui_res.rc2 -h .\res\resource.h idtable 2 | -------------------------------------------------------------------------------- /uieditor/createpro.bat: -------------------------------------------------------------------------------- 1 | %SOUI4PATH%\tools\qmake -project -spec %SOUI4PATH%\tools\mkspecs\win32-msvc2008 -------------------------------------------------------------------------------- /uieditor/helpapi.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "helpapi.h" 3 | 4 | bool FileIsExist(const SStringT &filepath) 5 | { 6 | WIN32_FIND_DATA FindFileData; 7 | HANDLE hFind; 8 | hFind = FindFirstFile(filepath, &FindFileData); 9 | if (hFind == INVALID_HANDLE_VALUE) { 10 | return false; 11 | } 12 | else { 13 | FindClose(hFind); 14 | return true; 15 | } 16 | } 17 | 18 | SStringT GetFileExtname(const SStringT& filepath) 19 | { 20 | int pos = filepath.ReverseFind(_T('.')); 21 | if(pos==-1) 22 | return _T(""); 23 | else{ 24 | if(pos>0 && filepath[pos-1]==_T(SLASH)) 25 | return _T(""); 26 | return filepath.Right(filepath.GetLength()-pos-1); 27 | } 28 | } 29 | 30 | SStringT GetFilename(const SStringT& filepath) 31 | { 32 | #ifdef _WIN32 33 | TCHAR szName[MAX_PATH] = { 0 }; 34 | _tsplitpath(filepath, NULL, NULL, szName, NULL); 35 | return szName; 36 | #else 37 | int pos1 = filepath.ReverseFind(_T('/')); 38 | if(pos1==-1){ 39 | return _T(""); 40 | } 41 | int pos2 = filepath.ReverseFind(_T('.')); 42 | if(pos2 < pos1) pos2 = filepath.GetLength(); 43 | return filepath.Mid(pos1+1,pos2-pos1-1); 44 | #endif//_WIN32 45 | } 46 | 47 | //自定义排序函数 48 | bool SortSString(const SStringT &v1, const SStringT &v2) 49 | { 50 | return v1 < v2; //升序排列 51 | } 52 | 53 | bool SortSStringNoCase(const SStringT &v1, const SStringT &v2) 54 | { 55 | return v1.CompareNoCase(v2) < 0; //升序排列 56 | } 57 | 58 | bool SortSStringNoCaseW(const SStringW &v1, const SStringW &v2) 59 | { 60 | return v1.CompareNoCase(v2) < 0; //升序排列 61 | } -------------------------------------------------------------------------------- /uieditor/helpapi.h: -------------------------------------------------------------------------------- 1 | #ifndef _FILE_HELPER_API_H_ 2 | #define _FILE_HELPER_API_H_ 3 | 4 | #ifdef _WIN32 5 | #define SLASH '\\' 6 | #else 7 | #define SLASH '/' 8 | #endif//_WIN32 9 | 10 | bool FileIsExist(const SStringT &filepath); 11 | SStringT GetFileExtname(const SStringT& filepath); 12 | SStringT GetFilename(const SStringT& filepath); 13 | 14 | bool SortSString(const SStringT &v1, const SStringT &v2); 15 | bool SortSStringNoCase(const SStringT &v1, const SStringT &v2); 16 | bool SortSStringNoCaseW(const SStringW &v1, const SStringW &v2); 17 | 18 | #endif//_FILE_HELPER_API_H_ -------------------------------------------------------------------------------- /uieditor/license.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/uieditor/license.txt -------------------------------------------------------------------------------- /uieditor/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/uieditor/readme.txt -------------------------------------------------------------------------------- /uieditor/res/soui_res.rc2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/uieditor/res/soui_res.rc2 -------------------------------------------------------------------------------- /uieditor/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ 生成的包含文件。 3 | // 供 SouiEditor.rc 使用 4 | // 5 | #define IDI_ICON1 114 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 115 12 | #define _APS_NEXT_COMMAND_VALUE 40037 13 | #define _APS_NEXT_CONTROL_VALUE 1000 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /uieditor/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // SkinTest.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | -------------------------------------------------------------------------------- /uieditor/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #define _CRT_SECURE_NO_WARNINGS 9 | #define DLL_SOUI 10 | //#include <winsock2.h> 11 | 12 | #include <souistd.h> 13 | #include <core/SHostDialog.h> 14 | #include <control/SMessageBox.h> 15 | #include <control/SouiCtrls.h> 16 | #include <res.mgr/SObjDefAttr.h> 17 | #include <com-cfg.h> 18 | #include <SouiFactory.h> 19 | #include "resource.h" 20 | #include "FileHelper.h" 21 | #include "res/resource.h" 22 | #include <helper/SAdapterBase.h> 23 | 24 | using namespace SOUI; 25 | 26 | #include "SouiEditorApp.h" -------------------------------------------------------------------------------- /uieditor/uires/image/app_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/uieditor/uires/image/app_button.png -------------------------------------------------------------------------------- /uieditor/uires/image/btn_help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/uieditor/uires/image/btn_help.png -------------------------------------------------------------------------------- /uieditor/uires/image/caption_line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/uieditor/uires/image/caption_line.png -------------------------------------------------------------------------------- /uieditor/uires/image/default.scrollbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/uieditor/uires/image/default.scrollbar.png -------------------------------------------------------------------------------- /uieditor/uires/image/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/uieditor/uires/image/logo.png -------------------------------------------------------------------------------- /uieditor/uires/image/menu_sep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/uieditor/uires/image/menu_sep.png -------------------------------------------------------------------------------- /uieditor/uires/image/menu_skin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/uieditor/uires/image/menu_skin.png -------------------------------------------------------------------------------- /uieditor/uires/image/msg_btn_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/uieditor/uires/image/msg_btn_blue.png -------------------------------------------------------------------------------- /uieditor/uires/image/open_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/uieditor/uires/image/open_menu.png -------------------------------------------------------------------------------- /uieditor/uires/image/propswitch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/uieditor/uires/image/propswitch.png -------------------------------------------------------------------------------- /uieditor/uires/image/soui.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/uieditor/uires/image/soui.ico -------------------------------------------------------------------------------- /uieditor/uires/image/soui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/uieditor/uires/image/soui.png -------------------------------------------------------------------------------- /uieditor/uires/image/tab_skin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/uieditor/uires/image/tab_skin.png -------------------------------------------------------------------------------- /uieditor/uires/image/tb_prop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/uieditor/uires/image/tb_prop.png -------------------------------------------------------------------------------- /uieditor/uires/image/tool_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/uieditor/uires/image/tool_button.png -------------------------------------------------------------------------------- /uieditor/uires/image/toolbar_state.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/uieditor/uires/image/toolbar_state.png -------------------------------------------------------------------------------- /uieditor/uires/image/tree_toggle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/uieditor/uires/image/tree_toggle.png -------------------------------------------------------------------------------- /uieditor/uires/smenu/menu_layoutfile.xml: -------------------------------------------------------------------------------- 1 | <menuRoot itemSkin="skin_menu_skin_png" itemHeight="26" iconPos="4,4" textOffset="5" iconBarWidth="24" maxWidth="180" minWidth="170" margin="1,1,1,1" colorText="@color/white" colorBkgnd="@color/bkBlack1" > 2 | <menuItem id="100" >@string/openincode</menuItem> 3 | </menuRoot> -------------------------------------------------------------------------------- /uieditor/uires/smenu/menu_recent.xml: -------------------------------------------------------------------------------- 1 | <menuRoot itemSkin="skin_menu_skin_png" itemHeight="30" textOffset="5" iconBarWidth="5" maxWidth="800" minWidth="180" colorText="@color/white" colorBkgnd="#505050" > 2 | 3 | </menuRoot> 4 | 5 | -------------------------------------------------------------------------------- /uieditor/uires/uidef/init.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <UIDEF> 3 | <font face="微软雅黑" size="15"/> 4 | 5 | <string src="values:string" /> 6 | <skin src="values:skin"/> 7 | <color src="values:color"/> 8 | 9 | 10 | <style> 11 | <class name="ue_cls_whiltebtn" font="" colorText="@color/white" colorTextDisable="#91a7c0" textMode="0x25" cursor="hand" margin-x="0"/> 12 | <class name="ue_cls_btn_weblink" cursor="hand" colorText="#1e78d5" colorTextHover="#1e78d5" font="italic:1" fontHover="underline:1,italic:1" /> 13 | <class name="ue_cls_title" colorText="#ffffffff" font="face:微软雅黑;bold:1;size:13" colorTextDisable="#888888ff"/> 14 | <class name="ue_cls_text" colorText="#ffffffff" font="face:微软雅黑;size:14" colorTextDisable="#888888ff"/> 15 | </style> 16 | 17 | <objattr> 18 | <div sbSkin="skin_bb_scrollbar" /> 19 | <edit margin-x="1" margin-y="1" colorBorder="@color/gray" colorBkgnd="#ffffff22" colorText="@color/white"/> 20 | <text colorText="@color/white"></text> 21 | </objattr> 22 | </UIDEF> -------------------------------------------------------------------------------- /uieditor/uires/values/color.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | 3 | <color> 4 | <red value="rgb(255,0,0)"/> 5 | <green value="rgb(0,255,0)"/> 6 | <blue value="rgb(0,0,255)"/> 7 | <white value="rgb(255,255,255)"/> 8 | <black value="rgb(0,0,0)"/> 9 | <gray value="#808080"/> 10 | <imgprviewbg value="#ffffa0" /> 11 | <bkBlack1 value="#2d2d30"/> 12 | <bkBlack2 value="#292b2f"/> 13 | <itemHover value="#3f6c8e" /> 14 | <itemSelected value="rgb(234,128,16)" /> 15 | </color> 16 | -------------------------------------------------------------------------------- /uieditor/uires/values/skin.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <skin> 3 | <imglist name="skin_main_icon" src="IMG:icon_main" states="1" /> 4 | <imglist name="skin_logo" src="img:png_logo" filterLevel="high"/> 5 | <imglist name="skin_open_menu_png" src="IMG:open_menu_png" states="4" /> 6 | <scrollbar name="skin_bb_scrollbar" src="img:default.scrollbar" margin="2" /> 7 | <imglist name="skin_caption_line" src="img:caption_line" /> 8 | <imgframe name="skin_app_button" src="img:png_tool_button" states="3" margin="5,5,5,5"/> 9 | <imglist name="skin_prop_switch" src="img:png_prop_switch" states="4" /> 10 | <imglist name="skin_tab_skin" src="img:png_tab_skin" states="3" /> 11 | <imglist name="skin_blue_button" src="img:png_btn_blue" states="3" /> 12 | <imglist name="skin_app_button2" src="img:png_app_button" states="3" /> 13 | <imglist name="skin_tree_toggle_png" src="IMG:tree_toggle_png" states="6" /> 14 | <imglist name="skin_menu_skin_png" src="IMG:menu_skin_png" states="2" /> 15 | <imglist name="skin_menu_sep_png" src="IMG:menu_sep_png" states="1" /> 16 | <imgframe name="skin_toolbar_state" src="img:png_toolbar_state" states="3" margin="5,5,5,5"/> 17 | <imglist name="skin_toolbar_prop" src="img:png_toolbar_prop" states="2"/> 18 | <imglist name="skin_help" src="img:png_btn_help" states="3"/> 19 | </skin> 20 | -------------------------------------------------------------------------------- /uieditor/uires/values/string.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <string> 3 | <title value="SOUI 界面编辑器4.0"/> 4 | <ver value="4.0"/> 5 | <openincode value="在XML编辑中打开" /> 6 | </string> 7 | -------------------------------------------------------------------------------- /uieditor/uires/xml/dlg_about.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0"?> 2 | <SOUI name="window" title="布局" bigIcon="ICON_LOGO:32" smallIcon="ICON_LOGO:16" width="400" height="300" margin="1,5,5,5" wndType="8" toolWindow="1"> 3 | <root cache="1"> 4 | <window pos="0,0,-0,-0" colorBkgnd="@color/bkBlack1" colorText="#ffffff" font="face:微软雅黑;bold:1;size:13" skin=""> 5 | <caption pos="0,0,-0,35" focusable="1" colorBkgnd="#FFFFFF20" drawfocusrect="0"> 6 | <text pos="|0,|0" name="txt_title" offset="-0.5,-0.5">@string/title</text> 7 | <imgbtn id="1" skin="_skin.sys.btn.close" pos="-45,0" tip="close" animate="1" /> 8 | </caption> 9 | <text pos="25,51">重构:启程软件</text> 10 | <text pos="25,[5">原作者:小新[QQ:85703533],指尖[QQ:229259139]</text> 11 | <text pos="24,[20" width="322" multiLines="1" height="90">本软件使用SOUI界面库进行开发,实现相对简单的实时编辑及界面预览。修复了原版本比较多的内存泄漏及崩溃。 12 | SOUI交流QQ群:229313785,385438344</text> 13 | <text pos="24,[22">其他参与修改维护人员:ID008</text> 14 | </window> 15 | </root> 16 | </SOUI> 17 | -------------------------------------------------------------------------------- /uieditor/uires/xml/dlg_input.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0"?> 2 | <SOUI name="window" title="布局" bigIcon="ICON_LOGO:32" smallIcon="ICON_LOGO:16" width="400" height="130" wndType="8" toolWindow="1"> 3 | <root cache="1"> 4 | <window pos="0,0,-0,-0" colorBkgnd="@color/bkBlack1" colorText="#ffffff" font="face:微软雅黑;bold:1;size:13"> 5 | <caption pos="0,0,-0,30" focusable="1" drawfocusrect="0"> 6 | <text pos="5,4" name="txt_title">输入对话框</text> 7 | <imgbtn name="btnCancel" skin="_skin.sys.btn.close" pos="-45,0" tip="close" animate="1" /> 8 | </caption> 9 | <edit pos="56,43" size="336, 24" cueText="" colorText="#000000" name="edtInput" /> 10 | <text pos="10,45">内容:</text> 11 | <button name="btnOK" pos="275,86" size="106, 27" skin="skin_blue_button" class="ue_cls_whiltebtn">确定</button> 12 | </window> 13 | </root> 14 | </SOUI> 15 | -------------------------------------------------------------------------------- /uieditor/uires/xml/dlg_main_left.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0"?> 2 | <tabctrl name="workspace_tab" pos="0,0,-0,-0" tabAlign="top" tabInterSize="2" tabWidth="90" tabHeight="30" tabSkin="skin_tab_skin" colorText="#FFFFFF" focusable="0" show="1" curSel="0" font="face:微软雅黑,size:15"> 3 | <page title="Layout" colorBorder="#ffff00"> 4 | <treectrl pos="0,0,-0,-0" name="workspace_tree" itemHeight="28" colorItemText="#FFFFFF" colorItemSelText="#FFFFFF" colorItemSelBkgnd="@color/itemSelected" colorHover="@color/itemHover" rightClickSel="1" colorBkgnd="#FFFFFF12" /> 5 | </page> 6 | 7 | <page title="XML文件" colorBorder="#ffff00"> 8 | <listbox pos="0,0,-0,-0" name="workspace_xmlfile_lb" weight="1" hotTrack="1" itemHeight="28" colorSelText="#FFFFFF" colorItemSelBkgnd="rgb(234,128,16)" colorBkgnd="#FFFFFF12" text-x="20" /> 9 | </page> 10 | </tabctrl> -------------------------------------------------------------------------------- /uieditor/uires/xml/dlg_main_right.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0"?> 2 | <window size="-2,-2" layout="vbox" interval="5"> 3 | <text text="Xml 结构" size="-2,24"/> 4 | <treectrl size="-2,0" weight="1" name="uidesigner_wnd_xmltree" toggleSkin="skin_tree_toggle_png" colorBkgnd="#FFFFFF12" itemHeight="30" colorItemText="#FFFFFF" colorItemSelText="#FFFFFF" colorItemSelBkgnd="@color/itemSelected" /> 5 | </window> 6 | -------------------------------------------------------------------------------- /uieditor/uires/xml/dlg_new_layout.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0"?> 2 | <SOUI name="mainWindow" title="@string/title" bigIcon="ICON_LOGO:32" smallIcon="ICON_LOGO:16" width="500" height="150" margin="1,5,5,5" wndType="8" toolWindow="1"> 3 | <root colorBkgnd="@color/bkBlack1" cache="1" skin=""> 4 | <caption pos="0,0,-0,30" show="1" font="adding:0"> 5 | <icon name="NAME_UIDESIGNER_main_icon" skin="skin_main_icon" pos="8,9" /> 6 | </caption> 7 | <text pos="29,6" class="CLASS_UIDESIGNER_ue_cls_title">新建布局</text> 8 | <imgbtn name="NAME_UIDESIGNER_btn_close" skin="_skin.sys.btn.close" pos="-45,0" tip="close" animate="1" /> 9 | <window pos="10, [5, -10, -10"> 10 | <edit pos="5,5,-36,@24" name="new_layout_resname" cueText="资源名" /> 11 | <edit pos="5,[10,-36,@24" name="new_layout_path" cueText="保存路径" /> 12 | <button name="NAME_UIDESIGNER_btn_dlg" pos="[5,{0,@30,@24" skin="skin_blue_button" class="ue_cls_whiltebtn">...</button> 13 | <button name="NAME_UIDESIGNER_btn_OK" pos="-100,75,@70,@30" skin="skin_blue_button" class="ue_cls_whiltebtn">确定</button> 14 | </window> 15 | </root> 16 | </SOUI> 17 | -------------------------------------------------------------------------------- /uieditor/uires/xml/dlg_new_skin.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0"?> 2 | <SOUI name="window" title="布局" bigIcon="ICON_LOGO:32" smallIcon="ICON_LOGO:16" width="200" height="300" wndType="8" toolWindow="1"> 3 | <root cache="1"> 4 | <window pos="0,0,-1,-1" colorBkgnd="@color/bkBlack1" colorText="#ffffff" font="face:微软雅黑;bold:1;size:13" skin=""> 5 | <caption pos="0,0,-0,30" focusable="1" drawfocusrect="0"> 6 | <text pos="5,4" name="txt_title">选择皮肤类型</text> 7 | <imgbtn name="btnCancel" skin="_skin.sys.btn.close" pos="-45,0" tip="close" animate="1" /> 8 | 9 | </caption> 10 | <listbox pos="0,[0,-0,-63" hotTrack="1" itemHeight="30" colorText="#FFFFFF" colorSelText="#FFFFFF" colorItemSelBkgnd="rgb(234,128,16)" text-x="20" name="NAME_UIDESIGNER_NEW_SKIN_LB" /> 11 | <button pos="|0,253" size="92, 28" skin="skin_blue_button" class="ue_cls_whiltebtn" offset="-0.5,-0" name="btnOK">确定</button> 12 | </window> 13 | </root> 14 | </SOUI> 15 | -------------------------------------------------------------------------------- /uiviewer/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # 1394020320@qq.com 3 | # 4 | 5 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}) 6 | include_directories(${SOUI_INCLUDE}/config) 7 | include_directories(${SOUI_INCLUDE}/components) 8 | include_directories(${SOUI_INCLUDE}/utilities/include) 9 | include_directories(${SOUI_INCLUDE}/SOUI/include) 10 | include_directories(${SOUI_SRC_ROOT}/third-part/Scintilla/include) 11 | include_directories(${SOUI_SRC_ROOT}/controls.extend) 12 | 13 | file(GLOB_RECURSE CURRENT_HEADERS *.h *.hpp) 14 | file(GLOB_RECURSE CURRENT_SRCS *.cpp) 15 | file(GLOB_RECURSE CURRENT_SOUIS *.xml *.idx *.ico) 16 | file(GLOB_RECURSE CURRENT_RC *.rc *.rc2) 17 | 18 | source_group("Header Files" FILES ${CURRENT_HEADERS}) 19 | source_group("Source Files" FILES ${CURRENT_SRCS}) 20 | source_group("SoUI Resouece" FILES ${CURRENT_SOUIS}) 21 | source_group("Resource Files" FILES ${CURRENT_RC}) 22 | 23 | add_executable(uiviewer WIN32 ${CURRENT_HEADERS} ${CURRENT_SRCS} ${CURRENT_SOUIS} ${CURRENT_RC}) 24 | target_link_libraries(uiviewer soui4 utilities4 ExtendCtrls) 25 | 26 | target_precompile_headers(uiviewer PRIVATE "stdafx.h") 27 | -------------------------------------------------------------------------------- /uiviewer/PreviewContainer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "PreviewHost.h" 3 | 4 | class CPreviewContainer : public SNativeWnd,IListener 5 | { 6 | CPreviewHost m_previewHost; 7 | HBITMAP m_hBgBmp; 8 | public: 9 | CPreviewContainer(LPCTSTR pszLayoutId, HWND hEditor = 0); 10 | ~CPreviewContainer(void); 11 | 12 | protected: 13 | virtual void OnEditorExit() override; 14 | virtual void OnResize() override; 15 | virtual void OnRePos(const POINT *pt); 16 | protected: 17 | CPoint GetViewPos() const; 18 | void UpdateViewPos(); 19 | protected: 20 | void SetScrollMax(int hmax, int vmax) const; 21 | int OnCreate(LPCREATESTRUCT lpCreateStruct); 22 | void OnScroll(int nBar,int nSBCode, int nPos, HWND hScrollBar); 23 | void OnHScroll(int nSBCode, int nPos, HWND hScrollBar); 24 | void OnVScroll(int nSBCode, int nPos, HWND hScrollBar); 25 | void OnClose(); 26 | void OnPaint(HDC hdc); 27 | void OnSize(UINT nType, CSize size); 28 | BOOL OnEraseBkgnd(HDC hdc); 29 | BEGIN_MSG_MAP_EX(CPreviewContainer) 30 | MSG_WM_CREATE(OnCreate) 31 | MSG_WM_HSCROLL(OnHScroll) 32 | MSG_WM_VSCROLL(OnVScroll) 33 | MSG_WM_CLOSE(OnClose) 34 | MSG_WM_SIZE(OnSize) 35 | MSG_WM_PAINT(OnPaint) 36 | MSG_WM_ERASEBKGND(OnEraseBkgnd) 37 | CHAIN_MSG_MAP(SNativeWnd) 38 | END_MSG_MAP() 39 | 40 | 41 | }; 42 | 43 | -------------------------------------------------------------------------------- /uiviewer/bg.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/uiviewer/bg.bmp -------------------------------------------------------------------------------- /uiviewer/icon1.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/uiviewer/icon1.ico -------------------------------------------------------------------------------- /uiviewer/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/uiviewer/readme.txt -------------------------------------------------------------------------------- /uiviewer/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by uiviewer.rc 4 | // 5 | #define IDB_BITMAP1 114 6 | #define IDB_BKGND 114 7 | #define IDI_ICON1 115 8 | 9 | // Next default values for new objects 10 | // 11 | #ifdef APSTUDIO_INVOKED 12 | #ifndef APSTUDIO_READONLY_SYMBOLS 13 | #define _APS_NEXT_RESOURCE_VALUE 116 14 | #define _APS_NEXT_COMMAND_VALUE 40037 15 | #define _APS_NEXT_CONTROL_VALUE 1000 16 | #define _APS_NEXT_SYMED_VALUE 101 17 | #endif 18 | #endif 19 | -------------------------------------------------------------------------------- /uiviewer/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // SkinTest.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | -------------------------------------------------------------------------------- /uiviewer/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #define _CRT_SECURE_NO_WARNINGS 9 | #define DLL_SOUI 10 | #include <souistd.h> 11 | #include <core/SHostDialog.h> 12 | #include <control/SMessageBox.h> 13 | #include <control/SouiCtrls.h> 14 | #include <res.mgr/SObjDefAttr.h> 15 | #include <com-cfg.h> 16 | #include "resource.h" 17 | #define R_IN_CPP 18 | using namespace SOUI; 19 | -------------------------------------------------------------------------------- /uiviewer/uiviewer.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soui4-demo/SouiEditor/95ee77e74c51dd778b386961a8e569ba7e5ca900/uiviewer/uiviewer.rc --------------------------------------------------------------------------------