commit | 768645affafd5ca0fc620dfcf629ac1c01c59a3e | [log] [tgz] |
---|---|---|
author | PulkoMandy <pulkomandy@pulkomandy.tk> | dim. juin 04 21:43:01 2023 +0200 |
committer | PulkoMandy <pulkomandy@pulkomandy.tk> | dim. juin 04 21:43:01 2023 +0200 |
tree | f72c2733f728fa672f40ac9ea20670f2b2618e71 | |
parent | ee68b1ec2a5b198989fca094b91f1c79e63de8f6 [diff] |
Implement cut and copy
Written by Adrien Destugues Based on BeDC by Magnus Landahl
This program is distributed under the terms of the MIT license.
This application receives messages from other application and display them in a nicely formatted view. This is useful in several cases:
There is room for improvements, such as providing easy copypaste of data, search and filtering functions, etc.
All you have to do is to create an BeDC object and use that one to send messages. It´s that simple. An quick example:
BeDC dc; dc.SendMessage("It just works!!!");
First some defines: Colors:
White = DC_WHITE Black = DC_BLACK Blue = DC_BLUE Red = DC_RED Yellow = DC_YELLOW Green = DC_GREEN
Message types:
Normal message = DC_MESSAGE Success message = DC_SUCCESS Error message = DC_ERROR
The constructor:
BeDC(const char *name, int8 color);
'name' is the display name, it could be what ever you want. Default is: "Application" 'color' is the color of the head. If you don´t specify a color BeDC will use the defaut head color.
Member functions:
SendMessage(char *text, int8 type);
Sends a normal message.
SendSeparator();
Adds a separator.
SendInt(Int32 / Int64 integer, const char *description, int8 type);
Sends an int32 or int64. If you don´t specify a description BeDC will print "Integer"
SendPoint(BPoint point, const char *description, int8 type);
Sends a BPoint. If you don´t specify a description BeDC will print "Point"
SendRect(BRect rect, const char *description, int8 type);
Sends a BRect. If you don´t specify a description BeDC will print "Rectangle"
SendFormat(const char *text, ...); SendFormatT(const char *text, int8 type, ...);
Sends a format string like printf. SendFormatT is used when you want to specify the message type.
DumpBMessage(BMessage *Message, const char *desc = "", int8 type = DC_MESSAGE);
Dumps a BMessage...