Quantcast

Is it possible to move wxDC and (some) derivatives to wxBase ??

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Is it possible to move wxDC and (some) derivatives to wxBase ??

Minze Zwerver-2
Hi,

I'm starting the process of moving some products of my employer away
from OWL(next) and curses to wxWidgets in order to have a uniform
multiplatform product. The few tests we have done so far look promissing
  , since it's mostly the gui code that needs to be changed for now.

One thing that I would like create anew is our printing infrastructure,
this is still very lineprinter oriented. Since printing using wxWidgets
looks like the shortest path for this, I would like to use the wxDC
children to do it. For instance if I create a cronjob for report
mail/fax/printing I have to use the wxCore to get any printing done, but
I am not going to use any of the GUI parts of wxWidgets.

I understand that this may be a vague question perhaps, but MSW doesn't
care if you _could_ be using gui things, but with linux at least I will
have to use some virtual Xserver construction although I wont be using
the gui parts, which makes it look a little stupid.

So is it possible to move this classes or how much work (time) would be
required to get them separated from the GUI siblings ?

Thank you for wxWidgets !

Minze Zwerver.

PS: I read somewhere about replacing the original socket implementations
with (boost::)asio, I've been using a combination of b::a with wx for a
debugging application of ours and can confirm that it's a good combo.

_______________________________________________
wx-discuss mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wx-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is it possible to move wxDC and (some) derivatives to wxBase ??

Vadim Zeitlin-4
On Sat, 04 Apr 2009 14:31:47 +0200 Minze Zwerver <[hidden email]> wrote:

MZ> I'm starting the process of moving some products of my employer away
MZ> from OWL(next) and curses to wxWidgets

 Looks like an interesting project, good luck with it.

MZ> One thing that I would like create anew is our printing infrastructure,
MZ> this is still very lineprinter oriented. Since printing using wxWidgets
MZ> looks like the shortest path for this, I would like to use the wxDC
MZ> children to do it. For instance if I create a cronjob for report
MZ> mail/fax/printing I have to use the wxCore to get any printing done, but
MZ> I am not going to use any of the GUI parts of wxWidgets.

 I see your problem but unfortunately I don't see any simple solution to
it. I guess we could make wxDC a wxBase class as on its own it doesn't need
GUI -- only its various implementations do. And wxPrinterDC might work
without GUI. But I don't see how to avoid the dependency on GUI of all GDI
classes you use with wxDC, e.g. wxPen, wxBrush, wxFont, ... which you need
to actually do anything useful with it.

 So I guess you actually need to find some way to use the code in
src/generic/dcpsg.cpp (as I guess being able to generate PostScript should
be enough) without wxDC. But this would require a lot of refactoring work.
And while we'd welcome patches doing it properly because I see that it can
be useful to other people, we don't have any plans to do it ourselves
currently.

 Regards,
VZ

_______________________________________________
wx-discuss mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wx-discuss

