PxDbgC.dll 0.3 / 0.4 manual

Content
    1.   Requirements
    2.   Functions and how to use
    3.   Copyright

1. Requirements
    What is required to make PxDbgC.dll work:

    1. PtokaX DC Hub >= 0.3.3.21 (or any host that uses PXLua.dll)
    Or
    1. Any gui based software with Lua 5.02 scripting support.
    2. A Borland C++ compiler (For ex. the free commandline tools)
    3. Header files from the lua sources used by the host.

2. Functions
    - I will only breifly describe the functions. You can play with the lua samples for greater understanding.
    Before you can use the lib you must load it:
   
    libinit = loadlib("PxDbgC.dll", "_libinit")
    libinit()

The functions:

DbgC.Open()

    - Starts the console window.
    You must call this function before the console shows.

    Example:

    err = DbgC.Open()
    if err then
      -- Error allocateing console
    end


DbgC.Close()

    - Closes the console window.

    Example:

    err = DbgC.Close()
    if err then
      -- Error closing console
    end


DbgC.Print()

    - Prints text in the console window

    Example:

    DbgC.Print("This is a string")
    DbgC.Print("multi","ply ","a","r","g","u","m","e"
,"n","t","s" )

DbgC.PrintLn()

    - Prints text in the console window and ends with newline ( "\n" )

    Example:

    DbgC.PrintLn("This is a string")
    DbgC.PrintLn("multi","ply ","a","r","g","u","m","e"
,"n","t","s" )

DbgC.PrintLns()

    - Prints text in the console window, each argument is 1 line

    Example:

    DbgC.PrintLns("This is a string")
    DbgC.PrintLns("multi","ply ","a","r","g","u","m","e"
,"n","t","s" )

DbgC.MsgBox()

    - Popup a windows messagebox

    returns dialog result.
    6 = Yes button pushed
    7 = No button pushed

    Arguments:
    (message,title, type)
    type desides wich buttons is on the messagebox.
    1 = Yes and No button
    0 = Ok only button

    Example:

    -- msgbox with ok button
    result = DbgC.MsgBox("Message","WindowTitle", 0)

    -- msgbox with yes and no button
    result = DbgC.MsgBox("Stop log to file?","Deside!", 1)
    if result == 6 then
          DbgC.PrintLn("Stopping loggin..")
        DbgC.StopLog()
    elseif result == 7 then
          DbgC.PrintLn("Login continues..")
    end



DbgC.StartLog()

    - When called print, println, pringlns, msgbox will also be logged into a file and not only to screen.

    Example:

    DbgC.StartLog("c:\ptokax\logs\mylogfile.txt")

DbgC.StopLog()

    - Disables loggin to file.

    Example:

    DbgC.StopLog()

DbgC.AlwaysOnTop()

    - Makes console window always stay on top of other windows.

    Example:

    DbgC.AlwaysOnTop()



3. Copyright
PxDbgC - Ptokax Debug Console Window
Copyright (C) 2005-2006 Morten Larsen, bluebear dot dk at gmail dot com, http://www.thewildplace.dk/

Lua -> Copyright © 1994-2004 Tecgraf, PUC-Rio.

PtokaX DC Hub  -> Copyright © 2002-2003 Ptaczek, Frontline3k and aMutex.
PtokaX DC Hub  -> Copyright © 2004-2005 Ptaczek and PPK.

License:
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.