Exemplo n.º 1
0
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
void MkStartRecording (int N)
{
  QString macro = MacroName( MkRecording = N );
  luaP_getglobal("Mk");
  luaP_pushstring (macro.cStr());
  luaP_pushinteger    (TK_EM0+N);
  luaQQ_rawset(-3); luaQn_pop(1);
}
Exemplo n.º 2
0
void MkStopRecording (void) //- - - - - - - - - - - - - - - - - - - - - - - - -
{                                         // make sure there is no self-refs in
  QString macro = MacroName(MkRecording); // string to avoid infinite recursion
  MkMacro.replace(MkQuoteCmd(macro), ""); // (one such reference is always
  luaP_getglobal("Mk");                   //     recorded just before stopping)
  luaP_pushstring(  macro.cStr());
  luaP_pushstring(MkMacro.uStr()); MkMacro.clear();
  luaQQ_rawset(-3);  luaQn_pop(1); MkRecording = 0;
}
Exemplo n.º 3
0
Macros *CreateMacro( char *name, char *field, int pos )
{   Macros *macro = HEAP(Macros);

    MacroName(macro) = Initialise(name);   /* This calls heaps its result */
    MacroField(macro) = Initialise(field);
    MacroPos(macro) = pos;
    MacroNext(macro) = NULL;
    return(macro);
}
Exemplo n.º 4
0
void WriteAccessMacros( FILE *outfile, ListNode *macros )
{  Macros *pos = MacrosHead(macros);

   while( pos != NULL )
   {  fprintf( outfile,"#define %s%s(x) Index(Children(x),%d)\n",
                       MacroName(pos), MacroField(pos), MacroPos(pos));
      pos = MacroNext(pos);
   }
   fprintf( outfile, "\n" );
}
Exemplo n.º 5
0
void UK2Node_MacroInstance::GetNodeAttributes( TArray<TKeyValuePair<FString, FString>>& OutNodeAttributes ) const
{
	FString MacroName( TEXT( "InvalidMacro" ));

	if( UEdGraph* MacroGraph = GetMacroGraph() )
	{
		MacroName = MacroGraph->GetName();
	}

	OutNodeAttributes.Add( TKeyValuePair<FString, FString>( TEXT( "Type" ), TEXT( "Macro" ) ));
	OutNodeAttributes.Add( TKeyValuePair<FString, FString>( TEXT( "Class" ), GetClass()->GetName() ));
	OutNodeAttributes.Add( TKeyValuePair<FString, FString>( TEXT( "Name" ), MacroName ));
}
Exemplo n.º 6
0
void MacroWidgetGosub::SlotOnButtonConfirmClicked()
{
	CodeEditorManager::GetInstance()->UpdateCurrentLine(MacroName() + " " + m_programComboBox->currentText());
	delete this;
}