attachment0 (202 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is it possible to move wxDC and (some) derivatives to wxBase ??

Minze Zwerver-2
Vadim Zeitlin wrote:
> On Sat, 04 Apr 2009 14:31:47 +0200 Minze Zwerver <[hidden email]> wrote:
>
> MZ> I'm starting the process of moving some products of my employer away
> MZ> from OWL(next) and curses to wxWidgets
>
>  Looks like an interesting project, good luck with it.
>
> MZ> One thing that I would like create anew is our printing infrastructure,

>  I see your problem but unfortunately I don't see any simple solution to
> it. I guess we could make wxDC a wxBase class as on its own it doesn't need
> GUI -- only its various implementations do. And wxPrinterDC might work
> without GUI. But I don't see how to avoid the dependency on GUI of all GDI
> classes you use with wxDC, e.g. wxPen, wxBrush, wxFont, ... which you need
> to actually do anything useful with it.

Just looking at the new doxygen documents it looks like the following
classes could be separated from there GUI based relatives (for the DC
family at least. Will look at  printerdata later on):

wxDC
wxMemoryDC
wxPostscript
wxPrinterDC
wxMetafileDC
wxSVGfileDC
wxBrush
wxFont
wxPen
and probably some more I overlooked

while :
wxGCDC
wxScreenDC
wxWindowDC
wxBufferedDC (not sure if it has to be on this side of the fence for
this one)
wxBufferedPaintDC
wxAutobufferdPaintDC

are somehow wxWindow related

I have to brush up on my bakefile knowlegde first to see if I can create
something like a wxGDI shared object or extend wxBase with the first few
classes. I started my multiplatform experiments with bakefiles but moved
to cmake after a while for reasons I can't remember.

This all could be doable without refactoring I think, but would help me
greatly. If I can make it work again the trunk I will try to make patch.

Regards,
MZ




>  Regards,
> VZ
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> wx-discuss mailing list
> [hidden email]
> http://lists.wxwidgets.org/mailman/listinfo/wx-discuss

_______________________________________________
wx-discuss mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wx-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re: Is it possible to move wxDC and (some) derivatives to wxBase ??

Vadim Zeitlin-4
On Tue, 07 Apr 2009 21:21:35 +0200 Minze Zwerver <[hidden email]> wrote:

MZ> Just looking at the new doxygen documents it looks like the following
MZ> classes could be separated from there GUI based relatives (for the DC
MZ> family at least. Will look at  printerdata later on):
MZ>
MZ> wxDC
MZ> wxMemoryDC

 This one has some GUI dependencies even in wxGTK.

MZ> wxPostscript
MZ> wxPrinterDC
MZ> wxMetafileDC
MZ> wxSVGfileDC
MZ> wxBrush
MZ> wxFont
MZ> wxPen
MZ> and probably some more I overlooked

 It's true that wxBrush and wxPen under wxGTK happen to not use any GUI
functions as they're basically just containers of their attributes and
don't do anything themselves -- all the pen/brush code is in wxDC.

 But it's rather particular to GTK (and maybe all X11-based) ports and you
can't rely on this in general. Of course, under Windows/OS X you always
have the GUI available so maybe it's not such a problem...

 The cleanest way to handle this would be to have a trivial wxPenBase
implementation (or maybe even provide a shared wxPenRefDataBase and do it
in wxPenBase itself) which does nothing except storing its attributes and
then modify wxDC::SetPen() to take a wxPenBase instead of wxPen. This would
need quite a few changes, albeit not very difficult ones.


 BTW, I think your questions are better suited for wx-dev and not this list
which was created specially for non-technical discussions and which has
much fewer subscribers to wx-dev AFAIK. So please feel free to follow up on
wx-dev, which I also regularly read.

 Regards,
VZ

_______________________________________________
wx-discuss mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wx-discuss

attachment0 (202 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is it possible to move wxDC and (some) derivatives to wxBase ?? (moved to c.l.wx.devel)

Minze Zwerver-2
Vadim Zeitlin wrote:
>
>  But it's rather particular to GTK (and maybe all X11-based) ports and you
> can't rely on this in general. Of course, under Windows/OS X you always
> have the GUI available so maybe it's not such a problem...

Most of the time I feel like I have the advantage over my windows
colleagues, this time they have the upper leg.

>  The cleanest way to handle this would be to have a trivial wxPenBase
> implementation (or maybe even provide a shared wxPenRefDataBase and do it
> in wxPenBase itself) which does nothing except storing its attributes and
> then modify wxDC::SetPen() to take a wxPenBase instead of wxPen. This would
> need quite a few changes, albeit not very difficult ones.

I was thinking along the wx[Somedrawingthingy]Base line for this.

>  BTW, I think your questions are better suited for wx-dev and not this list
> which was created specially for non-technical discussions and which has
> much fewer subscribers to wx-dev AFAIK. So please feel free to follow up on
> wx-dev, which I also regularly read.
>
>  Regards,
> VZ

Was thinking about moving this discussion to devel this morning.. so...
it's there now too (if gmane allows it)

Regards,
MZ

_______________________________________________
wx-discuss mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wx-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re: Is it possible to move wxDC and (some) derivatives to wxBase ??

Vikas Singh-2
In reply to this post by Vadim Zeitlin-4
hello
i am a student from india
i have applied for gsoc in only one project
it is related to ribbon bar implementation
i want to know more details related to that project

can i talk to mentor of ribbon bar implementation on this mailing list

--
Vikas Singh
float m[]={258837646934016,687739174912,3791770.25,20}
;main(){m[3]--?m[0]*=2,m[2]*=8,main():printf(m);}

_______________________________________________
wx-discuss mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wx-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re: Is it possible to move wxDC and (some) derivatives to wxBase ??

Julian Smart
Hi Vikas,

I'll reply off-list.

Thanks,

Julian

Vikas Singh wrote:

> hello
> i am a student from india
> i have applied for gsoc in only one project
> it is related to ribbon bar implementation
> i want to know more details related to that project
>
> can i talk to mentor of ribbon bar implementation on this mailing list
>
> --
> Vikas Singh
> float m[]={258837646934016,687739174912,3791770.25,20}
> ;main(){m[3]--?m[0]*=2,m[2]*=8,main():printf(m);}
> ------------------------------------------------------------------------
>
> _______________________________________________
> wx-discuss mailing list
> [hidden email]
> http://lists.wxwidgets.org/mailman/listinfo/wx-discuss
>  


--
Julian Smart, Anthemion Software Ltd.
28/5 Gillespie Crescent, Edinburgh, Midlothian, EH10 4HU
www.anthemion.co.uk | +44 (0)131 229 5306
Tools for writers: www.writerscafe.co.uk
wxWidgets RAD:     www.dialogblocks.com
Blog:              www.juliansmart.com

_______________________________________________
wx-discuss mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wx-discuss
Loading...