Laurent Veilleux wrote:
> Hi i have new questions today =)
So lets change the subject of the threads too, at every new question ;-)
Better for other to search later.
>
> Ok but how edit the text after it has inputed ?? you select again the
> text and you switch to edit tool?
Right, one you managed to add text, using the text tool, you use the edittool
and
clcik on it to edit it again. Ctrl Mouse Left Down drags the text (while
editing).
> How can i modify the font attribute when i am editing the text ??
void a2dStToolEvtHandler::OnDoEvent( a2dCommandProcessorEvent& event )
has the following part:
if ( event.GetCommand()->GetCommandId() == &a2dCommand_SetFont::Id )
{
a2dDrawTextTool* textTool = wxDynamicCast( tool, a2dDrawTextTool );
if ( textTool )
textTool->SetFont( a2dGetCmdh()->GetFont() );
}
So issueing a a2dCommand_SetFont command (search for it!!) will have the
a2dDrawTextTool react to that.
I think i should extend this to the edittool. Need to think about that.
In any case you can do it yourself, by deriving a thing or two, and handle the
same situation as above
but for the edittool.
>
> To Open document it seems that I have to handle the postcreate
> document event no ? i have to handle it in the connector ??
Right.
Sometimes you might want to have SentPreAddDocumentEvent, or even
wxEVT_NEW_DOCUMENT,
study the next to know what happening:
bool a2dDocumentCommandProcessor::CreateDocuments(const wxString& path,
a2dDocumentFlagMask flags,
a2dDocumentTemplate* wantedDocTemplate, int dialogflags)
wxEVT_NEW_DOCUMENT
SentPreAddDocumentEvent
SentPostCreateDocumentEvent
>
> About my idea of displaying an image as a background of my canvas , I
> think I should add it to the view because it if i add it as an image
> object in my doc it will be saved with the wole doc?? or can i specify
> to save only one layer ?
Right, if part of the document, you would need something extra to not load/save
it.
a2dObject::Save()
checks IsTemporary_DontSave(), so setting the property like:
PROPID_TemporaryObject.SetPropertyToObject( lobj, false );
used here:
bool a2dCanvasObject::IsTemporary_DontSave() const
should not save it.
But using it as a background of a view is also an option.
>
> I will try to make a drawing tool and I am surprised there's no one
> already perhaps i'am missing something , i'am not sure i will succed
> =) but just moifying a2dDrawPolylineLTool to make it set points when
> mouse is moving (and that is no to close to the previous point) seems
> a not so bad idea
Something like that, but after that you best convert it to a curve with bezier
parts in it.
Klaas
--
Unclassified
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wxart2d-users_dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wxart2d-users_dev