Tag feature
https://vahidmy.blog.ir/post/675
Tag feature .
The Tag implementation's purpose is to execute pre-defined actions from inside the Source Editor, by a simple Right-Click on a Tag Comment. This feature is only valid as a comment, in order to not add any reserved word into RosAsm's syntax. It is case insensitive and the Numbers are Decimal only.
Any kind of instant actions can be implemented that friendly and easy way. Actually implemented:
; Tag Dialog 1000
We suppose, here, that you have some Dialog in PE Resources, with an ID value set to 1000.
In the Source, you can insert a comment like the one above . Once done, if you Right-Click on ''Tag'', the desired Dialog will directly be launched into the Dialog Editor. It might be a good idea, when you write your 'Proc DialogProc: ', for example, to insert such a comment right above. This will save you from having to recall the Dialog ID, from having to search (in cases of many other Dialogs, in the Application), and to quickly and simply switch, in the Click time, from the Source Edition to the associated Resource Edition.
; Tag Wizard Form 'Path...........'
This Tag is built automatically by a Wizard (actually, only the Form Wizard), when it pastes back the Wizard Edition into your Source.
Once the Wizard Edition Source is pasted, a simple Right-Click on 'Tag' will re-run the Wizard, for a re-Edition.
; Tag End
Is just an End-Mark, used by the Wizard to know where the Wizard Edited Source ends.
; Tag Unicode LabelName
RosAsm sources Editor is Ascii only. Right-Clicking upon this Tag runs a Dialog devoted to the Unicode String Declarations.
If no Data matching with LabelName is found inside your Source, this feature will paste it, when back from Edition. If some matching Data is found, it is loaded into the Unicode Editor, for re-edition, and the substitution is done automatically, when you close the Dialog. This dialog offers a Button for defining the display Font. Do not forget to select the proper Script, at the bottom of the ChooseFont Dialog, if required.
When back from editon, the Data looks like this:
; Tag Unicode LabelName
[LabelName: U$ 0xxxx, 0xxxx, 0xxxx,..., 0 LabelNameNchars: D$ 027]
... where LabelNameNchars is the number of Unicode Chars in the Data Block, not considering the trailing zero.
; Tag Menu 1000
Runs the Menu Editor for the given Menu ID. The Dialog shows, then, a Button saying [Replace in Source], instead of [Store Equates to ClipBoard] so that, when leaving the Edition, the previous Menu Equates Declarations Set could be replaced automatically by the new one.
~~~~~~~