Duncan Cross | 3 Sep 05:09

wxStyledTextCtrl - Activating Brace Matching

Hi List,

Could anyone help me with getting brace matching to work (i.e. when
the text cursor is over a brace, highlight both the brace and its
matching twin blue, unless the brace is mismatched, in which case
highlight it red) for a wxStyledTextCtrl control? It seems like it
should be obvious, but I can't seem to find this information anywhere.
What change(s) would you make to the editor.wx.lua sample script to do
this? (I know that it must be possible since wxLuaEditor supports it.)

Thank you,

-Duncan

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
John Labenski | 3 Sep 06:49

Re: wxStyledTextCtrl - Activating Brace Matching

On Tue, Sep 2, 2008 at 11:12 PM, Duncan Cross <duncan.cross@...> wrote:
> Hi List,
>
> Could anyone help me with getting brace matching to work (i.e. when
> the text cursor is over a brace, highlight both the brace and its
> matching twin blue, unless the brace is mismatched, in which case
> highlight it red) for a wxStyledTextCtrl control? It seems like it
> should be obvious, but I can't seem to find this information anywhere.
> What change(s) would you make to the editor.wx.lua sample script to do
> this? (I know that it must be possible since wxLuaEditor supports it.)
>

The wxLuaEditor does it on the C++ side, but perhaps it can be
translated to Lua.

See:

http://wxcode.cvs.sourceforge.net/wxcode/wxCode/components/wxstedit/src/stedit.cpp?view=markup

  156     EVT_STC_UPDATEUI         (wxID_ANY, wxSTEditor::OnSTCUpdateUI)

  340 void wxSTEditor::OnSTCUpdateUI(wxStyledTextEvent &event)

 1874 void wxSTEditor::DoBraceMatch()

and

1792 bool wxSTEditor::DoFindMatchingBracePosition(

Hope this helps,
(Continue reading)

Duncan Cross | 3 Sep 14:11

Re: wxStyledTextCtrl - Activating Brace Matching

On Wed, Sep 3, 2008 at 5:49 AM, John Labenski <jlabenski@...> wrote:
> On Tue, Sep 2, 2008 at 11:12 PM, Duncan Cross
<duncan.cross@...> wrote:
>> Hi List,
>>
>> Could anyone help me with getting brace matching to work (i.e. when
>> the text cursor is over a brace, highlight both the brace and its
>> matching twin blue, unless the brace is mismatched, in which case
>> highlight it red) for a wxStyledTextCtrl control? It seems like it
>> should be obvious, but I can't seem to find this information anywhere.
>> What change(s) would you make to the editor.wx.lua sample script to do
>> this? (I know that it must be possible since wxLuaEditor supports it.)
>>
>
> The wxLuaEditor does it on the C++ side, but perhaps it can be
> translated to Lua.
>
> See:
>
> http://wxcode.cvs.sourceforge.net/wxcode/wxCode/components/wxstedit/src/stedit.cpp?view=markup
>
>  156     EVT_STC_UPDATEUI         (wxID_ANY, wxSTEditor::OnSTCUpdateUI)
>
>  340 void wxSTEditor::OnSTCUpdateUI(wxStyledTextEvent &event)
>
>  1874 void wxSTEditor::DoBraceMatch()
>
> and
>
> 1792 bool wxSTEditor::DoFindMatchingBracePosition(
(Continue reading)

Duncan Cross | 3 Sep 14:58

Re: wxStyledTextCtrl - Activating Brace Matching

On Wed, Sep 3, 2008 at 5:49 AM, John Labenski <jlabenski@...> wrote:
> On Tue, Sep 2, 2008 at 11:12 PM, Duncan Cross
<duncan.cross@...> wrote:
>> Hi List,
>>
>> Could anyone help me with getting brace matching to work (i.e. when
>> the text cursor is over a brace, highlight both the brace and its
>> matching twin blue, unless the brace is mismatched, in which case
>> highlight it red) for a wxStyledTextCtrl control? It seems like it
>> should be obvious, but I can't seem to find this information anywhere.
>> What change(s) would you make to the editor.wx.lua sample script to do
>> this? (I know that it must be possible since wxLuaEditor supports it.)
>>
>
> The wxLuaEditor does it on the C++ side, but perhaps it can be
> translated to Lua.
>
> See:
>
> http://wxcode.cvs.sourceforge.net/wxcode/wxCode/components/wxstedit/src/stedit.cpp?view=markup
>
>  156     EVT_STC_UPDATEUI         (wxID_ANY, wxSTEditor::OnSTCUpdateUI)
>
>  340 void wxSTEditor::OnSTCUpdateUI(wxStyledTextEvent &event)
>
>  1874 void wxSTEditor::DoBraceMatch()
>
> and
>
> 1792 bool wxSTEditor::DoFindMatchingBracePosition(
(Continue reading)


Gmane