Skip to content

Commit

Permalink
Added script function SetUnseenLines
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgammon committed Feb 15, 2017
1 parent 120c06f commit 6c977de
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 10 deletions.
2 changes: 2 additions & 0 deletions doc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,7 @@ BEGIN_DISPATCH_MAP(CMUSHclientDoc, CDocument)
DISP_FUNCTION(CMUSHclientDoc, "SetTitle", SetTitle, VT_EMPTY, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "SetMainTitle", SetMainTitle, VT_EMPTY, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "StopEvaluatingTriggers", StopEvaluatingTriggers, VT_EMPTY, VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "SetUnseenLines", SetUnseenLines, VT_EMPTY, VTS_I4)
DISP_PROPERTY_PARAM(CMUSHclientDoc, "NormalColour", GetNormalColour, SetNormalColour, VT_I4, VTS_I2)
DISP_PROPERTY_PARAM(CMUSHclientDoc, "BoldColour", GetBoldColour, SetBoldColour, VT_I4, VTS_I2)
DISP_PROPERTY_PARAM(CMUSHclientDoc, "CustomColourText", GetCustomColourText, SetCustomColourText, VT_I4, VTS_I2)
Expand Down Expand Up @@ -7908,3 +7909,4 @@ void CMUSHclientDoc::FixInputWrap()
} // end of CMUSHclientDoc::FixInputWrap()



1 change: 1 addition & 0 deletions doc.h
Original file line number Diff line number Diff line change
Expand Up @@ -2819,6 +2819,7 @@ class CMUSHclientDoc : public CDocument
afx_msg void SetTitle(LPCTSTR Title);
afx_msg void SetMainTitle(LPCTSTR Title);
afx_msg void StopEvaluatingTriggers(BOOL AllPlugins);
afx_msg void SetUnseenLines(long Counter);
afx_msg long GetNormalColour(short WhichColour);
afx_msg void SetNormalColour(short WhichColour, long nNewValue);
afx_msg long GetBoldColour(short WhichColour);
Expand Down
1 change: 1 addition & 0 deletions mushclient.cnt
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,7 @@
3 SetTitle=FNC_SetTitle
3 SetToolBarPosition=FNC_SetToolBarPosition
3 SetTriggerOption=FNC_SetTriggerOption
3 SetUnseenLines=FNC_SetUnseenLines
3 SetVariable=FNC_SetVariable
3 SetWorldWindowStatus=FNC_SetWorldWindowStatus
3 ShowInfoBar=FNC_ShowInfoBar
Expand Down
17 changes: 9 additions & 8 deletions mushclient.odl
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ library MUSHclient
[id(44)] long SetCommand(BSTR Message);
[id(45)] BSTR GetNotes();
[id(46)] void SetNotes(BSTR Message);
[id(412), propget] long NormalColour(short WhichColour);
[id(412), propput] void NormalColour(short WhichColour, long nNewValue);
[id(413), propget] long BoldColour(short WhichColour);
[id(413), propput] void BoldColour(short WhichColour, long nNewValue);
[id(414), propget] long CustomColourText(short WhichColour);
[id(414), propput] void CustomColourText(short WhichColour, long nNewValue);
[id(415), propget] long CustomColourBackground(short WhichColour);
[id(415), propput] void CustomColourBackground(short WhichColour, long nNewValue);
[id(413), propget] long NormalColour(short WhichColour);
[id(413), propput] void NormalColour(short WhichColour, long nNewValue);
[id(414), propget] long BoldColour(short WhichColour);
[id(414), propput] void BoldColour(short WhichColour, long nNewValue);
[id(415), propget] long CustomColourText(short WhichColour);
[id(415), propput] void CustomColourText(short WhichColour, long nNewValue);
[id(416), propget] long CustomColourBackground(short WhichColour);
[id(416), propput] void CustomColourBackground(short WhichColour, long nNewValue);
[id(47)] void Redraw();
[id(48)] long ResetTimer(BSTR TimerName);
[id(49)] void SetOutputFont(BSTR FontName, short PointSize);
Expand Down Expand Up @@ -443,6 +443,7 @@ library MUSHclient
[id(409)] void SetTitle(BSTR Title);
[id(410)] void SetMainTitle(BSTR Title);
[id(411)] void StopEvaluatingTriggers(BOOL AllPlugins);
[id(412)] void SetUnseenLines(long Counter);
//}}AFX_ODL_METHOD

};
Expand Down
1 change: 1 addition & 0 deletions scripting/functionlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ tInternalFunctionsTable InternalFunctionsTable [] = {
{ "SetTitle" , "( Title )" } ,
{ "SetToolBarPosition" , "( Which , Float , Side , Top , Left )" } ,
{ "SetTriggerOption" , "( TriggerName , OptionName , Value )" } ,
{ "SetUnseenLines" , "( Counter )" } ,
{ "SetVariable" , "( VariableName , Contents )" } ,
{ "SetWorldWindowStatus" , "( Parameter )" } ,
{ "ShiftTabCompleteItem" , "( Item )" } ,
Expand Down
10 changes: 10 additions & 0 deletions scripting/lua_methods.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5500,6 +5500,15 @@ static int L_SetTriggerOption (lua_State *L)
return 1; // number of result fields
} // end of L_SetTriggerOption

//----------------------------------------
// world.SetUnseenLines
//----------------------------------------
static int L_SetUnseenLines (lua_State *L)
{
CMUSHclientDoc *pDoc = doc (L);
pDoc->SetUnseenLines (my_checknumber (L, 1));
return 0; // number of result fields
} // end of SetUnseenLines

//----------------------------------------
// world.SetVariable
Expand Down Expand Up @@ -7034,6 +7043,7 @@ static const struct luaL_Reg worldlib [] =
{"SetTitle", L_SetTitle},
{"SetToolBarPosition", L_SetToolBarPosition},
{"SetTriggerOption", L_SetTriggerOption},
{"SetUnseenLines", L_SetUnseenLines},
{"SetVariable", L_SetVariable},
{"SetWorldWindowStatus", L_SetWorldWindowStatus},
{"ShiftTabCompleteItem", L_ShiftTabCompleteItem},
Expand Down
10 changes: 8 additions & 2 deletions scripting/methods/methods_output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
// SetScroll
// SetTitle
// SetToolBarPosition
// SetUnseenLines
// SetWorldWindowStatus
// TextRectangle
// Transparency
Expand Down Expand Up @@ -836,11 +837,16 @@ void CMUSHclientDoc::SetTitle(LPCTSTR Title)
} // end of being a CMUSHView
} // end of loop through views

}
} // end of CMUSHclientDoc::SetTitle


void CMUSHclientDoc::SetMainTitle(LPCTSTR Title)
{
m_strMainWindowTitle = Title;
Frame.FixUpTitleBar ();
}
} // end of CMUSHclientDoc::SetMainTitle

void CMUSHclientDoc::SetUnseenLines(long Counter)
{
m_new_lines = Counter;
} // end of CMUSHclientDoc::SetUnseenLines

0 comments on commit 6c977de

Please sign in to comment.